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

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 6028005: Make CopyTexImage2D and CopyTexSubImage2D fail if... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/framebuffer_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/gles2_cmd_utils.cc
===================================================================
--- gpu/command_buffer/common/gles2_cmd_utils.cc (revision 69969)
+++ gpu/command_buffer/common/gles2_cmd_utils.cc (working copy)
@@ -499,6 +499,26 @@
return faces[index];
}
+uint32 GLES2Util::GetChannelsForFormat(int format) {
+ switch (format) {
+ case GL_ALPHA:
+ return 0x0008;
+ case GL_LUMINANCE:
+ return 0x0007;
+ case GL_LUMINANCE_ALPHA:
+ return 0x000F;
+ case GL_RGB:
+ case GL_RGB565:
+ return 0x0007;
+ case GL_RGBA:
+ case GL_RGBA4:
+ case GL_RGB5_A1:
+ return 0x000F;
+ default:
+ return 0x0000;
+ }
+}
+
} // namespace gles2
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.h ('k') | gpu/command_buffer/service/framebuffer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698