summaryrefslogtreecommitdiffstats
path: root/third_party
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 /third_party
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 'third_party')
-rw-r--r--third_party/khronos/GLES2/gl2ext.h18
-rw-r--r--third_party/khronos/README.chromium1
2 files changed, 19 insertions, 0 deletions
diff --git a/third_party/khronos/GLES2/gl2ext.h b/third_party/khronos/GLES2/gl2ext.h
index 04fa4e0..8effd30 100644
--- a/third_party/khronos/GLES2/gl2ext.h
+++ b/third_party/khronos/GLES2/gl2ext.h
@@ -1955,6 +1955,24 @@ typedef void (GL_APIENTRYP PFNGLTEXIMAGEIOSURFACE2DCHROMIUM) (GLenum target, GLs
#endif
#endif
+/* GL_CHROMIUM_copy_texture */
+#ifndef GL_CHROMIUM_copy_texture
+#ifndef GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM
+#define GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM 0x9241
+#endif
+#ifndef GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM
+#define GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM 0x9243
+#endif
+#ifdef GL_GLEXT_PROTOTYPES
+#define glCopyTextureCHROMIUM GLES2_GET_FUN(CopyTextureCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glCopyTextureCHROMIUM (GLenum target, GLenum source_id, GLenum dest_id, GLint level);
+#endif
+#else
+typedef void (GL_APIENTRYP PFNGLCOPYTEXTURECHROMIUM) (GLenum target, GLenum source_id, GLenum dest_id, GLint level);
+#endif
+#endif
+
/* GL_CHROMIUM_command_buffer_query */
/* Exposes GL_CHROMIUM_command_buffer_query.
*/
diff --git a/third_party/khronos/README.chromium b/third_party/khronos/README.chromium
index fb7daee..5a67f08 100644
--- a/third_party/khronos/README.chromium
+++ b/third_party/khronos/README.chromium
@@ -21,5 +21,6 @@ GLES2/gl2ext.h
- Added ANGLE_instanced_arrays
- Added GL_EXT_framebuffer_multisample
- Added GL_CHROMIUM_command_buffer_query
+ - Added GL_CHROMIUM_copy_texture
EGL/eglplatform.h
- Added EGLNative*Type for Mac.