diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-06 14:59:24 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-06 14:59:24 +0000 |
commit | 1e9c0c86d3ccd5c69f644d9545c6e0c3393a110f (patch) | |
tree | 545b940c5c1eddfb63c5da09b0ab708630435cb1 /ui/gl/gl_context_cgl.cc | |
parent | 18e4f5f273933867b550eecf2a198630f00a4e18 (diff) | |
download | chromium_src-1e9c0c86d3ccd5c69f644d9545c6e0c3393a110f.zip chromium_src-1e9c0c86d3ccd5c69f644d9545c6e0c3393a110f.tar.gz chromium_src-1e9c0c86d3ccd5c69f644d9545c6e0c3393a110f.tar.bz2 |
GPU: Keep track of the last real context and real surface made current.
This allows us to set virtual contexts current, which allows us
to restore from a GLStateRestorer in Scoped{Texture,Framebuffer}Binders
with --enable-virtual-gl-contexts.
BUG=241762,163217
Review URL: https://chromiumcodereview.appspot.com/15928002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gl/gl_context_cgl.cc')
-rw-r--r-- | ui/gl/gl_context_cgl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/gl/gl_context_cgl.cc b/ui/gl/gl_context_cgl.cc index a4347e9..d826d81 100644 --- a/ui/gl/gl_context_cgl.cc +++ b/ui/gl/gl_context_cgl.cc @@ -65,7 +65,7 @@ static CGLPixelFormatObj GetPixelFormat() { } GLContextCGL::GLContextCGL(GLShareGroup* share_group) - : GLContext(share_group), + : GLContextReal(share_group), context_(NULL), gpu_preference_(PreferIntegratedGpu), discrete_pixelformat_(NULL), @@ -186,7 +186,7 @@ bool GLContextCGL::MakeCurrent(GLSurface* surface) { return false; } - SetCurrent(this, surface); + SetCurrent(surface); if (!InitializeExtensionBindings()) { ReleaseCurrent(surface); return false; @@ -205,7 +205,7 @@ void GLContextCGL::ReleaseCurrent(GLSurface* surface) { if (!IsCurrent(surface)) return; - SetCurrent(NULL, NULL); + SetCurrent(NULL); CGLSetCurrentContext(NULL); } @@ -215,7 +215,7 @@ bool GLContextCGL::IsCurrent(GLSurface* surface) { // If our context is current then our notion of which GLContext is // current must be correct. On the other hand, third-party code // using OpenGL might change the current context. - DCHECK(!native_context_is_current || (GetCurrent() == this)); + DCHECK(!native_context_is_current || (GetRealCurrent() == this)); if (!native_context_is_current) return false; |