diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-10-03 15:55:29 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-10-06 20:31:22 +0200 |
commit | e650279db77281fe98aaff28e31c2269611c31e4 (patch) | |
tree | 2e497016dbe882d7557c4ee7ff66bb8b5d582dc2 /vcl/headless | |
parent | dd36db168c658ebe588396255ad61363cc4ea7af (diff) |
Support estimateUsageInBytes for SystemDependentData
Change-Id: I6074035ed8f90e452915e9ecffdbe9363375e126
Reviewed-on: https://gerrit.libreoffice.org/61306
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/svpgdi.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index b1f622904b5f..e42eb3ed3eaa 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -1056,6 +1056,8 @@ public: cairo_path_t* getCairoPath() { return mpCairoPath; } bool getNoJoin() const { return mbNoJoin; } bool getAntiAliasB2DDraw() const { return mbAntiAliasB2DDraw; } + + virtual sal_Int64 estimateUsageInBytes() const override; }; SystemDependentData_CairoPath::SystemDependentData_CairoPath( @@ -1079,6 +1081,22 @@ SystemDependentData_CairoPath::~SystemDependentData_CairoPath() } } +sal_Int64 SystemDependentData_CairoPath::estimateUsageInBytes() const +{ + sal_Int64 nRetval(0); + + if(nullptr != mpCairoPath) + { + // per node + // - num_data incarnations of + // - sizeof(cairo_path_data_t) which is a union of defines and point data + // thus may 2 x sizeof(double) + nRetval = mpCairoPath->num_data * sizeof(cairo_path_data_t); + } + + return nRetval; +} + bool SvpSalGraphics::drawPolyLine( const basegfx::B2DHomMatrix& rObjectToDevice, const basegfx::B2DPolygon& rPolyLine, |