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

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

Issue 1690173003: Canvas2d: Make the intersection computation O(1) instead of O(n) in ClipList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/platform/graphics/Path.h ('k') | 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 963a955fe3f9a023ea0b45598e402a18c4b490d4..7f36cbccdd42c494e9d7ec90408c27fd2d996ee1 100644
--- a/third_party/WebKit/Source/platform/graphics/Path.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Path.cpp
@@ -50,6 +50,11 @@ Path::Path(const Path& other)
m_path = SkPath(other.m_path);
}
+Path::Path(const SkPath& other)
+{
+ m_path = other;
+}
+
Path::~Path()
{
}
@@ -508,6 +513,11 @@ bool Path::unionPath(const Path& other)
return Op(m_path, other.m_path, kUnion_SkPathOp, &m_path);
}
+bool Path::intersectPath(const Path& other)
+{
+ return Op(m_path, other.m_path, kIntersect_SkPathOp, &m_path);
+}
+
#if ENABLE(ASSERT)
bool ellipseIsRenderable(float startAngle, float endAngle)
{
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Path.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698