From 6f5fac9d1b4c8bfc924ed555f46c3e67a8a8f962 Mon Sep 17 00:00:00 2001 From: "backer@chromium.org" Date: Tue, 26 Jun 2012 21:02:45 +0000 Subject: Aura: Fix partial swaps in the UI Extensions were being cached per context group. Recently we started creating an offscreen context before any onscreen contexts, which meant that our onscreen specific extensions were never being reported. This CL keeps the cacheing for the context specific extensions and adds in the surface specific extensions. TEST=use chrome://tracing to verify that HandlePostSubBuffer is being called in the GPU process on a CrOS device BUG=none Review URL: https://chromiumcodereview.appspot.com/10673002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144271 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/gpu/webgraphicscontext3d_in_process_impl.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'webkit/gpu/webgraphicscontext3d_in_process_impl.cc') diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc index f37cd363..6539487 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc +++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc @@ -8,6 +8,7 @@ #include #include +#include #include "base/lazy_instance.h" #include "base/logging.h" @@ -347,7 +348,7 @@ void WebGraphicsContext3DInProcessImpl::prepareTexture() { void WebGraphicsContext3DInProcessImpl::postSubBufferCHROMIUM( int x, int y, int width, int height) { - DCHECK(gl_context_->HasExtension("GL_CHROMIUM_post_sub_buffer")); + DCHECK(gl_surface_->HasExtension("GL_CHROMIUM_post_sub_buffer")); gl_surface_->PostSubBuffer(x, y, width, height); } @@ -1294,6 +1295,9 @@ WebString WebGraphicsContext3DInProcessImpl::getString(WGC3Denum name) { result += " GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra"; } } + std::string surface_extensions = gl_surface_->GetExtensions(); + if (!surface_extensions.empty()) + result += " " + surface_extensions; } else { result = reinterpret_cast(glGetString(name)); } @@ -1650,16 +1654,14 @@ void WebGraphicsContext3DInProcessImpl::texImageIOSurface2DCHROMIUM( DELEGATE_TO_GL_5(texStorage2DEXT, TexStorage2DEXT, WGC3Denum, WGC3Dint, WGC3Duint, WGC3Dint, WGC3Dint) -WebGLId WebGraphicsContext3DInProcessImpl::createQueryEXT() -{ +WebGLId WebGraphicsContext3DInProcessImpl::createQueryEXT() { makeContextCurrent(); GLuint o = 0; glGenQueriesARB(1, &o); return o; } -void WebGraphicsContext3DInProcessImpl::deleteQueryEXT(WebGLId query) -{ +void WebGraphicsContext3DInProcessImpl::deleteQueryEXT(WebGLId query) { makeContextCurrent(); glDeleteQueriesARB(1, &query); } -- cgit v1.1