diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-14 15:05:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-27 08:48:19 +0200 |
commit | 3cbe3a0259bea4dec70e72191ec3c03441926a07 (patch) | |
tree | 27427224390a9d529e983f459ab0a30d4b531701 /include/drawinglayer | |
parent | cab2f3790517c6f2c77686869b305d66a1e04fb9 (diff) |
tdf#101083 speed up SVG rendering with pattern fill
By pushing the work down to the vcl layer, which has much more
efficient ways of dump lots of copies of a single image
Change-Id: Ie83fa56828df91a23b4b29934360ad80d1793c3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117162
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/drawinglayer')
-rw-r--r-- | include/drawinglayer/primitive2d/patternfillprimitive2d.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx index 9220209306b0..f9c183f41ad6 100644 --- a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx @@ -22,6 +22,7 @@ #include <drawinglayer/drawinglayerdllapi.h> #include <drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> +#include <vcl/bitmapex.hxx> namespace drawinglayer::primitive2d @@ -85,6 +86,17 @@ namespace drawinglayer::primitive2d // XAccounting virtual sal_Int64 SAL_CALL estimateUsage() override; + + /// helper which creates the content - checks if clipping is needed and eventually + /// creates buffered content to speed up rendering + BitmapEx createTileImage(sal_uInt32 nWidth, sal_uInt32 nHeight) const; + + /// helper that is capable to calculate the needed discrete buffer size for + /// eventually buffered content + void getTileSize( + sal_uInt32& rWidth, + sal_uInt32& rHeight, + const geometry::ViewInformation2D& rViewInformation) const; }; } // end of namespace drawinglayer::primitive2d |