Index: ui/gl/gl_image_egl.cc |
diff --git a/ui/gl/gl_image_egl.cc b/ui/gl/gl_image_egl.cc |
index c0a404c98ae7d6cff096ddd93f99c6b48a23e045..df4ce31d5af0ec9c3ea10df1c9e85b24b543d4c2 100644 |
--- a/ui/gl/gl_image_egl.cc |
+++ b/ui/gl/gl_image_egl.cc |
@@ -14,12 +14,14 @@ GLImageEGL::GLImageEGL(const gfx::Size& size) |
} |
GLImageEGL::~GLImageEGL() { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
DCHECK_EQ(EGL_NO_IMAGE_KHR, egl_image_); |
} |
bool GLImageEGL::Initialize(EGLenum target, |
EGLClientBuffer buffer, |
const EGLint* attrs) { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
DCHECK_EQ(EGL_NO_IMAGE_KHR, egl_image_); |
egl_image_ = eglCreateImageKHR(GLSurfaceEGL::GetHardwareDisplay(), |
EGL_NO_CONTEXT, |
@@ -35,6 +37,7 @@ bool GLImageEGL::Initialize(EGLenum target, |
} |
void GLImageEGL::Destroy(bool have_context) { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
if (egl_image_ != EGL_NO_IMAGE_KHR) { |
EGLBoolean result = |
eglDestroyImageKHR(GLSurfaceEGL::GetHardwareDisplay(), egl_image_); |
@@ -49,6 +52,7 @@ void GLImageEGL::Destroy(bool have_context) { |
gfx::Size GLImageEGL::GetSize() { return size_; } |
bool GLImageEGL::BindTexImage(unsigned target) { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
DCHECK_NE(EGL_NO_IMAGE_KHR, egl_image_); |
glEGLImageTargetTexture2DOES(target, egl_image_); |
DCHECK_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); |