summaryrefslogtreecommitdiff
path: root/include/basegfx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-10-03 15:55:29 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-10-06 20:31:22 +0200
commite650279db77281fe98aaff28e31c2269611c31e4 (patch)
tree2e497016dbe882d7557c4ee7ff66bb8b5d582dc2 /include/basegfx
parentdd36db168c658ebe588396255ad61363cc4ea7af (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 'include/basegfx')
-rw-r--r--include/basegfx/utils/systemdependentdata.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/basegfx/utils/systemdependentdata.hxx b/include/basegfx/utils/systemdependentdata.hxx
index 920a55043870..d5cc8d645eb6 100644
--- a/include/basegfx/utils/systemdependentdata.hxx
+++ b/include/basegfx/utils/systemdependentdata.hxx
@@ -89,6 +89,12 @@ namespace basegfx
// a single, globally used one, but not necessarily
SystemDependentDataManager& mrSystemDependentDataManager;
+ // Buffered CalculatedCycles, result of estimations using
+ // getHoldCyclesInSeconds and estimateUsageInBytes, executed
+ // using getHoldCyclesInSeconds. StartValue is 0 to detect
+ // not-yet-calculated state
+ sal_uInt32 mnCalculatedCycles;
+
public:
SystemDependentData(
SystemDependentDataManager& rSystemDependentDataManager);
@@ -103,6 +109,12 @@ namespace basegfx
// using getSystemDependentDataManager()
SystemDependentDataManager& getSystemDependentDataManager() { return mrSystemDependentDataManager; }
+ // Calculate HoldCyclesInSeconds based on using
+ // getHoldCyclesInSeconds and estimateUsageInBytes, the
+ // result is crated once on-demand and buffered in
+ // mnCalculatedCycles
+ sal_uInt32 calculateCombinedHoldCyclesInSeconds() const;
+
// Number of cycles a SystemDependentDataManager should/might
// hold this instance in seconds - does not have to be used,
// but should be. Default implementation returns 60(s). Override to