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

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

Issue 2738163002: Enable CopyTextureCHROMIUM in Blink for Tex{Sub}Image2D with more cases (Closed)
Patch Set: rebase only--blink renaming and formatting Created 3 years, 8 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 | « third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp b/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
index abe4b10baa03cd95058773fd7b1598643afd19ba..973c0d676f06fc5689b9086dc094d28390e35cc3 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
@@ -74,17 +74,19 @@ bool Extensions3DUtil::IsExtensionEnabled(const String& name) {
return enabled_extensions_.Contains(name);
}
-bool Extensions3DUtil::CanUseCopyTextureCHROMIUM(GLenum dest_target,
- GLenum dest_format,
- GLenum dest_type,
- GLint level) {
- // TODO(zmo): restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be
- // lifted when GLES2Interface::CopyTextureCHROMIUM(...) are fully functional.
- if (dest_target == GL_TEXTURE_2D &&
- (dest_format == GL_RGB || dest_format == GL_RGBA) &&
- dest_type == GL_UNSIGNED_BYTE && !level)
- return true;
- return false;
+bool Extensions3DUtil::CanUseCopyTextureCHROMIUM(GLenum dest_target) {
+ switch (dest_target) {
+ 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:
+ return true;
+ default:
+ return false;
+ }
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698