diff options
author | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-11 14:24:40 +0000 |
---|---|---|
committer | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-11 14:24:40 +0000 |
commit | 3d09c41344ee937ac4d3d24a13b83ecd01590e02 (patch) | |
tree | b8a83762c8ea40d3fe09958d005fc9b58ef3e6b0 /content/browser/renderer_host/compositing_iosurface_context_mac.h | |
parent | dcb5e5b690370d53c77805bb421fb3b2ef6e29ab (diff) | |
download | chromium_src-3d09c41344ee937ac4d3d24a13b83ecd01590e02.zip chromium_src-3d09c41344ee937ac4d3d24a13b83ecd01590e02.tar.gz chromium_src-3d09c41344ee937ac4d3d24a13b83ecd01590e02.tar.bz2 |
Use base::ScopedTypeRef for CGL types.
Use gfx::ScopedCGLSetCurrentContext for setting the current
context in the browser process. When calling CGLSetCurrentContext,
the pre-existing code inconsitently did either of restoring the
context, setting the context to NULL, or leaving the context set.
This makes the behavior consistent. It also makes error checking
pervasive.
BUG=245900
Review URL: https://codereview.chromium.org/147493011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/compositing_iosurface_context_mac.h')
-rw-r--r-- | content/browser/renderer_host/compositing_iosurface_context_mac.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/content/browser/renderer_host/compositing_iosurface_context_mac.h b/content/browser/renderer_host/compositing_iosurface_context_mac.h index 4abb008..357925b 100644 --- a/content/browser/renderer_host/compositing_iosurface_context_mac.h +++ b/content/browser/renderer_host/compositing_iosurface_context_mac.h @@ -15,6 +15,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "content/browser/renderer_host/display_link_mac.h" +#include "ui/gl/scoped_cgl.h" namespace content { @@ -60,7 +61,7 @@ class CompositingIOSurfaceContext CompositingIOSurfaceContext( int window_number, NSOpenGLContext* nsgl_context, - CGLContextObj clg_context_strong, + base::ScopedTypeRef<CGLContextObj> clg_context_strong, CGLContextObj clg_context, bool is_vsync_disabled_, scoped_refptr<DisplayLinkMac> display_link, @@ -69,7 +70,7 @@ class CompositingIOSurfaceContext int window_number_; base::scoped_nsobject<NSOpenGLContext> nsgl_context_; - CGLContextObj cgl_context_strong_; + base::ScopedTypeRef<CGLContextObj> cgl_context_strong_; // Weak, backed by |nsgl_context_| or |cgl_context_strong_|. CGLContextObj cgl_context_; |