summaryrefslogtreecommitdiffstats
path: root/gpu/GLES2
diff options
context:
space:
mode:
authordongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-13 02:51:57 +0000
committerdongseong.hwang@intel.com <dongseong.hwang@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-13 02:53:15 +0000
commit90f7d30d54c49306adf4aa591226b9c14a72081f (patch)
tree9f3793064158bba17264159766965c9b449ab9cc /gpu/GLES2
parent34beae1545678c03fe1d4898c6941b76aa6c1bc7 (diff)
downloadchromium_src-90f7d30d54c49306adf4aa591226b9c14a72081f.zip
chromium_src-90f7d30d54c49306adf4aa591226b9c14a72081f.tar.gz
chromium_src-90f7d30d54c49306adf4aa591226b9c14a72081f.tar.bz2
gpu: Optimize and cleanup code used for CHROMIUM_copy_texture.
When source target and destination target is GL_TEXTURE_2D, we can use glCopyTexImage2D() directly. It avoids gl state changes, program binding and drawing call. |dest_target| of DoCopyTexture() is always GL_TEXTURE_2D, so remove the redundant argument. Perf data are as follows: Linux (Intel IvyBridge i7-3520M): 16 us vs 6 us -> 260% faster Android (Nexus 5): 331.8 us vs 252.7 us -> 31% faster BUG=N/A Review URL: https://codereview.chromium.org/374193002 Cr-Commit-Position: refs/heads/master@{#289160} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289160 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/GLES2')
-rw-r--r--gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt
index 4431e49..fdaa7d6 100644
--- a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt
+++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt
@@ -47,7 +47,18 @@ New Procedures and Functions
destination texture. The level parameter must be 0 at present.
The internal format of the destination texture is converted to that
- specified by <internal_format>.
+ specified by <internal_format>. Must be one of the following symbolic
+ constants: GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA
+ When <source_id> texture doens't contain a superset of the component
+ required by <internal_format>, fill the components by following rules.
+
+ source format color components
+ =================================================
+ GL_ALPHA (0, 0, 0, A)
+ GL_LUMINANCE (L, L, L, 1)
+ GL_LUMINANCE_ALPHA (L, L, L, A)
+ GL_RGB (R, G, B, 1)
+ GL_RGBA (R, G, B, A)
The format type of the destination texture is converted to that specified
by <dest_type>.