diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-12-08 16:44:19 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-01-07 06:17:45 +0000 |
commit | 342930aaa26ec1a66f432435c7b0f962007b44a8 (patch) | |
tree | f9c97ed903abf7f8bd11260013a4cd80a3e07050 /include | |
parent | f1d55069f1997e40fa20a5251d450eefe9171268 (diff) |
vcl: opengl - Kill the last glErrors on common paths.
Re-work the makeSomeOpenGLContextCurrent logic into a shared function
with the existing AcquireContext logic in the SalOpenGLGraphics impl.
Use an OpenGLVCLContextZone placeholder to do both context and zone
management - to include destructors into the zone.
Fix a number of error cases around SalBitmaps where we did not have
a GL context associated when allocating, and/or freeing textures..
Don't drag a (potentially) slower context around in the
OpenGLSalBitmap when we're going to check / fetch a better VCL
context anyway.
Remove ScaleOp pieces to synchronize with master for maintenance.
Change-Id: Ibbb2358c47156cd078ad28b6aad4f03af36aaf23
Reviewed-on: https://gerrit.libreoffice.org/21149
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/opengl/OpenGLContext.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index a6d753f0a391..a565f5be6981 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -177,6 +177,11 @@ public: static void prepareForYield(); /// Is there a current GL context ? static bool hasCurrent(); + + /// make a VCL context (any context) current, create it if necessary. + static void makeVCLCurrent(); + /// fetch any VCL context, creating one if @bMakeIfNecessary is set. + static rtl::Reference<OpenGLContext> getVCLContext(bool bMakeIfNecessary = true); /// make this GL context current - so it is implicit in subsequent GL calls void makeCurrent(); /// Put this GL context to the end of the context list. |