summaryrefslogtreecommitdiffstats
path: root/include/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-12-06 15:58:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-06 19:46:10 +0100
commitd2b03c4bfa284efbb45cb4904122e97439d3ee06 (patch)
tree87696527bc43ba676ff03fadf7a90f918a4a057c /include/svx
parentgbuild: create services.rdb from built components (diff)
downloadcore-d2b03c4bfa284efbb45cb4904122e97439d3ee06.tar.gz
core-d2b03c4bfa284efbb45cb4904122e97439d3ee06.zip
Revert "lose the caching in ViewObjectContact" because it breaks...
bitmap caching. Added some notes for future would-be optimizers. This reverts commit 7f02cb80ac2075b65ee1adee4e29d1d5c4819424. Change-Id: I39c41ea95d23d4a65edd3cef46a5d86fab48a044 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126425 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/sdr/contact/viewobjectcontact.hxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/svx/sdr/contact/viewobjectcontact.hxx b/include/svx/sdr/contact/viewobjectcontact.hxx
index 56deadd59afe..f13f247e55c2 100644
--- a/include/svx/sdr/contact/viewobjectcontact.hxx
+++ b/include/svx/sdr/contact/viewobjectcontact.hxx
@@ -48,6 +48,11 @@ private:
// This range defines the object's BoundRect
basegfx::B2DRange maObjectRange;
+ // PrimitiveSequence of the ViewContact. This contains all necessary information
+ // for the graphical visualisation and needs to be supported by all VCs which
+ // can be visualized.
+ drawinglayer::primitive2d::Primitive2DContainer mxPrimitive2DSequence;
+
// the PrimitiveAnimation if Primitive2DContainer contains animations
std::unique_ptr<sdr::animation::PrimitiveAnimation> mpPrimitiveAnimation;
@@ -64,7 +69,7 @@ protected:
// Called from getPrimitive2DSequence() when vector has changed. Evaluate object animation
// and setup accordingly
- void checkForPrimitive2DAnimations(const drawinglayer::primitive2d::Primitive2DContainer& );
+ void checkForPrimitive2DAnimations();
// This method is responsible for creating the graphical visualisation data which is
// stored/cached in the local primitive. Default gets view-independent Primitive
@@ -73,6 +78,9 @@ protected:
// This method will not handle included hierarchies and not check geometric visibility.
virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const;
+ // method for flushing Primitive2DContainer for VOC implementations
+ void flushPrimitive2DSequence() { mxPrimitive2DSequence.clear(); }
+
public:
// basic constructor.
ViewObjectContact(ObjectContact& rObjectContact, ViewContact& rViewContact);
@@ -103,7 +111,7 @@ public:
// access to the local primitive. This will ensure that the local primitive is
// current in comparing the local one with a fresh created incarnation
// This method will not handle included hierarchies and not check visibility.
- drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+ drawinglayer::primitive2d::Primitive2DContainer const & getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
// test this VOC for visibility concerning model-view stuff like e.g. Layer
virtual bool isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const;