summaryrefslogtreecommitdiff
path: root/vcl/inc/opengl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-09-17 14:05:27 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-09-17 15:37:48 +0200
commitd52010013b9cacdd8f71e62fef18c1e679e807f2 (patch)
tree5d46bea23ed30dede27da79a4f1ea4d5ff350b87 /vcl/inc/opengl
parent5c386a41c3cf416ed878f5ea6ece8f15990bd613 (diff)
Consolidate places that manipulate OpenGLZone::gnEnter/LeaveCount directly
(keeping the inline'd-ness of what the OpenGLZone ctor/dtor do, in case that might actually be relevant for performance) Change-Id: I411b83d1b99ed46b35857c7cca10f95dbc1c8e27 Reviewed-on: https://gerrit.libreoffice.org/79062 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/inc/opengl')
-rw-r--r--vcl/inc/opengl/zone.hxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/inc/opengl/zone.hxx b/vcl/inc/opengl/zone.hxx
index 8aeabcf8b40f..d4d478bff411 100644
--- a/vcl/inc/opengl/zone.hxx
+++ b/vcl/inc/opengl/zone.hxx
@@ -29,11 +29,11 @@ class VCL_DLLPUBLIC OpenGLZone {
/// how many times have we left a new GL zone
static volatile sal_uInt64 gnLeaveCount;
- static void enter();
- static void leave();
+ static void enter() { gnEnterCount++; }
+ static void leave() { gnLeaveCount++; }
public:
- OpenGLZone() { gnEnterCount++; }
- ~OpenGLZone() { gnLeaveCount++; }
+ OpenGLZone() { enter(); }
+ ~OpenGLZone() { leave(); }
static bool isInZone() { return gnEnterCount != gnLeaveCount; }
static void hardDisable();
static void relaxWatchdogTimings();