Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: src/gpu/GrPathUtils.h

Issue 19449002: Replace all instances of GrRect with SkRect. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrPath.h ('k') | src/gpu/GrPathUtils.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1
2 /* 1 /*
3 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
4 * 3 *
5 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9
10 #ifndef GrPathUtils_DEFINED 8 #ifndef GrPathUtils_DEFINED
11 #define GrPathUtils_DEFINED 9 #define GrPathUtils_DEFINED
12 10
13 #include "GrRect.h" 11 #include "GrPoint.h"
12 #include "SkRect.h"
14 #include "SkPath.h" 13 #include "SkPath.h"
15 #include "SkTArray.h" 14 #include "SkTArray.h"
16 15
17 class SkMatrix; 16 class SkMatrix;
18 17
19 /** 18 /**
20 * Utilities for evaluating paths. 19 * Utilities for evaluating paths.
21 */ 20 */
22 namespace GrPathUtils { 21 namespace GrPathUtils {
23 SkScalar scaleToleranceToSrc(SkScalar devTol, 22 SkScalar scaleToleranceToSrc(SkScalar devTol,
24 const SkMatrix& viewM, 23 const SkMatrix& viewM,
25 const GrRect& pathBounds); 24 const SkRect& pathBounds);
26 25
27 /// Since we divide by tol if we're computing exact worst-case bounds, 26 /// Since we divide by tol if we're computing exact worst-case bounds,
28 /// very small tolerances will be increased to gMinCurveTol. 27 /// very small tolerances will be increased to gMinCurveTol.
29 int worstCasePointCount(const SkPath&, 28 int worstCasePointCount(const SkPath&,
30 int* subpaths, 29 int* subpaths,
31 SkScalar tol); 30 SkScalar tol);
32 31
33 /// Since we divide by tol if we're computing exact worst-case bounds, 32 /// Since we divide by tol if we're computing exact worst-case bounds,
34 /// very small tolerances will be increased to gMinCurveTol. 33 /// very small tolerances will be increased to gMinCurveTol.
35 uint32_t quadraticPointCount(const GrPoint points[], SkScalar tol); 34 uint32_t quadraticPointCount(const GrPoint points[], SkScalar tol);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Setting constrainWithinTangents to true enforces this property. When this 110 // Setting constrainWithinTangents to true enforces this property. When this
112 // is true the cubic must be simple and dir must specify the orientation of 111 // is true the cubic must be simple and dir must specify the orientation of
113 // the cubic. Otherwise, dir is ignored. 112 // the cubic. Otherwise, dir is ignored.
114 void convertCubicToQuads(const GrPoint p[4], 113 void convertCubicToQuads(const GrPoint p[4],
115 SkScalar tolScale, 114 SkScalar tolScale,
116 bool constrainWithinTangents, 115 bool constrainWithinTangents,
117 SkPath::Direction dir, 116 SkPath::Direction dir,
118 SkTArray<SkPoint, true>* quads); 117 SkTArray<SkPoint, true>* quads);
119 }; 118 };
120 #endif 119 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPath.h ('k') | src/gpu/GrPathUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698