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

Jan Holesovsky kendy at suse.cz
Wed Apr 24 07:21:03 PDT 2013


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

New commits:
commit 1035150cea85678075583deda612dde52867c125
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 d34cea9..2f4cf0c 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -2175,8 +2175,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
@@ -2306,9 +2306,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 0b39358aaf723b26b5effb7245f38ad960cc609a
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 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