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

Unified Diff: third_party/WebKit/Source/platform/graphics/Path.cpp

Issue 2675793003: use SkPath::computeTightBounds (Closed)
Patch Set: so I guess it IS needed Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/Path.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Path.cpp b/third_party/WebKit/Source/platform/graphics/Path.cpp
index 8b852c76663b627ce5520333421a9df85f67dea8..ae8a6b4b2d9f0cfb9b662ce88b8cc94e504ec01b 100644
--- a/third_party/WebKit/Source/platform/graphics/Path.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Path.cpp
@@ -109,14 +109,9 @@ bool Path::strokeContains(const FloatPoint& point,
namespace {
FloatRect pathBounds(const SkPath& path, Path::BoundsType boundsType) {
- SkRect bounds;
- if (boundsType == Path::BoundsType::Conservative ||
- !TightBounds(path, &bounds)) {
- return path.getBounds();
- }
-
- DCHECK_EQ(boundsType, Path::BoundsType::Exact);
- return bounds;
+ return boundsType == Path::BoundsType::Conservative
+ ? path.getBounds()
+ : path.computeTightBounds();
}
} // anonymous ns
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698