OLD | NEW |
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/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 glGetVertexAttribPointerv( | 287 glGetVertexAttribPointerv( |
288 i, GL_VERTEX_ATTRIB_ARRAY_POINTER, &vertex_attrib_[i].pointer); | 288 i, GL_VERTEX_ATTRIB_ARRAY_POINTER, &vertex_attrib_[i].pointer); |
289 glGetVertexAttribPointerv( | 289 glGetVertexAttribPointerv( |
290 i, GL_VERTEX_ATTRIB_ARRAY_POINTER, &vertex_attrib_[i].pointer); | 290 i, GL_VERTEX_ATTRIB_ARRAY_POINTER, &vertex_attrib_[i].pointer); |
291 glGetVertexAttribiv(i, | 291 glGetVertexAttribiv(i, |
292 GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, | 292 GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, |
293 &vertex_attrib_[i].vertex_attrib_array_buffer_binding); | 293 &vertex_attrib_[i].vertex_attrib_array_buffer_binding); |
294 glGetVertexAttribfv( | 294 glGetVertexAttribfv( |
295 i, GL_CURRENT_VERTEX_ATTRIB, vertex_attrib_[i].current_vertex_attrib); | 295 i, GL_CURRENT_VERTEX_ATTRIB, vertex_attrib_[i].current_vertex_attrib); |
296 } | 296 } |
| 297 |
| 298 // Android 5.0.0 specific qualcomm workaround. See crbug.com/434570. |
| 299 glBindRenderbufferEXT(GL_RENDERBUFFER, 0); |
297 DCHECK(ClearGLErrors(false, NULL)); | 300 DCHECK(ClearGLErrors(false, NULL)); |
298 } | 301 } |
299 | 302 |
300 ScopedAppGLStateRestoreImpl::~ScopedAppGLStateRestoreImpl() { | 303 ScopedAppGLStateRestoreImpl::~ScopedAppGLStateRestoreImpl() { |
301 TRACE_EVENT0("android_webview", "AppGLStateRestore"); | 304 TRACE_EVENT0("android_webview", "AppGLStateRestore"); |
302 MakeAppContextCurrent(); | 305 MakeAppContextCurrent(); |
303 | 306 |
304 DCHECK(ClearGLErrors(false, NULL)); | 307 DCHECK(ClearGLErrors(false, NULL)); |
305 | 308 |
306 glBindFramebufferEXT(GL_FRAMEBUFFER, framebuffer_binding_ext_); | 309 glBindFramebufferEXT(GL_FRAMEBUFFER, framebuffer_binding_ext_); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 ScopedAppGLStateRestore::~ScopedAppGLStateRestore() {} | 427 ScopedAppGLStateRestore::~ScopedAppGLStateRestore() {} |
425 | 428 |
426 bool ScopedAppGLStateRestore::stencil_enabled() const { | 429 bool ScopedAppGLStateRestore::stencil_enabled() const { |
427 return impl_->stencil_enabled(); | 430 return impl_->stencil_enabled(); |
428 } | 431 } |
429 int ScopedAppGLStateRestore::framebuffer_binding_ext() const { | 432 int ScopedAppGLStateRestore::framebuffer_binding_ext() const { |
430 return impl_->framebuffer_binding_ext(); | 433 return impl_->framebuffer_binding_ext(); |
431 } | 434 } |
432 | 435 |
433 } // namespace android_webview | 436 } // namespace android_webview |
OLD | NEW |