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

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: address nits 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..c0a404c98ae7d6cff096ddd93f99c6b48a23e045 100644
--- a/ui/gl/gl_image_egl.cc
+++ b/ui/gl/gl_image_egl.cc
@@ -4,6 +4,7 @@
#include "ui/gl/gl_image_egl.h"
+#include "ui/gl/egl_util.h"
#include "ui/gl/gl_surface_egl.h"
namespace gfx {
@@ -26,8 +27,7 @@ bool GLImageEGL::Initialize(EGLenum target,
buffer,
attrs);
if (egl_image_ == EGL_NO_IMAGE_KHR) {
- EGLint error = eglGetError();
- LOG(ERROR) << "Error creating EGLImage: " << error;
+ DLOG(ERROR) << "Error creating EGLImage: " << ui::GetLastEGLErrorString();
return false;
}
@@ -36,7 +36,12 @@ bool GLImageEGL::Initialize(EGLenum target,
void GLImageEGL::Destroy(bool have_context) {
if (egl_image_ != EGL_NO_IMAGE_KHR) {
- eglDestroyImageKHR(GLSurfaceEGL::GetHardwareDisplay(), egl_image_);
+ EGLBoolean result =
+ eglDestroyImageKHR(GLSurfaceEGL::GetHardwareDisplay(), egl_image_);
+ if (result == EGL_FALSE) {
+ DLOG(ERROR) << "Error destroying EGLImage: "
+ << ui::GetLastEGLErrorString();
+ }
egl_image_ = EGL_NO_IMAGE_KHR;
}
}
« 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