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

Unified Diff: ui/gl/gl_image_egl.cc

Issue 1066483003: gpu: Log a failure in GLImageEGL::Destroy() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_egl.cc
diff --git a/ui/gl/gl_image_egl.cc b/ui/gl/gl_image_egl.cc
index b8ee78c3a371575a33b9bbb8fa4d02678bf01333..9f90a16bcaedcde434742d7aa0b26dcbdc126768 100644
--- a/ui/gl/gl_image_egl.cc
+++ b/ui/gl/gl_image_egl.cc
@@ -27,7 +27,7 @@ bool GLImageEGL::Initialize(EGLenum target,
attrs);
if (egl_image_ == EGL_NO_IMAGE_KHR) {
EGLint error = eglGetError();
reveman 2015/04/07 13:36:52 nit: This call to eglGetError() will be unnecessar
dshwang 2015/04/07 14:44:50 Done.
- LOG(ERROR) << "Error creating EGLImage: " << error;
+ DLOG(ERROR) << "Error creating EGLImage: " << error;
return false;
}
@@ -36,8 +36,13 @@ bool GLImageEGL::Initialize(EGLenum target,
void GLImageEGL::Destroy(bool have_context) {
if (egl_image_ != EGL_NO_IMAGE_KHR) {
- eglDestroyImageKHR(GLSurfaceEGL::GetHardwareDisplay(), egl_image_);
+ bool result =
reveman 2015/04/07 13:36:52 nit: is "bool" really the correct return type? if
dshwang 2015/04/07 14:44:50 Done.
+ eglDestroyImageKHR(GLSurfaceEGL::GetHardwareDisplay(), egl_image_);
egl_image_ = EGL_NO_IMAGE_KHR;
reveman 2015/04/07 13:36:52 nit: I prefer if you reset egl_image_ below the er
dshwang 2015/04/07 14:44:50 Done.
+ if (result == EGL_FALSE) {
+ EGLint error = eglGetError();
reveman 2015/04/07 13:36:52 nit: unnecessary call to eglGetError() if DLOG is
dshwang 2015/04/07 14:44:50 Done.
+ DLOG(ERROR) << "Error destroying EGLImage: " << error;
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698