Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2667)

Unified Diff: cc/shader.cc

Issue 11415161: Texture Draw Calls Coalescing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved { to line above Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/gl_renderer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/shader.cc
diff --git a/cc/shader.cc b/cc/shader.cc
index a9a0877db05fb2067f316711b049eee7fda6b54b..c84d88aeccc948abe96257d14778f0a843d6cb20 100644
--- a/cc/shader.cc
+++ b/cc/shader.cc
@@ -159,13 +159,14 @@ std::string VertexShaderPosTexTransform::getShaderString() const
return SHADER(
attribute vec4 a_position;
attribute vec2 a_texCoord;
- uniform mat4 matrix;
- uniform vec4 texTransform;
+ attribute float a_index;
+ uniform mat4 matrix[8];
+ uniform vec4 texTransform[8];
varying vec2 v_texCoord;
void main()
{
- gl_Position = matrix * a_position;
- v_texCoord = a_texCoord * texTransform.zw + texTransform.xy;
+ gl_Position = matrix[int(a_index)] * a_position;
+ v_texCoord = a_texCoord * texTransform[int(a_index)].zw + texTransform[int(a_index)].xy;
}
);
}
« no previous file with comments | « cc/gl_renderer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698