summaryrefslogtreecommitdiffstats
path: root/webkit/gpu
diff options
context:
space:
mode:
authorbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-26 21:02:45 +0000
committerbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-26 21:02:45 +0000
commit6f5fac9d1b4c8bfc924ed555f46c3e67a8a8f962 (patch)
tree867db68f1f7fa9c5e0f41910240e406286754e40 /webkit/gpu
parentc9b218291fd46c0ceb4b1a3100b182ad26cbb1b8 (diff)
downloadchromium_src-6f5fac9d1b4c8bfc924ed555f46c3e67a8a8f962.zip
chromium_src-6f5fac9d1b4c8bfc924ed555f46c3e67a8a8f962.tar.gz
chromium_src-6f5fac9d1b4c8bfc924ed555f46c3e67a8a8f962.tar.bz2
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
Diffstat (limited to 'webkit/gpu')
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc12
1 files changed, 7 insertions, 5 deletions
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 <algorithm>
#include <string>
+#include <vector>
#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<const char*>(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);
}