[Libreoffice-commits] core.git: Branch 'libreoffice-4-0-3' - vcl/source

Jan Holesovsky kendy at suse.cz
Fri Apr 26 01:23:39 PDT 2013


 vcl/source/gdi/outdev6.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit e8e94a05fcc4906e06f0f283432b73470974d588
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Apr 24 16:15:19 2013 +0200

    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 at documentfoundation.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 46eb689..85f6ce5 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 ) ) )
     {


More information about the Libreoffice-commits mailing list