summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 05c7809..9f8b87c 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1978,6 +1978,10 @@ status_t OpenGLRenderer::drawLines(float* points, int count, SkPaint* paint) {
// Find the normal to the line
vec2 n = (b - a).copyNormalized() * halfStrokeWidth;
+ float x = n.x;
+ n.x = -n.y;
+ n.y = x;
+
if (isHairLine) {
if (isAA) {
float wideningFactor;
@@ -2002,14 +2006,10 @@ status_t OpenGLRenderer::drawLines(float* points, int count, SkPaint* paint) {
float extendedNLength = extendedN.length();
// We need to set this value on the shader prior to drawing
- boundaryWidthProportion = extendedNLength / (halfStrokeWidth + extendedNLength);
+ boundaryWidthProportion = .5 - extendedNLength / (halfStrokeWidth + extendedNLength);
n += extendedN;
}
- float x = n.x;
- n.x = -n.y;
- n.y = x;
-
// aa lines expand the endpoint vertices to encompass the AA boundary
if (isAA) {
vec2 abVector = (b - a);