summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp')
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 52bc645..e7e0c32 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -1215,10 +1215,21 @@ void WebGraphicsContext3DDefaultImpl::renderbufferStorage(unsigned long target,
unsigned long height)
{
makeContextCurrent();
- if (internalformat == GL_DEPTH_STENCIL)
+ switch (internalformat) {
+ case GL_DEPTH_STENCIL:
internalformat = GL_DEPTH24_STENCIL8_EXT;
- else if (internalformat == GL_DEPTH_COMPONENT16)
+ 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);
}