Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: Source/platform/graphics/gpu/Extensions3DUtil.cpp

Issue 1284603003: WebGL: optimize webgl.texSubImage2D(video) path. (Blink side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase to ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/ImageBuffer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/platform/graphics/ImageBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698