summaryrefslogtreecommitdiff
path: root/include/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2016-07-01 15:40:00 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-07-07 22:32:39 +0200
commit4609380bb0bde0d4437b72b752c1c24ee2950361 (patch)
treed5083eb62aa8f5717997274cecf4011e8f5b8126 /include/drawinglayer
parentc1f476d91805e6a9573bba3ea8f5f980e0ea7b54 (diff)
tdf#82214 optimize performance for primitives
See svg bug doc, which is processed quite slowly. Beyond needing faster renderers, there is also demand to improve the handling of primitives created by SVG import. Conflicts: drawinglayer/source/primitive2d/patternfillprimitive2d.cxx vcl/win/gdi/gdiimpl.cxx Change-Id: I10992a5746b8b2d6b50e3ee3fe415a035685c9ba
Diffstat (limited to 'include/drawinglayer')
-rw-r--r--include/drawinglayer/primitive2d/patternfillprimitive2d.hxx20
-rw-r--r--include/drawinglayer/texture/texture.hxx6
2 files changed, 24 insertions, 2 deletions
diff --git a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
index bdd8bbe35d4a..8e10564251b8 100644
--- a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
@@ -42,9 +42,24 @@ namespace drawinglayer
{
private:
const basegfx::B2DPolyPolygon maMask;
- const Primitive2DContainer maChildren;
+ const Primitive2DContainer maChildren;
const basegfx::B2DRange maReferenceRange;
+ /// values holding the discrete buffer size
+ sal_uInt32 mnDiscreteWidth;
+ sal_uInt32 mnDiscreteHeight;
+
+ /// helper that is capable to calculate the needed discrete buffer size for
+ /// eventually buffered content
+ void calculateNeededDiscreteBufferSize(
+ sal_uInt32& rWidth,
+ sal_uInt32& rHeight,
+ const geometry::ViewInformation2D& rViewInformation) const;
+
+ /// helper which creates the content - checks if clipping is needed and eventually
+ /// creates buffered content to speed up rendering
+ Primitive2DContainer createContent(const geometry::ViewInformation2D& rViewInformation) const;
+
protected:
/// create local decomposition
virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
@@ -67,6 +82,9 @@ namespace drawinglayer
/// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
+ /// overload to react on evtl. buffered content
+ virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+
/// provide unique ID
DeclPrimitive2DIDBlock()
};
diff --git a/include/drawinglayer/texture/texture.hxx b/include/drawinglayer/texture/texture.hxx
index bbe620433a00..b4d78ba7a635 100644
--- a/include/drawinglayer/texture/texture.hxx
+++ b/include/drawinglayer/texture/texture.hxx
@@ -324,6 +324,9 @@ namespace drawinglayer
double mfOffsetX;
double mfOffsetY;
+ private:
+ sal_Int32 iterateTiles(::std::vector< basegfx::B2DHomMatrix >* pMatrices) const;
+
public:
GeoTexSvxTiled(
const basegfx::B2DRange& rRange,
@@ -334,7 +337,8 @@ namespace drawinglayer
// compare operator
virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const override;
- void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
+ void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices) const;
+ sal_uInt32 getNumberOfTiles() const;
};
} // end of namespace texture
} // end of namespace drawinglayer