[Libreoffice-commits] core.git: vcl/inc vcl/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 17 13:38:49 UTC 2019


 vcl/inc/opengl/zone.hxx            |    8 ++++----
 vcl/source/opengl/OpenGLHelper.cxx |    3 ---
 2 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit d52010013b9cacdd8f71e62fef18c1e679e807f2
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Sep 17 14:05:27 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Sep 17 15:37:48 2019 +0200

    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 at redhat.com>

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();
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index bc9b1c377d13..a179f3710d2c 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -794,9 +794,6 @@ bool OpenGLHelper::supportsVCLOpenGL()
     return !bDisableGL && !bBlacklisted;
 }
 
-void OpenGLZone::enter() { gnEnterCount++; }
-void OpenGLZone::leave() { gnLeaveCount++; }
-
 namespace {
     static volatile bool gbWatchdogFiring = false;
     static osl::Condition* gpWatchdogExit = nullptr;


More information about the Libreoffice-commits mailing list