diff options
author | Noel Grandin <noel@peralex.com> | 2021-12-06 15:58:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-06 19:46:10 +0100 |
commit | d2b03c4bfa284efbb45cb4904122e97439d3ee06 (patch) | |
tree | 87696527bc43ba676ff03fadf7a90f918a4a057c /include/svx/sdr | |
parent | 1c9a40299d328c78c035ca63ccdf22c5c669a03b (diff) |
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/sdr')
-rw-r--r-- | include/svx/sdr/contact/viewobjectcontact.hxx | 12 |
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; |