aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAAHairLinePathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-23 14:53:55 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-23 14:53:55 +0000
commit706f66831a575bdc2b1ab1331b48b793cd487356 (patch)
tree2a9457241edf1a433643c92d2dafa933fff7d0a2 /src/gpu/GrAAHairLinePathRenderer.cpp
parent281c726c760c2b0ef957674da0360d5595d52a9c (diff)
Reland r6330 thru r6333 but do without enabling GL_ARB_fragment_coord_conventions on Intel GPUs.
git-svn-id: http://skia.googlecode.com/svn/trunk@6048 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrAAHairLinePathRenderer.cpp')
-rw-r--r--src/gpu/GrAAHairLinePathRenderer.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index 06d8e71f98..411b0e32b6 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -458,16 +458,7 @@ void add_line(const SkPoint p[2],
if (orthVec.setLength(SK_Scalar1)) {
orthVec.setOrthog(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));
+ SkScalar lineC = -(a.dot(orthVec));
for (int i = 0; i < kVertsPerLineSeg; ++i) {
(*vert)[i].fPos = (i < 2) ? a : b;
if (0 == i || 3 == i) {
@@ -475,8 +466,8 @@ void add_line(const SkPoint p[2],
} else {
(*vert)[i].fPos += orthVec;
}
- (*vert)[i].fLine.fA = normal.fX;
- (*vert)[i].fLine.fB = normal.fY;
+ (*vert)[i].fLine.fA = orthVec.fX;
+ (*vert)[i].fLine.fB = orthVec.fY;
(*vert)[i].fLine.fC = lineC;
}
if (NULL != toSrc) {