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

Side by Side Diff: include/core/SkPath.h

Issue 22911002: Update how SkPath handles fGenerationID and fSourcePath, and add tests to cover. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: ued -> used Created 7 years, 4 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 | « no previous file | src/core/SkPath.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkPath_DEFINED 10 #ifndef SkPath_DEFINED
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 * 159 *
160 * @return true if this path is an oval. 160 * @return true if this path is an oval.
161 * Tracking whether a path is an oval is considered an 161 * Tracking whether a path is an oval is considered an
162 * optimization for performance and so some paths that are in 162 * optimization for performance and so some paths that are in
163 * fact ovals can report false. 163 * fact ovals can report false.
164 */ 164 */
165 bool isOval(SkRect* rect) const; 165 bool isOval(SkRect* rect) const;
166 166
167 /** Clear any lines and curves from the path, making it empty. This frees up 167 /** Clear any lines and curves from the path, making it empty. This frees up
168 internal storage associated with those segments. 168 internal storage associated with those segments.
169 On Android, does not change fSourcePath.
169 */ 170 */
170 void reset(); 171 void reset();
171 172
172 /** Similar to reset(), in that all lines and curves are removed from the 173 /** Similar to reset(), in that all lines and curves are removed from the
173 path. However, any internal storage for those lines/curves is retained, 174 path. However, any internal storage for those lines/curves is retained,
174 making reuse of the path potentially faster. 175 making reuse of the path potentially faster.
176 On Android, does not change fSourcePath.
175 */ 177 */
176 void rewind(); 178 void rewind();
177 179
178 /** Returns true if the path is empty (contains no lines or curves) 180 /** Returns true if the path is empty (contains no lines or curves)
179 181
180 @return true if the path is empty (contains no lines or curves) 182 @return true if the path is empty (contains no lines or curves)
181 */ 183 */
182 bool isEmpty() const; 184 bool isEmpty() const;
183 185
184 /** 186 /**
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts, 1001 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts,
1000 bool* isClosed, Direction* direction) const; 1002 bool* isClosed, Direction* direction) const;
1001 1003
1002 friend class SkAutoPathBoundsUpdate; 1004 friend class SkAutoPathBoundsUpdate;
1003 friend class SkAutoDisableOvalCheck; 1005 friend class SkAutoDisableOvalCheck;
1004 friend class SkAutoDisableDirectionCheck; 1006 friend class SkAutoDisableDirectionCheck;
1005 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo 1007 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo
1006 }; 1008 };
1007 1009
1008 #endif 1010 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698