| 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..ecec41fcdeef54fdb8bd4b24acff56e8365cd2d0 100644
|
| --- a/ui/gl/gl_image_egl.cc
|
| +++ b/ui/gl/gl_image_egl.cc
|
| @@ -13,12 +13,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) {
|
| eglDestroyImageKHR(GLSurfaceEGL::GetHardwareDisplay(), egl_image_);
|
| egl_image_ = EGL_NO_IMAGE_KHR;
|
| @@ -44,6 +47,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());
|
|
|