summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/gl_utils.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/service/gl_utils.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/service/gl_utils.h')
-rw-r--r--gpu/command_buffer/service/gl_utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gl_utils.h b/gpu/command_buffer/service/gl_utils.h
index 64495b3..d0d8411 100644
--- a/gpu/command_buffer/service/gl_utils.h
+++ b/gpu/command_buffer/service/gl_utils.h
@@ -42,6 +42,12 @@
// GL_ANGLE_translated_shader_source
#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
+// GL_CHROMIUM_flipy
+#define GL_UNPACK_FLIP_Y_CHROMIUM 0x9240
+
+#define GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM 0x9241
+#define GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM 0x9243
+
// GL_ANGLE_pack_reverse_row_order
#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4