summaryrefslogtreecommitdiffstats
path: root/gpu/config/gpu_info_collector_android.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/config/gpu_info_collector_android.cc')
-rw-r--r--gpu/config/gpu_info_collector_android.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/gpu/config/gpu_info_collector_android.cc b/gpu/config/gpu_info_collector_android.cc
index 79428a1..03f357e 100644
--- a/gpu/config/gpu_info_collector_android.cc
+++ b/gpu/config/gpu_info_collector_android.cc
@@ -65,23 +65,19 @@ 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) {
+ 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_))
LOG(WARNING) << "Failed to restore EGL context";
- }
}
}