[Libreoffice-commits] core.git: 2 commits - vcl/source

Jan Holesovsky kendy at suse.cz
Wed Apr 24 07:28:39 PDT 2013


 vcl/source/gdi/outdev.cxx  |    9 ++++-----
 vcl/source/gdi/outdev6.cxx |    3 +++
 2 files changed, 7 insertions(+), 5 deletions(-)

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

    More places where we can suppress output.
    
    Change-Id: Ib316bf40bb9b9afeb5fbdf9281f2d3b9539e346f

diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index 2872262..f134388 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -2064,8 +2064,8 @@ void OutputDevice::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rB2DPolyPoly
 
 void OutputDevice::ImpDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly)
 {
-    // AW: Do NOT paint empty PolyPolygons
-    if(!rB2DPolyPoly.count())
+    // Do not paint empty PolyPolygons
+    if(!rB2DPolyPoly.count() || !IsDeviceOutputNecessary())
         return;
 
     // we need a graphics
@@ -2192,9 +2192,8 @@ void OutputDevice::DrawPolyLine(
         mpMetaFile->AddAction( new MetaPolyLineAction( aToolsPolygon, aLineInfo ) );
     }
 
-
-    // AW: Do NOT paint empty PolyPolygons
-    if(!rB2DPolygon.count())
+    // Do not paint empty PolyPolygons
+    if(!rB2DPolygon.count() || !IsDeviceOutputNecessary())
         return;
 
     // we need a graphics
commit 617dddda6258d63d7f2307f38322a411670e6ed8
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

diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 4297e48..c855049 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -612,6 +612,9 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
         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