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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/ClipList.cpp

Issue 1630683002: Canvas2d: addHitRegion() should take clipping region into account. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 11 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/modules/canvas2d/ClipList.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/modules/canvas2d/ClipList.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/ClipList.cpp b/third_party/WebKit/Source/modules/canvas2d/ClipList.cpp
index 427a26a9c9ce37a81a95c97965c249be2790aa66..7443df76139ab1d397f736ea4ea94cd9e9e761b8 100644
--- a/third_party/WebKit/Source/modules/canvas2d/ClipList.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/ClipList.cpp
@@ -6,6 +6,7 @@
#include "platform/transforms/AffineTransform.h"
#include "third_party/skia/include/core/SkCanvas.h"
+#include "third_party/skia/include/pathops/SkPathOps.h"
namespace blink {
@@ -27,6 +28,15 @@ void ClipList::playback(SkCanvas* canvas) const
}
}
+SkPath ClipList::intersectPathWithClip(const SkPath& path) const
+{
+ SkPath total = path;
+ for (const ClipOp* it = m_clipList.begin(); it < m_clipList.end(); it++) {
+ Op(total, it->m_path, SkPathOp::kIntersect_SkPathOp, &total);
+ }
+ return total;
+}
+
ClipList::ClipOp::ClipOp()
: m_antiAliasingMode(AntiAliased)
{ }
« no previous file with comments | « third_party/WebKit/Source/modules/canvas2d/ClipList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698