| 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 7443df76139ab1d397f736ea4ea94cd9e9e761b8..37b07a42067387a5c3878e2caf1081c579d0626c 100644
|
| --- a/third_party/WebKit/Source/modules/canvas2d/ClipList.cpp
|
| +++ b/third_party/WebKit/Source/modules/canvas2d/ClipList.cpp
|
| @@ -18,6 +18,10 @@ void ClipList::clipPath(const SkPath& path, AntiAliasingMode antiAliasingMode, c
|
| newClip.m_antiAliasingMode = antiAliasingMode;
|
| newClip.m_path = path;
|
| newClip.m_path.transform(ctm);
|
| + if (m_clipList.isEmpty())
|
| + m_currentClipPath = path;
|
| + else
|
| + Op(m_currentClipPath, path, SkPathOp::kIntersect_SkPathOp, &m_currentClipPath);
|
| m_clipList.append(newClip);
|
| }
|
|
|
| @@ -28,13 +32,9 @@ void ClipList::playback(SkCanvas* canvas) const
|
| }
|
| }
|
|
|
| -SkPath ClipList::intersectPathWithClip(const SkPath& path) const
|
| +const SkPath& ClipList::getCurrentClipPath() 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;
|
| + return m_currentClipPath;
|
| }
|
|
|
| ClipList::ClipOp::ClipOp()
|
|
|