diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-04-28 11:24:29 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-04-28 11:45:30 +0200 |
commit | 89e14d6c318580354081b3b3ad39188f25481ae7 (patch) | |
tree | a6aa569a9cc1a3cbdbdc4e29f0e5c035e553d145 /svx | |
parent | 0087fc02ec179f9a5e189bdb256bb9b80d027ca9 (diff) |
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
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/contact/objectcontactofpageview.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 019cc2c79f34..09b37be1d85b 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 |