Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: ui/gfx/gl/gl_context_egl.cc

Issue 6880218: Removed "compositor" child window that was created by the GPU process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/gl/gl_context_egl.h ('k') | ui/gfx/gl/gl_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gl/gl_context_egl.cc
===================================================================
--- ui/gfx/gl/gl_context_egl.cc (revision 83213)
+++ ui/gfx/gl/gl_context_egl.cc (working copy)
@@ -111,9 +111,20 @@
return true;
}
+void GLContextEGL::ReleaseCurrent() {
+ if (!IsCurrent())
+ return;
+
+ eglMakeCurrent(GLSurfaceEGL::GetDisplay(),
+ EGL_NO_SURFACE,
+ EGL_NO_SURFACE,
+ EGL_NO_CONTEXT);
+}
+
bool GLContextEGL::IsCurrent() {
DCHECK(context_);
- return context_ == eglGetCurrentContext();
+ return context_ == eglGetCurrentContext() &&
+ surface_->GetHandle() == eglGetCurrentSurface(EGL_DRAW);
}
bool GLContextEGL::IsOffscreen() {
@@ -131,6 +142,11 @@
return surface_->GetSize();
}
+GLSurface* GLContextEGL::GetSurface() {
+ // TODO(apatrick): remove this from GLContext interface.
+ return surface_.get();
+}
+
void* GLContextEGL::GetHandle() {
return context_;
}
« no previous file with comments | « ui/gfx/gl/gl_context_egl.h ('k') | ui/gfx/gl/gl_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698