Revert r6330 thru 6333 while we figure out what to do about Intel bots (possible driver bug).
git-svn-id: http://skia.googlecode.com/svn/trunk@6037 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index 411b0e3..06d8e71 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -458,7 +458,16 @@
if (orthVec.setLength(SK_Scalar1)) {
orthVec.setOrthog(orthVec);
- SkScalar lineC = -(a.dot(orthVec));
+ // the values we pass down to the frag shader
+ // have to be in y-points-up space;
+ SkVector normal;
+ normal.fX = orthVec.fX;
+ normal.fY = -orthVec.fY;
+ SkPoint aYDown;
+ aYDown.fX = a.fX;
+ aYDown.fY = rtHeight - a.fY;
+
+ SkScalar lineC = -(aYDown.dot(normal));
for (int i = 0; i < kVertsPerLineSeg; ++i) {
(*vert)[i].fPos = (i < 2) ? a : b;
if (0 == i || 3 == i) {
@@ -466,8 +475,8 @@
} else {
(*vert)[i].fPos += orthVec;
}
- (*vert)[i].fLine.fA = orthVec.fX;
- (*vert)[i].fLine.fB = orthVec.fY;
+ (*vert)[i].fLine.fA = normal.fX;
+ (*vert)[i].fLine.fB = normal.fY;
(*vert)[i].fLine.fC = lineC;
}
if (NULL != toSrc) {