summaryrefslogtreecommitdiffstats
path: root/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/gpu/webgraphicscontext3d_in_process_impl.cc')
-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);
}