Kaydet (Commit) ea3d755a authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

vcl: detach usage and remove GraphicManager and GraphicCache

Also remove some GraphicObjectTest because they call into
GraphicManager which now doesn't exist anymore.

Change-Id: Ia434736d8611df629af3e897c878a7fb8bbe4706
Reviewed-on: https://gerrit.libreoffice.org/52243Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst 94185507
......@@ -169,13 +169,9 @@ public:
class VCL_DLLPUBLIC GraphicObject
{
friend class GraphicManager;
friend class SdrGrafObj;
private:
static GraphicManager* mpGlobalMgr;
Graphic maGraphic;
GraphicAttr maAttr;
Size maPrefSize;
......@@ -304,10 +300,6 @@ private:
) const;
DECL_LINK( ImplAutoSwapOutHdl, Timer*, void );
// Handle evtl. needed AfterDataChanges, needs to be called when new
// graphic data is swapped in/added to the GraphicManager
void VCL_DLLPRIVATE ImplAfterDataChange();
protected:
SvStream* GetSwapStream() const;
......@@ -329,20 +321,6 @@ public:
void FireSwapInRequest();
void FireSwapOutRequest();
GraphicManager& GetGraphicManager() const
{
(void)this; // avoid loplugin:staticmethods because first GraphicManager ctor creates
// mpGlobalMgr and the last GraphicManager dtor destroys it
return *mpGlobalMgr;
}
bool IsCached(
OutputDevice const * pOut,
const Size& rSz,
const GraphicAttr* pAttr,
GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD
) const;
const Graphic& GetGraphic() const;
void SetGraphic( const Graphic& rGraphic, const GraphicObject* pCopyObj = nullptr);
void SetGraphic( const Graphic& rGraphic, const OUString& rLink );
......@@ -477,127 +455,6 @@ public:
double fTopCrop,
double fRightCrop,
double fBottomCrop) const;
// read access
sal_uLong GetDataChangeTimeStamp() const { return mnDataChangeTimeStamp; }
};
class VCL_DLLPUBLIC GraphicManager
{
friend class GraphicObject;
friend class GraphicDisplayCacheEntry;
private:
std::unordered_set< GraphicObject* > maObjList;
sal_uLong mnUsedSize; // currently used memory footprint of all swapped in graphics
std::unique_ptr<GraphicCache> mpCache;
GraphicManager( const GraphicManager& ) = delete;
GraphicManager& operator=( const GraphicManager& ) = delete;
bool VCL_DLLPRIVATE ImplDraw(
OutputDevice* pOut,
const Point& rPt,
const Size& rSz,
GraphicObject const & rObj,
const GraphicAttr& rAttr,
bool& rCached
);
static bool VCL_DLLPRIVATE ImplCreateOutput(
OutputDevice* pOut,
const Point& rPt,
const Size& rSz,
const BitmapEx& rBmpEx,
const GraphicAttr& rAttr,
BitmapEx* pBmpEx = nullptr
);
static bool VCL_DLLPRIVATE ImplCreateOutput(
OutputDevice* pOut,
const Point& rPt,
const Size& rSz,
const GDIMetaFile& rMtf,
const GraphicAttr& rAttr,
GDIMetaFile& rOutMtf,
BitmapEx& rOutBmpEx
);
static void VCL_DLLPRIVATE ImplAdjust(
BitmapEx& rBmpEx,
const GraphicAttr& rAttr,
GraphicAdjustmentFlags nAdjustmentFlags
);
static void VCL_DLLPRIVATE ImplAdjust(
GDIMetaFile& rMtf,
const GraphicAttr& rAttr,
GraphicAdjustmentFlags nAdjustmentFlags
);
static void VCL_DLLPRIVATE ImplAdjust(
Animation& rAnimation,
const GraphicAttr& rAttr,
GraphicAdjustmentFlags nAdjustmentFlags
);
static void VCL_DLLPRIVATE ImplDraw(
OutputDevice* pOut,
const Point& rPt,
const Size& rSz,
const GDIMetaFile& rMtf,
const GraphicAttr& rAttr
);
// Only used by GraphicObject's Ctor's and Dtor's
void VCL_DLLPRIVATE ImplRegisterObj(
const GraphicObject& rObj,
Graphic& rSubstitute,
const OString* pID,
const GraphicObject* pCopyObj
);
void VCL_DLLPRIVATE ImplUnregisterObj( const GraphicObject& rObj );
bool VCL_DLLPRIVATE ImplHasObjects() const { return !maObjList.empty(); }
// Only used in swap case by GraphicObject
void VCL_DLLPRIVATE ImplGraphicObjectWasSwappedOut( const GraphicObject& rObj );
void VCL_DLLPRIVATE ImplGraphicObjectWasSwappedIn( const GraphicObject& rObj );
OString VCL_DLLPRIVATE ImplGetUniqueID( const GraphicObject& rObj ) const;
// This method allows to check memory footprint for all currently swapped in GraphicObjects on this GraphicManager
// which are based on Bitmaps. This is needed on 32Bit systems and only does something on those systems. The problem
// to solve is that normally the SwapOut is timer-driven, but even with short timer settings there are situations
// where this does not trigger - or in other words: A maximum limitation for GraphicManagers was not in place before.
// For 32Bit systems this leads to situations where graphics will be missing. This method will actively swap out
// the longest swapped in graphics until a maximum memory boundary (derived from user settings in tools/options/memory)
// is no longer exceeded
void VCL_DLLPRIVATE ImplCheckSizeOfSwappedInGraphics(const GraphicObject* pGraphicToIgnore);
public:
GraphicManager( sal_uLong nCacheSize, sal_uLong nMaxObjCacheSize );
~GraphicManager();
void SetMaxCacheSize( sal_uLong nNewCacheSize );
sal_uLong GetMaxCacheSize() const;
void SetCacheTimeout( sal_uLong nTimeoutSeconds );
bool IsInCache(
OutputDevice const * pOut,
const Point& rPt,
const Size& rSz,
const GraphicObject& rObj,
const GraphicAttr& rAttr
) const;
bool DrawObj(
OutputDevice* pOut,
const Point& rPt,
const Size& rSz,
GraphicObject const & rObj,
const GraphicAttr& rAttr,
const GraphicManagerDrawFlags nFlags,
bool& rCached
);
};
namespace vcl
......
......@@ -201,6 +201,8 @@ public:
OUString getOriginURL() const;
void setOriginURL(OUString const & rOriginURL);
OString getUniqueID() const;
public:
std::shared_ptr<GraphicReader>& GetContext();
......
......@@ -18213,8 +18213,6 @@ vcl/source/graphic/UnoGraphicObject.cxx
vcl/source/graphic/UnoGraphicProvider.cxx
vcl/source/graphic/UnoGraphicTransformer.cxx
vcl/source/graphic/grfattr.cxx
vcl/source/graphic/grfcache.cxx
vcl/source/graphic/grfcache.hxx
vcl/source/helper/canvasbitmap.cxx
vcl/source/helper/canvastools.cxx
vcl/source/helper/commandinfoprovider.cxx
......
......@@ -38,9 +38,7 @@ class GraphicObjectTest: public test::BootstrapFixture, public unotest::MacrosTe
public:
void testSwap();
void testSizeBasedAutoSwap();
void testTdf88836();
void testTdf88935();
void testPdf();
......@@ -57,9 +55,7 @@ private:
private:
CPPUNIT_TEST_SUITE(GraphicObjectTest);
CPPUNIT_TEST(testSwap);
CPPUNIT_TEST(testSizeBasedAutoSwap);
CPPUNIT_TEST(testTdf88836);
CPPUNIT_TEST(testTdf88935);
CPPUNIT_TEST(testPdf);
CPPUNIT_TEST_SUITE_END();
};
......@@ -147,92 +143,6 @@ void GraphicObjectTest::testSwap()
}
}
void GraphicObjectTest::testSizeBasedAutoSwap()
{
// Set cache size to a very small value to check what happens
{
std::shared_ptr< comphelper::ConfigurationChanges > aBatch(comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::set(sal_Int32(1), aBatch);
aBatch->commit();
}
uno::Reference< lang::XComponent > xComponent =
loadFromDesktop(m_directories.getURLFromSrc("svtools/qa/unit/data/document_with_two_images.odt"), "com.sun.star.text.TextDocument");
SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(xComponent.get());
CPPUNIT_ASSERT(pTxtDoc);
SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc();
CPPUNIT_ASSERT(pDoc);
SwNodes& aNodes = pDoc->GetNodes();
// Find images
const GraphicObject* pGrafObj1 = nullptr;
const GraphicObject* pGrafObj2 = nullptr;
for( sal_uLong nIndex = 0; nIndex < aNodes.Count(); ++nIndex)
{
if( aNodes[nIndex]->IsGrfNode() )
{
SwGrfNode* pGrfNode = aNodes[nIndex]->GetGrfNode();
CPPUNIT_ASSERT(pGrfNode);
if( !pGrafObj1 )
{
pGrafObj1 = &pGrfNode->GetGrfObj();
}
else
{
pGrafObj2 = &pGrfNode->GetGrfObj();
}
}
}
CPPUNIT_ASSERT_MESSAGE("Missing image", pGrafObj1 != nullptr && pGrafObj2 != nullptr);
{
// First image should be swapped out
CPPUNIT_ASSERT(pGrafObj1->IsSwappedOut());
CPPUNIT_ASSERT_EQUAL(sal_uLong(697230), pGrafObj1->GetSizeBytes());
// Still swapped out: size is cached
CPPUNIT_ASSERT(pGrafObj1->IsSwappedOut());
}
{
// Second image should be in the memory
// Size based swap out is triggered by swap in, so the last swapped in image should be
// in the memory despite of size limit is reached.
CPPUNIT_ASSERT(!pGrafObj2->IsSwappedOut());
CPPUNIT_ASSERT_EQUAL(sal_uLong(1620000), pGrafObj2->GetSizeBytes());
}
// Swap in first image -> second image will be swapped out
{
pGrafObj1->GetGraphic(); // GetGraphic calls swap in on a const object
CPPUNIT_ASSERT(!pGrafObj1->IsSwappedOut());
CPPUNIT_ASSERT(pGrafObj2->IsSwappedOut());
}
// Swap in second image -> first image will be swapped out
{
pGrafObj2->GetGraphic(); // GetGraphic calls swap in on a const object
CPPUNIT_ASSERT(!pGrafObj2->IsSwappedOut());
CPPUNIT_ASSERT(pGrafObj1->IsSwappedOut());
}
// Use bigger cache
{
GraphicManager& rGrfMgr = pGrafObj1->GetGraphicManager();
rGrfMgr.SetMaxCacheSize((pGrafObj1->GetSizeBytes()+pGrafObj2->GetSizeBytes())*10);
}
// Swap in both images -> both should be swapped in
{
pGrafObj1->GetGraphic();
pGrafObj2->GetGraphic();
CPPUNIT_ASSERT(!pGrafObj1->IsSwappedOut());
CPPUNIT_ASSERT(!pGrafObj2->IsSwappedOut());
}
xComponent->dispose();
}
void GraphicObjectTest::testTdf88836()
{
// Construction with empty bitmap -> type should be GraphicType::NONE
......@@ -242,73 +152,6 @@ void GraphicObjectTest::testTdf88836()
CPPUNIT_ASSERT_EQUAL(int(GraphicType::NONE), int(aGraphic.GetType()));
}
void GraphicObjectTest::testTdf88935()
{
// Cache size was not updated by deletion of graphic objects
// Load a file with two images
uno::Reference< lang::XComponent > xComponent =
loadFromDesktop(m_directories.getURLFromSrc("svtools/qa/unit/data/document_with_two_images.odt"), "com.sun.star.text.TextDocument");
SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(xComponent.get());
CPPUNIT_ASSERT(pTxtDoc);
SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc();
CPPUNIT_ASSERT(pDoc);
SwNodes& aNodes = pDoc->GetNodes();
// Find images
const GraphicObject* pGraphObj1 = nullptr;
const GraphicObject* pGraphObj2 = nullptr;
for( sal_uLong nIndex = 0; nIndex < aNodes.Count(); ++nIndex)
{
if( aNodes[nIndex]->IsGrfNode() )
{
SwGrfNode* pGrfNode = aNodes[nIndex]->GetGrfNode();
CPPUNIT_ASSERT(pGrfNode);
if( !pGraphObj1 )
{
pGraphObj1 = &pGrfNode->GetGrfObj();
}
else
{
pGraphObj2 = &pGrfNode->GetGrfObj();
}
}
}
CPPUNIT_ASSERT_MESSAGE("Missing image", pGraphObj1 != nullptr && pGraphObj2 != nullptr);
// Set cache size
{
GraphicManager& rGrfMgr = pGraphObj1->GetGraphicManager();
rGrfMgr.SetMaxCacheSize((pGraphObj1->GetSizeBytes()+pGraphObj2->GetSizeBytes())*10);
}
// Both images fit into the cache
{
pGraphObj1->GetGraphic();
pGraphObj2->GetGraphic();
CPPUNIT_ASSERT(!pGraphObj1->IsSwappedOut());
CPPUNIT_ASSERT(!pGraphObj2->IsSwappedOut());
}
// Create and remove some copy of the first image
for( int i = 0; i < 50; ++i )
{
GraphicObject aGraphObj3(*pGraphObj1);
CPPUNIT_ASSERT(aGraphObj3.SwapOut());
CPPUNIT_ASSERT(aGraphObj3.SwapIn());
}
// Both images fit into the cache
{
pGraphObj1->GetGraphic();
pGraphObj2->GetGraphic();
CPPUNIT_ASSERT(!pGraphObj1->IsSwappedOut());
CPPUNIT_ASSERT(!pGraphObj2->IsSwappedOut());
}
xComponent->dispose();
}
void GraphicObjectTest::testPdf()
{
#if HAVE_FEATURE_PDFIUM
......
......@@ -743,29 +743,8 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
case RES_GRF_REREAD_AND_INCACHE:
if( SwNodeType::Grf == GetNode()->GetNodeType() )
{
// TODO: Remove - due to GraphicObject refactoring
bComplete = false;
SwGrfNode* pNd = static_cast<SwGrfNode*>( GetNode());
SwViewShell* pVSh = pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
if( pVSh )
{
GraphicAttr aAttr;
if( pNd->GetGrfObj().IsCached( pVSh->GetOut(),
getFramePrintArea().SSize(), &pNd->GetGraphicAttr( aAttr, this ) ))
{
for(SwViewShell& rShell : pVSh->GetRingContainer())
{
SET_CURR_SHELL( &rShell );
if( rShell.GetWin() )
{
if( rShell.IsPreview() )
::RepaintPagePreview( &rShell, getFrameArea().SVRect() );
else
rShell.GetWin()->Invalidate( getFrameArea().SVRect() );
}
}
}
}
}
break;
......
......@@ -304,7 +304,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/graphic/GraphicLoader \
vcl/source/graphic/GraphicObject \
vcl/source/graphic/GraphicObject2 \
vcl/source/graphic/grfcache \
vcl/source/graphic/grfattr \
vcl/source/graphic/UnoGraphic \
vcl/source/graphic/UnoGraphicDescriptor \
......
......@@ -31,9 +31,35 @@ class GfxLink;
struct ImpSwapFile;
class GraphicConversionParameters;
class GraphicID
{
private:
sal_uInt32 mnID1;
sal_uInt32 mnID2;
sal_uInt32 mnID3;
BitmapChecksum mnID4;
public:
GraphicID(ImpGraphic& rGraphic);
bool operator==(const GraphicID& rID) const
{
return rID.mnID1 == mnID1 && rID.mnID2 == mnID2 &&
rID.mnID3 == mnID3 && rID.mnID4 == mnID4;
}
bool IsEmpty() const
{
return 0 == mnID4;
}
OString getIDString() const;
};
class ImpGraphic final
{
friend class Graphic;
friend class GraphicID;
private:
......@@ -51,6 +77,7 @@ private:
VectorGraphicDataPtr maVectorGraphicData;
css::uno::Sequence<sal_Int8> maPdfData;
OUString msOriginURL;
std::unique_ptr<GraphicID> mpGraphicID;
private:
......@@ -81,6 +108,13 @@ private:
msOriginURL = rOriginURL;
}
OString getUniqueID()
{
if (!mpGraphicID)
mpGraphicID.reset(new GraphicID(*this));
return mpGraphicID->getIDString();
}
void ImplCreateSwapInfo();
void ImplClearGraphics();
void ImplClear();
......
......@@ -612,6 +612,14 @@ void Graphic::setOriginURL(OUString const & rOriginURL)
}
}
OString Graphic::getUniqueID() const
{
OString aUniqueString;
if (mxImpGraphic)
aUniqueString = mxImpGraphic->getUniqueID();
return aUniqueString;
}
namespace {
struct Id: public rtl::Static<cppu::OImplementationId, Id> {};
......
......@@ -101,6 +101,76 @@ Size GraphicReader::GetPreviewSize() const
return aSize;
}
GraphicID::GraphicID(ImpGraphic & rGraphic)
{
mnID1 = static_cast<sal_uLong>(rGraphic.ImplGetType()) << 28;
mnID2 = mnID3 = mnID4 = 0;
if (rGraphic.ImplGetType() == GraphicType::Bitmap)
{
if (rGraphic.getVectorGraphicData().get())
{
const VectorGraphicDataPtr& rVectorGraphicDataPtr = rGraphic.getVectorGraphicData();
const basegfx::B2DRange& rRange = rVectorGraphicDataPtr->getRange();
mnID1 |= rVectorGraphicDataPtr->getVectorGraphicDataArrayLength();
mnID2 = basegfx::fround(rRange.getWidth());
mnID3 = basegfx::fround(rRange.getHeight());
mnID4 = vcl_get_checksum(0, rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
}
else if (rGraphic.ImplIsAnimated())
{
const Animation aAnimation(rGraphic.ImplGetAnimation());
mnID1 |= ( aAnimation.Count() & 0x0fffffff );
mnID2 = aAnimation.GetDisplaySizePixel().Width();
mnID3 = aAnimation.GetDisplaySizePixel().Height();
mnID4 = rGraphic.ImplGetChecksum();
}
else
{
const BitmapEx aBmpEx(rGraphic.ImplGetBitmapEx(GraphicConversionParameters()));
mnID1 |= ( ( ( static_cast<sal_uLong>(aBmpEx.GetTransparentType()) << 8 ) | ( aBmpEx.IsAlpha() ? 1 : 0 ) ) & 0x0fffffff );
mnID2 = aBmpEx.GetSizePixel().Width();
mnID3 = aBmpEx.GetSizePixel().Height();
mnID4 = rGraphic.ImplGetChecksum();
}
}
else if (rGraphic.ImplGetType() == GraphicType::GdiMetafile)
{
const GDIMetaFile& rMtf = rGraphic.ImplGetGDIMetaFile();
mnID1 |= ( rMtf.GetActionSize() & 0x0fffffff );
mnID2 = rMtf.GetPrefSize().Width();
mnID3 = rMtf.GetPrefSize().Height();
mnID4 = rGraphic.ImplGetChecksum();
}
}
OString GraphicID::getIDString() const
{
static const char aHexData[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
OStringBuffer aHexStr;
sal_Int32 nShift, nIndex = 0;
aHexStr.setLength(24 + (2 * BITMAP_CHECKSUM_SIZE));
for( nShift = 28; nShift >= 0; nShift -= 4 )
aHexStr[nIndex++] = aHexData[ ( mnID1 >> static_cast<sal_uInt32>(nShift) ) & 0xf ];
for( nShift = 28; nShift >= 0; nShift -= 4 )
aHexStr[nIndex++] = aHexData[ ( mnID2 >> static_cast<sal_uInt32>(nShift) ) & 0xf ];
for( nShift = 28; nShift >= 0; nShift -= 4 )
aHexStr[nIndex++] = aHexData[ ( mnID3 >> static_cast<sal_uInt32>(nShift) ) & 0xf ];
for( nShift = ( 8 * BITMAP_CHECKSUM_SIZE ) - 4; nShift >= 0; nShift -= 4 )
aHexStr[nIndex++] = aHexData[ ( mnID4 >> static_cast<sal_uInt32>(nShift) ) & 0xf ];
return aHexStr.makeStringAndClear();
}
ImpGraphic::ImpGraphic() :
meType ( GraphicType::NONE ),
mnSizeBytes ( 0 ),
......
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_VCL_SOURCE_GRAPHIC_GRFCACHE_HXX
#define INCLUDED_VCL_SOURCE_GRAPHIC_GRFCACHE_HXX
#include <vcl/graph.hxx>
#include <vcl/timer.hxx>
#include <vector>
class GraphicAttr;
class GraphicCacheEntry;
class GraphicDisplayCacheEntry;
class GraphicObject;
class GraphicCache
{
private:
typedef std::vector< GraphicCacheEntry* > GraphicCacheEntryVector;
typedef std::vector< GraphicDisplayCacheEntry* > GraphicDisplayCacheEntryVector;
Timer maReleaseTimer;
GraphicCacheEntryVector maGraphicCache;
GraphicDisplayCacheEntryVector maDisplayCache;
sal_uLong mnReleaseTimeoutSeconds;
sal_uLong mnMaxDisplaySize;
sal_uLong mnMaxObjDisplaySize;
sal_uLong mnUsedDisplaySize;
bool ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree );
GraphicCacheEntry* ImplGetCacheEntry( const GraphicObject& rObj );
DECL_LINK( ReleaseTimeoutHdl, Timer*, void );
public:
GraphicCache(
sal_uLong nDisplayCacheSize,
sal_uLong nMaxObjDisplayCacheSize
);
~GraphicCache();
public:
void AddGraphicObject(
const GraphicObject& rObj,
Graphic& rSubstitute,
const OString* pID,
const GraphicObject* pCopyObj
);
void ReleaseGraphicObject( const GraphicObject& rObj );
void GraphicObjectWasSwappedOut( const GraphicObject& rObj );
void GraphicObjectWasSwappedIn( const GraphicObject& rObj );
OString GetUniqueID( const GraphicObject& rObj ) const;
public:
void SetMaxDisplayCacheSize( sal_uLong nNewCacheSize );
sal_uLong GetMaxDisplayCacheSize() const { return mnMaxDisplaySize; };
sal_uLong GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; }
sal_uLong GetUsedDisplayCacheSize() const { return mnUsedDisplaySize; }
sal_uLong GetFreeDisplayCacheSize() const { return( mnMaxDisplaySize - mnUsedDisplaySize ); }
void SetCacheTimeout( sal_uLong nTimeoutSeconds );
sal_uLong GetCacheTimeout() const { return mnReleaseTimeoutSeconds; }
bool IsDisplayCacheable(
OutputDevice const * pOut,
const Point& rPt,
const Size& rSz,
const GraphicObject& rObj,
const GraphicAttr& rAttr
) const;
bool IsInDisplayCache(
OutputDevice const * pOut,
const Point& rPt,
const Size& rSz,
const GraphicObject& rObj,
const GraphicAttr& rAttr
) const;
bool CreateDisplayCacheObj(
OutputDevice const * pOut,
const Point& rPt,
const Size& rSz,
const GraphicObject& rObj,
const GraphicAttr& rAttr,
const BitmapEx& rBmpEx
);
bool CreateDisplayCacheObj(
OutputDevice const * pOut,
const Point& rPt,
const Size& rSz,
const GraphicObject& rObj,
const GraphicAttr& rAttr,
const GDIMetaFile& rMtf
);
bool DrawDisplayCacheObj(
OutputDevice* pOut,
const Point& rPt,
const Size& rSz,
const GraphicObject& rObj,
const GraphicAttr& rAttr
);
};
#endif // INCLUDED_VCL_SOURCE_GRAPHIC_GRFCACHE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment