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

Side by Side Diff: android_webview/browser/scoped_app_gl_state_restore.cc

Issue 1151783003: Workaround qualcomm-specific activity restore bug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: smaller Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/browser/scoped_app_gl_state_restore.h" 5 #include "android_webview/browser/scoped_app_gl_state_restore.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 i, GL_VERTEX_ATTRIB_ARRAY_POINTER, &vertex_attrib_[i].pointer); 290 i, GL_VERTEX_ATTRIB_ARRAY_POINTER, &vertex_attrib_[i].pointer);
291 glGetVertexAttribPointerv( 291 glGetVertexAttribPointerv(
292 i, GL_VERTEX_ATTRIB_ARRAY_POINTER, &vertex_attrib_[i].pointer); 292 i, GL_VERTEX_ATTRIB_ARRAY_POINTER, &vertex_attrib_[i].pointer);
293 glGetVertexAttribiv(i, 293 glGetVertexAttribiv(i,
294 GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, 294 GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING,
295 &vertex_attrib_[i].vertex_attrib_array_buffer_binding); 295 &vertex_attrib_[i].vertex_attrib_array_buffer_binding);
296 glGetVertexAttribfv( 296 glGetVertexAttribfv(
297 i, GL_CURRENT_VERTEX_ATTRIB, vertex_attrib_[i].current_vertex_attrib); 297 i, GL_CURRENT_VERTEX_ATTRIB, vertex_attrib_[i].current_vertex_attrib);
298 } 298 }
299 299
300 // Android 5.0.0 specific qualcomm workaround. See crbug.com/434570. 300 if (mode_ == ScopedAppGLStateRestore::MODE_RESOURCE_MANAGEMENT) {
301 glBindRenderbufferEXT(GL_RENDERBUFFER, 0); 301 // Android 5.0.0 specific qualcomm workaround. See crbug.com/434570.
302 glBindRenderbufferEXT(GL_RENDERBUFFER, 0);
303 }
304
302 DCHECK(ClearGLErrors(false, NULL)); 305 DCHECK(ClearGLErrors(false, NULL));
303 } 306 }
304 307
305 ScopedAppGLStateRestoreImpl::~ScopedAppGLStateRestoreImpl() { 308 ScopedAppGLStateRestoreImpl::~ScopedAppGLStateRestoreImpl() {
306 TRACE_EVENT0("android_webview", "AppGLStateRestore"); 309 TRACE_EVENT0("android_webview", "AppGLStateRestore");
307 MakeAppContextCurrent(); 310 MakeAppContextCurrent();
308 311
309 DCHECK(ClearGLErrors(false, NULL)); 312 DCHECK(ClearGLErrors(false, NULL));
310 313
311 glBindFramebufferEXT(GL_FRAMEBUFFER, framebuffer_binding_ext_); 314 glBindFramebufferEXT(GL_FRAMEBUFFER, framebuffer_binding_ext_);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 ScopedAppGLStateRestore::~ScopedAppGLStateRestore() {} 432 ScopedAppGLStateRestore::~ScopedAppGLStateRestore() {}
430 433
431 bool ScopedAppGLStateRestore::stencil_enabled() const { 434 bool ScopedAppGLStateRestore::stencil_enabled() const {
432 return impl_->stencil_enabled(); 435 return impl_->stencil_enabled();
433 } 436 }
434 int ScopedAppGLStateRestore::framebuffer_binding_ext() const { 437 int ScopedAppGLStateRestore::framebuffer_binding_ext() const {
435 return impl_->framebuffer_binding_ext(); 438 return impl_->framebuffer_binding_ext();
436 } 439 }
437 440
438 } // namespace android_webview 441 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698