summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/src/gpu/GrPathUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/src/gpu/GrPathUtils.h')
-rw-r--r--chromium/third_party/skia/src/gpu/GrPathUtils.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/chromium/third_party/skia/src/gpu/GrPathUtils.h b/chromium/third_party/skia/src/gpu/GrPathUtils.h
index 71f6e0b9c1e..c15fd7ae103 100644
--- a/chromium/third_party/skia/src/gpu/GrPathUtils.h
+++ b/chromium/third_party/skia/src/gpu/GrPathUtils.h
@@ -8,7 +8,6 @@
#ifndef GrPathUtils_DEFINED
#define GrPathUtils_DEFINED
-#include "GrPoint.h"
#include "SkRect.h"
#include "SkPath.h"
#include "SkTArray.h"
@@ -31,25 +30,25 @@ namespace GrPathUtils {
/// Since we divide by tol if we're computing exact worst-case bounds,
/// very small tolerances will be increased to gMinCurveTol.
- uint32_t quadraticPointCount(const GrPoint points[], SkScalar tol);
+ uint32_t quadraticPointCount(const SkPoint points[], SkScalar tol);
- uint32_t generateQuadraticPoints(const GrPoint& p0,
- const GrPoint& p1,
- const GrPoint& p2,
+ uint32_t generateQuadraticPoints(const SkPoint& p0,
+ const SkPoint& p1,
+ const SkPoint& p2,
SkScalar tolSqd,
- GrPoint** points,
+ SkPoint** points,
uint32_t pointsLeft);
/// Since we divide by tol if we're computing exact worst-case bounds,
/// very small tolerances will be increased to gMinCurveTol.
- uint32_t cubicPointCount(const GrPoint points[], SkScalar tol);
+ uint32_t cubicPointCount(const SkPoint points[], SkScalar tol);
- uint32_t generateCubicPoints(const GrPoint& p0,
- const GrPoint& p1,
- const GrPoint& p2,
- const GrPoint& p3,
+ uint32_t generateCubicPoints(const SkPoint& p0,
+ const SkPoint& p1,
+ const SkPoint& p2,
+ const SkPoint& p3,
SkScalar tolSqd,
- GrPoint** points,
+ SkPoint** points,
uint32_t pointsLeft);
// A 2x3 matrix that goes from the 2d space coordinates to UV space where
@@ -59,8 +58,8 @@ namespace GrPathUtils {
public:
QuadUVMatrix() {};
// Initialize the matrix from the control pts
- QuadUVMatrix(const GrPoint controlPts[3]) { this->set(controlPts); }
- void set(const GrPoint controlPts[3]);
+ QuadUVMatrix(const SkPoint controlPts[3]) { this->set(controlPts); }
+ void set(const SkPoint controlPts[3]);
/**
* Applies the matrix to vertex positions to compute UV coords. This
@@ -85,8 +84,8 @@ namespace GrPathUtils {
float sy = fM[4];
float ty = fM[5];
for (int i = 0; i < N; ++i) {
- const GrPoint* xy = reinterpret_cast<const GrPoint*>(xyPtr);
- GrPoint* uv = reinterpret_cast<GrPoint*>(uvPtr);
+ const SkPoint* xy = reinterpret_cast<const SkPoint*>(xyPtr);
+ SkPoint* uv = reinterpret_cast<SkPoint*>(uvPtr);
uv->fX = sx * xy->fX + kx * xy->fY + tx;
uv->fY = ky * xy->fX + sy * xy->fY + ty;
xyPtr += STRIDE;
@@ -119,7 +118,7 @@ namespace GrPathUtils {
// Setting constrainWithinTangents to true enforces this property. When this
// is true the cubic must be simple and dir must specify the orientation of
// the cubic. Otherwise, dir is ignored.
- void convertCubicToQuads(const GrPoint p[4],
+ void convertCubicToQuads(const SkPoint p[4],
SkScalar tolScale,
bool constrainWithinTangents,
SkPath::Direction dir,