Index: src/gpu/GrAARectRenderer.cpp |
diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp |
index b5d2db9246b6a756f589536cec40106a7fcccffb..497b3cfbb8d6b11903a5b9d741596f5e2e08081d 100644 |
--- a/src/gpu/GrAARectRenderer.cpp |
+++ b/src/gpu/GrAARectRenderer.cpp |
@@ -200,7 +200,7 @@ public: |
builder->fsCodeAppend("\tfloat scaleH = min(1.0, 2.0*insetH/spanH);\n"); |
// Compute the coverage for the rect's width |
- builder->fsCodeAppendf("\tvec2 offset = %s - %s.xy;\n", |
+ builder->fsCodeAppendf("\tvec2 offset = %s.xy - %s.xy;\n", |
builder->fragmentPosition(), fsRectEdgeName); |
builder->fsCodeAppendf("\tfloat perpDot = abs(offset.x * %s.w - offset.y * %s.z);\n", |
fsRectEdgeName, fsRectEdgeName); |