[Libreoffice-commits] core.git: svx/source

Jan Holesovsky kendy at collabora.com
Mon Apr 28 02:51:05 PDT 2014


 svx/source/sdr/contact/objectcontactofpageview.cxx |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit 89e14d6c318580354081b3b3ad39188f25481ae7
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Apr 28 11:24:29 2014 +0200

    Fix repainting problems in Draw.
    
    Regression from 465730622e2eb77828c1cf4845f8e8a40b92f1b2; unfortunately the
    hierarchy can contain more than just the sdr shapes, in which case it fails to
    recognize that there is still something to paint.
    
    We need to improve the way getPrimitive2DSequenceHierarchy() works, and come
    up with a way how to cut early the primitives that are not interesting for the
    area that we are redrawing.
    
    Change-Id: Ieb2e40a576e9a394fe28f248e582c132ab5b6578

diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 019cc2c..09b37be 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include <svx/sdr/contact/objectcontactofpageview.hxx>
 #include <svx/sdr/contact/viewobjectcontactofunocontrol.hxx>
 #include <svx/svdpagv.hxx>
@@ -231,6 +233,18 @@ namespace sdr
             updateViewInformation2D(aNewViewInformation2D);
 
             drawinglayer::primitive2d::Primitive2DSequence xPrimitiveSequence;
+#if HAVE_FEATURE_DESKTOP
+            // get whole Primitive2DSequence; this will already make use of updated ViewInformation2D
+            // and may use the MapMode from the Target OutDev in the DisplayInfo
+            xPrimitiveSequence = rDrawPageVOContact.getPrimitive2DSequenceHierarchy(rDisplayInfo);
+#else
+            // HACK: this only works when we are drawing sdr shapes via
+            // drawinglayer; but it can happen that the hierarchy contains
+            // more than just the shapes, and then it fails.
+            //
+            // This is good enough for the tiled rendering for the moment, but
+            // we need to come up with with the real solution shortly.
+
             // Only get the expensive hierarchy if we can be sure that the
             // returned sequence won't be empty anyway.
             bool bGetHierarchy = rRedrawArea.IsEmpty();
@@ -254,6 +268,7 @@ namespace sdr
                 // get whole Primitive2DSequence; this will already make use of updated ViewInformation2D
                 // and may use the MapMode from the Target OutDev in the DisplayInfo
                 xPrimitiveSequence = rDrawPageVOContact.getPrimitive2DSequenceHierarchy(rDisplayInfo);
+#endif
 
             // if there is something to show, use a primitive processor to render it. There
             // is a choice between VCL and Canvas processors currently. The decision is made in


More information about the Libreoffice-commits mailing list