diff options
Diffstat (limited to 'libs/hwui/PathTessellator.cpp')
-rw-r--r-- | libs/hwui/PathTessellator.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/hwui/PathTessellator.cpp b/libs/hwui/PathTessellator.cpp index 27ef06f..9f7dd50 100644 --- a/libs/hwui/PathTessellator.cpp +++ b/libs/hwui/PathTessellator.cpp @@ -279,7 +279,6 @@ void getStrokeVerticesFromUnclosedVertices(const PaintInfo& paintInfo, - (vertices[lastIndex].x - vertices[lastIndex - 1].x), vertices[lastIndex].y - vertices[lastIndex - 1].y); const float dTheta = PI / (extra + 1); - const float radialScale = 2.0f / (1 + cos(dTheta)); int capOffset; for (int i = 0; i < extra; i++) { @@ -290,14 +289,14 @@ void getStrokeVerticesFromUnclosedVertices(const PaintInfo& paintInfo, } beginTheta += dTheta; - Vector2 beginRadialOffset = {cos(beginTheta), sin(beginTheta)}; + Vector2 beginRadialOffset = {cosf(beginTheta), sinf(beginTheta)}; paintInfo.scaleOffsetForStrokeWidth(beginRadialOffset); Vertex::set(&buffer[capOffset], vertices[0].x + beginRadialOffset.x, vertices[0].y + beginRadialOffset.y); endTheta += dTheta; - Vector2 endRadialOffset = {cos(endTheta), sin(endTheta)}; + Vector2 endRadialOffset = {cosf(endTheta), sinf(endTheta)}; paintInfo.scaleOffsetForStrokeWidth(endRadialOffset); Vertex::set(&buffer[allocSize - 1 - capOffset], vertices[lastIndex].x + endRadialOffset.x, @@ -468,7 +467,7 @@ inline static void storeCapAA(const PaintInfo& paintInfo, const Vector<Vertex>& for (int i = 0; i < extra; i++) { theta += dTheta; - Vector2 radialOffset = {cos(theta), sin(theta)}; + Vector2 radialOffset = {cosf(theta), sinf(theta)}; // scale to compensate for pinching at sharp angles, see totalOffsetFromNormals() radialOffset *= radialScale; @@ -831,7 +830,6 @@ void PathTessellator::tessellatePoints(const float* points, int count, const SkP Rect bounds; // tessellate, then duplicate outline across points - int numPoints = count / 2; VertexBuffer tempBuffer; if (!paintInfo.isAA) { getFillVerticesFromPerimeter(outlineVertices, tempBuffer); |