Chromium Code Reviews| Index: gpu/config/gpu_info_collector_android.cc |
| diff --git a/gpu/config/gpu_info_collector_android.cc b/gpu/config/gpu_info_collector_android.cc |
| index 79428a1a62ce2ac556b90661a1f99f5d13ce5e83..8d692e04203f52241e529878a1af99816e0cc99f 100644 |
| --- a/gpu/config/gpu_info_collector_android.cc |
| +++ b/gpu/config/gpu_info_collector_android.cc |
| @@ -65,23 +65,15 @@ ScopedRestoreNonOwnedEGLContext::ScopedRestoreNonOwnedEGLContext() |
| // Chromium native code, but created by Android system itself. |
| DCHECK(!gfx::GLContext::GetCurrent()); |
| - if (gfx::GLSurface::InitializeOneOff()) { |
| - context_ = eglGetCurrentContext(); |
| - display_ = eglGetCurrentDisplay(); |
| - draw_surface_ = eglGetCurrentSurface(EGL_DRAW); |
| - read_surface_ = eglGetCurrentSurface(EGL_READ); |
| - } |
| + context_ = eglGetCurrentContext(); |
| + display_ = eglGetCurrentDisplay(); |
| + draw_surface_ = eglGetCurrentSurface(EGL_DRAW); |
| + read_surface_ = eglGetCurrentSurface(EGL_READ); |
| } |
| ScopedRestoreNonOwnedEGLContext::~ScopedRestoreNonOwnedEGLContext() { |
| - if (context_ == EGL_NO_CONTEXT || display_ == EGL_NO_DISPLAY || |
| - draw_surface_ == EGL_NO_SURFACE || read_surface_ == EGL_NO_SURFACE) { |
| - return; |
| - } |
| - |
| - if (!eglMakeCurrent(display_, draw_surface_, read_surface_, context_)) { |
| + if (!eglMakeCurrent(display_, draw_surface_, read_surface_, context_)) |
|
no sievers
2014/01/29 02:00:22
I think display_ at least might have to be valid.
no sievers
2014/01/29 02:14:58
Or you can do something like this:
if (display_ =
danakj
2014/01/29 19:05:59
Ok I've put back the early out as we discussed, to
|
| LOG(WARNING) << "Failed to restore EGL context"; |
| - } |
| } |
| } |