| Index: ui/gl/gl_image_egl.cc
|
| diff --git a/ui/gl/gl_image_egl.cc b/ui/gl/gl_image_egl.cc
|
| index aeafc9a8b17f0983eb76f632edba6c7d34a18c2d..3d5e1a4c7642e799873d2049cf4b881506159a6f 100644
|
| --- a/ui/gl/gl_image_egl.cc
|
| +++ b/ui/gl/gl_image_egl.cc
|
| @@ -76,7 +76,8 @@ bool GLImageEGL::BindTexImage() {
|
| }
|
|
|
| void GLImageEGL::ReleaseTexImage() {
|
| - // Nothing to do here as image is released after each use.
|
| + // Nothing to do here as image is released after each use or there is no need
|
| + // to release tex image.
|
| }
|
|
|
| void GLImageEGL::WillUseTexImage() {
|
| @@ -87,9 +88,13 @@ void GLImageEGL::WillUseTexImage() {
|
| DCHECK_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
|
| }
|
|
|
| -void GLImageEGL::DidUseTexImage() {
|
| +void GLImageEGL::DidUseTexImage(bool release_tex_image) {
|
| DCHECK(in_use_);
|
| in_use_ = false;
|
| +
|
| + if (!release_tex_image)
|
| + return;
|
| +
|
| char zero[4] = { 0, };
|
| glTexImage2D(GL_TEXTURE_2D,
|
| 0,
|
|
|