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

Unified Diff: ui/gl/gl_image_egl.cc

Issue 66033009: [Android] Add workaround to unbind gpu memory buffer only on NVIDIA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update a more comments Created 7 years, 1 month 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
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,
« ui/gl/gl_image.h ('K') | « ui/gl/gl_image_egl.h ('k') | ui/gl/gl_image_glx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698