summaryrefslogtreecommitdiff
path: root/svtools/source/graphic/grfmgr2.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-06-22 13:57:39 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-06-22 16:50:18 +0200
commit0c10b8ff9fa115ec2c315bd75a9eddc1cd4c0ac2 (patch)
tree7cd00463a87a473ce3595fbafb8fe3252c53e634 /svtools/source/graphic/grfmgr2.cxx
parenta83bf946d6e1f315a19ce6e6c9b5ddcb30926a22 (diff)
make it possible to cache the resulting pixmap with a metafile
If the metafile contains just one single bitmap, the drawing code optimizes by just using that one bitmap. It (=the resulting pixmap after scaling etc.) however has not been cached so far, which means smoothscaling (to be done) would be quite slow with every paint. Change-Id: I30950c55fbadfddedc7df31283c66ed064b1a1a6
Diffstat (limited to 'svtools/source/graphic/grfmgr2.cxx')
-rw-r--r--svtools/source/graphic/grfmgr2.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index bd77e25326b6..a03c668f5de1 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -536,6 +536,7 @@ static BitmapEx checkMetadataBitmap( const BitmapEx& rBmpEx,
const Size& rRefSize,
bool& o_rbNonBitmapActionEncountered )
{
+// NOTE: If you do changes in this function, change checkMetadataBitmap() in grfcache.cxx too.
BitmapEx aBmpEx;
if( rSrcSize == Size())
rSrcSize = rBmpEx.GetSizePixel();
@@ -609,6 +610,9 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
const MapMode rPrefMapMode( rMtf.GetPrefMapMode() );
const Size rSizePix( pOut->LogicToPixel( aNewSize, rPrefMapMode ) );
+// NOTE: If you do changes in this function, check GraphicDisplayCacheEntry::IsCacheableAsBitmap
+// in grfcache.cxx too.
+
// Determine whether the metafile basically displays
// a single bitmap (in which case that bitmap is simply used directly
// instead of playing the metafile). Note that