summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
diff options
context:
space:
mode:
authortwiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-20 17:06:28 +0000
committertwiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-20 17:06:28 +0000
commit43410e98156161a042bcc2cf31b8a4670830f84e (patch)
tree29fed576d01cba8f70d8598596fab3fac949adc8 /gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
parent7f85791b0e6ce5a7745a26be8adc4cebf0ee409d (diff)
downloadchromium_src-43410e98156161a042bcc2cf31b8a4670830f84e.zip
chromium_src-43410e98156161a042bcc2cf31b8a4670830f84e.tar.gz
chromium_src-43410e98156161a042bcc2cf31b8a4670830f84e.tar.bz2
Re-submission of http://codereview.chromium.org/9968113
This version corrects the problem that caussed the revert of the above issue. The shaders used by the extension were specifying a precision, which is not supported on desktop GL. The shaders now conditionally specify the precision. ------------------------------------------------------ Introduction of CHROMIUM_copy_texture extension that respects pixel-store semantics, and allows copying of BGRA textures. OpenGL ES does not natively allow for copying textures with a BGRA format. The EXT_texture_format_BGRA8888 extension does not specify support for glCopyTexImage calls on these textures. This extension provides a routine to perform texture copies to/from BGRA-backed textures that also respects the following CHROMIUM pixel storage modifiers: UNPACK_FLIP_Y_CHROMIUM UNPACK_PREMULTIPLY_ALPHA_CHROMIUM This extension will be useful for the following purposes: - Copying accelerated Canvas2D contents to WebGL textures without a software readback. (And potentially the same for video-webgl texture copies.) - Copying Canvas2D contents to the compositor backing store. BUG=101051 TEST=none Review URL: http://codereview.chromium.org/10124016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133213 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h')
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
index 2d725d0..d99da6d 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -289,9 +289,11 @@ static GLES2Util::EnumToString enum_to_string_table[] = {
{ 0x8DF2, "GL_HIGH_FLOAT", },
{ 0x8826, "GL_DRAW_BUFFER1_NV", },
{ 0x8827, "GL_DRAW_BUFFER2_NV", },
+ { 0x9243, "GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM", },
{ 0x8DF3, "GL_LOW_INT", },
{ 0x8B53, "GL_INT_VEC2", },
{ 0x0C02, "GL_READ_BUFFER_NV", },
+ { 0x9241, "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM", },
{ 0x8B52, "GL_FLOAT_VEC4", },
{ 0x9240, "GL_UNPACK_FLIP_Y_CHROMIUM", },
{ 0x8B51, "GL_FLOAT_VEC3", },
@@ -887,6 +889,9 @@ std::string GLES2Util::GetStringPixelStore(uint32 value) {
static EnumToString string_table[] = {
{ GL_PACK_ALIGNMENT, "GL_PACK_ALIGNMENT" },
{ GL_UNPACK_ALIGNMENT, "GL_UNPACK_ALIGNMENT" },
+ { GL_UNPACK_FLIP_Y_CHROMIUM, "GL_UNPACK_FLIP_Y_CHROMIUM" },
+ { GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM,
+ "GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM" },
};
return GLES2Util::GetQualifiedEnumString(
string_table, arraysize(string_table), value);