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

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

Issue 1072273007: Improve the curve tessellation subdivision of the path renderers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrTessellatingPathRenderer.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 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * 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
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrPathUtils_DEFINED 8 #ifndef GrPathUtils_DEFINED
9 #define GrPathUtils_DEFINED 9 #define GrPathUtils_DEFINED
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // represent the implicit form of the cubic as f(x,y,w) = K^3 - LM. The w te rm 161 // represent the implicit form of the cubic as f(x,y,w) = K^3 - LM. The w te rm
162 // will always be 1. The output is stored in the array klm, where the values are: 162 // will always be 1. The output is stored in the array klm, where the values are:
163 // K = (klm[0], klm[1], klm[2]) 163 // K = (klm[0], klm[1], klm[2])
164 // L = (klm[3], klm[4], klm[5]) 164 // L = (klm[3], klm[4], klm[5])
165 // M = (klm[6], klm[7], klm[8]) 165 // M = (klm[6], klm[7], klm[8])
166 // 166 //
167 // Notice that the klm lines are calculated in the same space as the input c ontrol points. 167 // Notice that the klm lines are calculated in the same space as the input c ontrol points.
168 // If you transform the points the lines will also need to be transformed. T his can be done 168 // If you transform the points the lines will also need to be transformed. T his can be done
169 // by mapping the lines with the inverse-transpose of the matrix used to map the points. 169 // by mapping the lines with the inverse-transpose of the matrix used to map the points.
170 void getCubicKLM(const SkPoint p[4], SkScalar klm[9]); 170 void getCubicKLM(const SkPoint p[4], SkScalar klm[9]);
171
172 // When tessellating curved paths into linear segments, this defines the max imum distance
173 // in screen space which a segment may deviate from the mathmatically correc t value.
174 // Above this value, the segment will be subdivided.
175 // This value was chosen to approximate the supersampling accuracy of the ra ster path (16
176 // samples, or one quarter pixel).
177 static const SkScalar kDefaultTolerance = SkDoubleToScalar(0.25);
171 }; 178 };
172 #endif 179 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698