| Index: Source/core/html/canvas/ClipList.cpp
|
| diff --git a/Source/core/html/canvas/ClipList.cpp b/Source/core/html/canvas/ClipList.cpp
|
| index 403ed7450523f57293078ea57be6617b4c4582df..a3a4883cf076cfe6ee39fdfd1455ae33db52aea9 100644
|
| --- a/Source/core/html/canvas/ClipList.cpp
|
| +++ b/Source/core/html/canvas/ClipList.cpp
|
| @@ -6,40 +6,36 @@
|
|
|
| #include "core/html/canvas/ClipList.h"
|
|
|
| -#include "platform/graphics/GraphicsContext.h"
|
| -#include "platform/graphics/Path.h"
|
| #include "platform/transforms/AffineTransform.h"
|
| +#include "third_party/skia/include/core/SkCanvas.h"
|
|
|
| namespace blink {
|
|
|
| ClipList::ClipList(const ClipList& other) : m_clipList(other.m_clipList) { }
|
|
|
| -void ClipList::clipPath(const Path& path, WindRule windRule, AntiAliasingMode antiAliasingMode, const AffineTransform& ctm)
|
| +void ClipList::clipPath(const SkPath& path, AntiAliasingMode antiAliasingMode, const SkMatrix& ctm)
|
| {
|
| ClipOp newClip;
|
| newClip.m_antiAliasingMode = antiAliasingMode;
|
| - newClip.m_windRule = windRule;
|
| newClip.m_path = path;
|
| newClip.m_path.transform(ctm);
|
| m_clipList.append(newClip);
|
| }
|
|
|
| -void ClipList::playback(GraphicsContext* context) const
|
| +void ClipList::playback(SkCanvas* canvas) const
|
| {
|
| for (const ClipOp* it = m_clipList.begin(); it < m_clipList.end(); it++) {
|
| - context->clipPath(it->m_path, it->m_windRule, it->m_antiAliasingMode);
|
| + canvas->clipPath(it->m_path, SkRegion::kIntersect_Op, it->m_antiAliasingMode == AntiAliased);
|
| }
|
| }
|
|
|
| ClipList::ClipOp::ClipOp()
|
| : m_antiAliasingMode(AntiAliased)
|
| - , m_windRule(RULE_NONZERO)
|
| { }
|
|
|
| ClipList::ClipOp::ClipOp(const ClipOp& other)
|
| : m_path(other.m_path)
|
| , m_antiAliasingMode(other.m_antiAliasingMode)
|
| - , m_windRule(other.m_windRule)
|
| { }
|
|
|
| } // namespace blink
|
|
|