summaryrefslogtreecommitdiffstats
path: root/webkit/gpu
diff options
context:
space:
mode:
authorjnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-23 13:38:45 +0000
committerjnd@chromium.org <jnd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-23 13:38:45 +0000
commit5e9aca2ab199d6a93fd1f060c2dd84e769f26482 (patch)
tree3fb1c98271e64c691af5555041b0cac1c2323ef3 /webkit/gpu
parent0e58634eb212b4ae907ea035043c09d2496ca941 (diff)
downloadchromium_src-5e9aca2ab199d6a93fd1f060c2dd84e769f26482.zip
chromium_src-5e9aca2ab199d6a93fd1f060c2dd84e769f26482.tar.gz
chromium_src-5e9aca2ab199d6a93fd1f060c2dd84e769f26482.tar.bz2
Don't map internalFormat in renderbufferStorage() in embedded envrionment.
BUG=none TEST=Run webkit layout test fast/canvas/webgl/framebuffer_test.html in embedded environment. Review URL: http://codereview.chromium.org/6365006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72299 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc30
1 files changed, 16 insertions, 14 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
index d9b5003..4b45e3027 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
@@ -1310,20 +1310,22 @@ void WebGraphicsContext3DInProcessImpl::renderbufferStorage(
unsigned long width,
unsigned long height) {
makeContextCurrent();
- switch (internalformat) {
- case GL_DEPTH_STENCIL:
- internalformat = GL_DEPTH24_STENCIL8_EXT;
- break;
- case GL_DEPTH_COMPONENT16:
- internalformat = GL_DEPTH_COMPONENT;
- break;
- case GL_RGBA4:
- case GL_RGB5_A1:
- internalformat = GL_RGBA;
- break;
- case 0x8D62: // GL_RGB565
- internalformat = GL_RGB;
- break;
+ if (!is_gles2_) {
+ switch (internalformat) {
+ case GL_DEPTH_STENCIL:
+ internalformat = GL_DEPTH24_STENCIL8_EXT;
+ break;
+ case GL_DEPTH_COMPONENT16:
+ internalformat = GL_DEPTH_COMPONENT;
+ break;
+ case GL_RGBA4:
+ case GL_RGB5_A1:
+ internalformat = GL_RGBA;
+ break;
+ case 0x8D62: // GL_RGB565
+ internalformat = GL_RGB;
+ break;
+ }
}
glRenderbufferStorageEXT(target, internalformat, width, height);
}