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

Unified Diff: cc/output/shader.cc

Issue 13008010: cc: Use different name for "point" uniform until crbug.com/223014 has been resolved. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/shader.cc
diff --git a/cc/output/shader.cc b/cc/output/shader.cc
index c4ca0a9f35cd9a1f782457fb8fd893f67a466f70..c4d3636284fedfcf34bc22cebd4f0785817e5bf3 100644
--- a/cc/output/shader.cc
+++ b/cc/output/shader.cc
@@ -222,9 +222,11 @@ VertexShaderQuad::VertexShaderQuad()
void VertexShaderQuad::init(WebGraphicsContext3D* context, unsigned program, bool usingBindUniform, int* baseUniformIndex)
{
+ // TODO(reveman): Some uniform names are causing drawing artifact.
+ // crbug.com/223014
static const char* shaderUniforms[] = {
"matrix",
- "point",
+ "point_bug223014",
"texScale",
};
int locations[3];
@@ -245,17 +247,17 @@ std::string VertexShaderQuad::getShaderString() const
attribute vec4 a_position;
attribute vec2 a_texCoord;
uniform mat4 matrix;
- uniform vec2 point[4];
+ uniform vec2 point_bug223014[4];
uniform vec2 texScale;
varying vec2 v_texCoord;
void main()
{
vec2 complement = abs(a_texCoord - 1.0);
vec4 pos = vec4(0.0, 0.0, a_position.z, a_position.w);
- pos.xy += (complement.x * complement.y) * point[0];
- pos.xy += (a_texCoord.x * complement.y) * point[1];
- pos.xy += (a_texCoord.x * a_texCoord.y) * point[2];
- pos.xy += (complement.x * a_texCoord.y) * point[3];
+ pos.xy += (complement.x * complement.y) * point_bug223014[0];
+ pos.xy += (a_texCoord.x * complement.y) * point_bug223014[1];
+ pos.xy += (a_texCoord.x * a_texCoord.y) * point_bug223014[2];
+ pos.xy += (complement.x * a_texCoord.y) * point_bug223014[3];
gl_Position = matrix * pos;
v_texCoord = (pos.xy + vec2(0.5)) * texScale;
}
@@ -273,7 +275,7 @@ void VertexShaderTile::init(WebGraphicsContext3D* context, unsigned program, boo
{
static const char* shaderUniforms[] = {
"matrix",
- "point",
+ "point_bug223014",
"vertexTexTransform",
};
int locations[3];
@@ -292,17 +294,17 @@ std::string VertexShaderTile::getShaderString() const
attribute vec4 a_position;
attribute vec2 a_texCoord;
uniform mat4 matrix;
- uniform vec2 point[4];
+ uniform vec2 point_bug223014[4];
uniform vec4 vertexTexTransform;
varying vec2 v_texCoord;
void main()
{
vec2 complement = abs(a_texCoord - 1.0);
vec4 pos = vec4(0.0, 0.0, a_position.z, a_position.w);
- pos.xy += (complement.x * complement.y) * point[0];
- pos.xy += (a_texCoord.x * complement.y) * point[1];
- pos.xy += (a_texCoord.x * a_texCoord.y) * point[2];
- pos.xy += (complement.x * a_texCoord.y) * point[3];
+ pos.xy += (complement.x * complement.y) * point_bug223014[0];
+ pos.xy += (a_texCoord.x * complement.y) * point_bug223014[1];
+ pos.xy += (a_texCoord.x * a_texCoord.y) * point_bug223014[2];
+ pos.xy += (complement.x * a_texCoord.y) * point_bug223014[3];
gl_Position = matrix * pos;
v_texCoord = pos.xy * vertexTexTransform.zw + vertexTexTransform.xy;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698