diff options
author | twiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-20 17:06:28 +0000 |
---|---|---|
committer | twiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-20 17:06:28 +0000 |
commit | 43410e98156161a042bcc2cf31b8a4670830f84e (patch) | |
tree | 29fed576d01cba8f70d8598596fab3fac949adc8 /gpu/GLES2 | |
parent | 7f85791b0e6ce5a7745a26be8adc4cebf0ee409d (diff) | |
download | chromium_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/GLES2')
-rw-r--r-- | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt new file mode 100644 index 0000000..c48ac39 --- /dev/null +++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt @@ -0,0 +1,66 @@ +Name + + CHROMIUM_copy_texture + +Name Strings + + GL_CHROMIUM_copy_texture + +Version + + Last Modifed Date: April 3, 2012 + +Dependencies + + OpenGL ES 2.0 is required. + + CHROMIUM_flipy affects the definition of this extension. + EXT_texture_format_BGRA8888 affects the definition of this extension. + +Overview + + This extension expands on the functionality provided by the + glCopyTexImage2D command. A new function is exported, + glCopyTextureCHROMIUM, that performs the same copy operation as + glCopyTexImage2D, while respecting the pixel-storage modifiers + UNPACK_FLIP_Y_CHROMIUM and GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM. + + The extension also supports copying BGRA textures, which is not explicitly + granted by EXT_texture_format_BGRA8888. + +New Procedures and Functions + + void glCopyTextureCHROMIUM (GLenum target, GLenum source_id, + GLenum dest_id, GLint level) + + Copies the contents of texture referred to by <source_id> to texture + <dest_id>. + + Texture level 0 is copied from the source image to level <level> of the + destination texture. + + <target> uses the same parameters as TexImage2D. + + INVALID_VALUE is generated if <target> is not GL_TEXTURE_2D. + + INVALID_VALUE is generated if <source_id> or <dest_id> are not valid texture + objects. + + INVALID_VALUE is generated if <level> is not a valid level of the + destination texture, or if level 0 of the source texture is not defined. + +Errors + + None. + +New Tokens + + None. + +New State + + None. + +Revision History + + 8/1/2011 Documented the extension |