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

Unified Diff: android_webview/browser/in_process_renderer/in_process_view_renderer.cc

Issue 16096004: Fix app gl state restore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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: android_webview/browser/in_process_renderer/in_process_view_renderer.cc
diff --git a/android_webview/browser/in_process_renderer/in_process_view_renderer.cc b/android_webview/browser/in_process_renderer/in_process_view_renderer.cc
index 6ecdd6215e5e3cae02d437723a1a970f04860cdd..5eda9a87eade8dbe82c26a463a2687243967de8b 100644
--- a/android_webview/browser/in_process_renderer/in_process_view_renderer.cc
+++ b/android_webview/browser/in_process_renderer/in_process_view_renderer.cc
@@ -51,9 +51,6 @@ class GLStateRestore {
GLStateRestore() {
glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES,
&texture_external_oes_binding_);
- glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &vertex_array_buffer_binding_);
- glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING,
- &index_array_buffer_binding_);
joth 2013/05/28 20:44:05 can we leave this in under !NDEBUG just to keep th
glGetIntegerv(GL_PACK_ALIGNMENT, &pack_alignment_);
glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment_);
@@ -85,15 +82,10 @@ class GLStateRestore {
glGetBooleanv(GL_SCISSOR_TEST, &scissor_test_);
glGetIntegerv(GL_SCISSOR_BOX, scissor_box_);
glGetIntegerv(GL_CURRENT_PROGRAM, &current_program_);
-
- DCHECK_EQ(0, vertex_array_buffer_binding_);
- DCHECK_EQ(0, index_array_buffer_binding_);
}
~GLStateRestore() {
glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture_external_oes_binding_);
- glBindBuffer(GL_ARRAY_BUFFER, vertex_array_buffer_binding_);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_array_buffer_binding_);
glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment_);
glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment_);
@@ -148,12 +140,13 @@ class GLStateRestore {
scissor_box_[0], scissor_box_[1], scissor_box_[2], scissor_box_[3]);
glUseProgram(current_program_);
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
no sievers 2013/05/28 20:04:04 Interesting, so it's expected that draw functor in
joth 2013/05/28 20:44:05 Today, Framework ensures nothing is bound when we'
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
}
private:
GLint texture_external_oes_binding_;
- GLint vertex_array_buffer_binding_;
- GLint index_array_buffer_binding_;
GLint pack_alignment_;
GLint unpack_alignment_;
« 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