summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
diff options
context:
space:
mode:
authorkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-06 18:07:24 +0000
committerkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-06 18:07:24 +0000
commitc2f8c84089f32aac6377c95da14d52153a165b39 (patch)
tree91e39d58e5b54b21d2f6070654a0e89208cd5236 /chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
parent5ac981e18bcad738dbe3e34a59c5814a9f00ea08 (diff)
downloadchromium_src-c2f8c84089f32aac6377c95da14d52153a165b39.zip
chromium_src-c2f8c84089f32aac6377c95da14d52153a165b39.tar.gz
chromium_src-c2f8c84089f32aac6377c95da14d52153a165b39.tar.bz2
Exposed support for dynamically enabling extensions in command buffer
implementation via new glGetRequestableExtensionsCHROMIUM and glRequestExtensionCHROMIUM entry points. These entry points are needed in order to allow WebGL to both query the available extensions and enable them individually. Added these entry points to WebGraphicsContext3DCommandBufferImpl. A subsequent WebKit checkin under https://bugs.webkit.org/show_bug.cgi?id=40316 will utilize them and implement the OES_texture_float extension for WebGL. BUG=none TEST=none (ran with new oes-texture-float.html WebGL conformance test) Review URL: http://codereview.chromium.org/5626008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc')
-rw-r--r--chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
index b269151..6479a7a 100644
--- a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
+++ b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
@@ -90,7 +90,7 @@ bool WebGraphicsContext3DCommandBufferImpl::initialize(
GPUInfo gpu_info = host->gpu_info();
UMA_HISTOGRAM_ENUMERATION(
"GPU.WebGraphicsContext3D_Init_CanLoseContext",
- attributes.canRecoverFromContextLoss * 2 + gpu_info.can_lose_context(),
+ attributes.canRecoverFromContextLoss * 2 + gpu_info.can_lose_context(),
4);
if (attributes.canRecoverFromContextLoss == false) {
if (gpu_info.can_lose_context())
@@ -371,6 +371,16 @@ void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM(
copyTextureToCompositor(texture, parentTexture);
}
+WebKit::WebString WebGraphicsContext3DCommandBufferImpl::
+ getRequestableExtensionsCHROMIUM() {
+ return WebKit::WebString::fromUTF8(glGetRequestableExtensionsCHROMIUM());
+}
+
+void WebGraphicsContext3DCommandBufferImpl::requestExtensionCHROMIUM(
+ const char* extension) {
+ glRequestExtensionCHROMIUM(extension);
+}
+
// Helper macros to reduce the amount of code.
#define DELEGATE_TO_GL(name, glname) \