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

Unified Diff: include/core/SkPathRef.h

Issue 1261773002: change getBounds to return 0000 iff there are zero points (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPath.h ('k') | tests/PathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPathRef.h
diff --git a/include/core/SkPathRef.h b/include/core/SkPathRef.h
index ae8945de0880f5182bed21f2560cea0040ca70b5..e7cc31cff43ef6d2947c822626a0709a034c6077 100644
--- a/include/core/SkPathRef.h
+++ b/include/core/SkPathRef.h
@@ -278,13 +278,7 @@ private:
// Return true if the computed bounds are finite.
static bool ComputePtBounds(SkRect* bounds, const SkPathRef& ref) {
- int count = ref.countPoints();
- if (count <= 1) { // we ignore just 1 point (moveto)
- bounds->setEmpty();
- return count ? ref.points()->isFinite() : true;
- } else {
- return bounds->setBoundsCheck(ref.points(), count);
- }
+ return bounds->setBoundsCheck(ref.points(), ref.countPoints());
}
// called, if dirty, by getBounds()
« no previous file with comments | « include/core/SkPath.h ('k') | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698