summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-04-24 16:15:19 +0200
committerJan Holesovsky <kendy@suse.cz>2013-04-24 16:20:38 +0200
commit0b39358aaf723b26b5effb7245f38ad960cc609a (patch)
tree900818dfce58f195b3d69eedce6c3a5951157e14
parentf3e8a9649ac653eafaf8c5fa57e20d3dbe90d82c (diff)
fdo#59259: Suppress the expensive parts when we are only writing to metafile.
When we are launching the printing dialog, we first draw the page using drawinglayer to a metafile, and then render the metafile. Unfortunately, here we did the real operation of allocating large bitmaps, and destroying them again; all that just to throw all that away at the end of the operation. The preview sets the mbOutput to false correctly, so we can just skip the expensive parts. Change-Id: Ice77d83100eba339602bbdf374fec8546d4d1e12
-rw-r--r--vcl/source/gdi/outdev6.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 46eb689356ff..85f6ce5f70da 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -614,6 +614,9 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
if( mpMetaFile )
mpMetaFile->AddAction( new MetaFloatTransparentAction( rMtf, rPos, rSize, rTransparenceGradient ) );
+ if ( !IsDeviceOutputNecessary() )
+ return;
+
if( ( rTransparenceGradient.GetStartColor() == aBlack && rTransparenceGradient.GetEndColor() == aBlack ) ||
( mnDrawMode & ( DRAWMODE_NOTRANSPARENCY ) ) )
{