Index: Source/platform/graphics/gpu/Extensions3DUtil.cpp |
diff --git a/Source/platform/graphics/gpu/Extensions3DUtil.cpp b/Source/platform/graphics/gpu/Extensions3DUtil.cpp |
index 950b8fa52052b94119b78c7f5c5a83352e525d71..eed99772726c55daac55259a14fe28cab6a0efd2 100644 |
--- a/Source/platform/graphics/gpu/Extensions3DUtil.cpp |
+++ b/Source/platform/graphics/gpu/Extensions3DUtil.cpp |
@@ -83,9 +83,21 @@ bool Extensions3DUtil::isExtensionEnabled(const String& name) |
bool Extensions3DUtil::canUseCopyTextureCHROMIUM(GLenum destTarget, GLenum destFormat, GLenum destType, GLint level) |
{ |
- // FIXME: restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be lifted when |
+ switch (destTarget) { |
+ case GL_TEXTURE_2D: |
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X: |
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: |
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: |
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: |
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: |
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: |
+ break; |
+ default: |
+ return false; |
+ } |
+ // TODO(dshwang): restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be lifted when |
// WebGraphicsContext3D::copyTextureCHROMIUM(...) are fully functional. |
- if (destTarget == GL_TEXTURE_2D && (destFormat == GL_RGB || destFormat == GL_RGBA) |
+ if ((destFormat == GL_RGB || destFormat == GL_RGBA) |
&& destType == GL_UNSIGNED_BYTE |
&& !level) |
return true; |