| 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_;
|
| }
|
|
|