Index: src/core/SkNormalBevelSource.cpp |
diff --git a/src/core/SkNormalBevelSource.cpp b/src/core/SkNormalBevelSource.cpp |
index 04faa0006fa15d42d0d0e85ab490492dcc98792d..f4bd031c4c7dbccd1f433f646aa8c7ef3197d73d 100644 |
--- a/src/core/SkNormalBevelSource.cpp |
+++ b/src/core/SkNormalBevelSource.cpp |
@@ -86,10 +86,9 @@ public: |
} |
// Here we are splitting the distance vector into length and normalized direction |
- // TODO: Output these values from the geometry processor frag code instead of the vector |
- fragBuilder->codeAppendf("float dv_length = length(%s);", |
+ fragBuilder->codeAppendf("float dv_length = %s.z;", |
fragBuilder->distanceVectorName()); |
- fragBuilder->codeAppendf("vec2 dv_norm = normalize(%s);", |
+ fragBuilder->codeAppendf("vec2 dv_norm = %s.xy;", |
fragBuilder->distanceVectorName()); |
// Asserting presence of necessary uniforms |