summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-04-24 16:15:19 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-04-26 08:23:19 +0000
commite8e94a05fcc4906e06f0f283432b73470974d588 (patch)
tree9f731b369b895475eaa553d95474f00ebb5bbc6e /vcl/source
parent63397e1e699845e92e3046fd50bbbdcba6512a32 (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 Reviewed-on: https://gerrit.libreoffice.org/3597 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-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 ) ) )
{