diff options
author | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-20 03:27:22 +0000 |
---|---|---|
committer | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-20 03:27:22 +0000 |
commit | a1808527030b635ba132a1e0d5e3de22dd44b20b (patch) | |
tree | 62dc94441cc00e8b56323ff7eee71cd3466cafdc /webkit/port/platform/graphics | |
parent | 52f693bfdbbe27540c1c8c6cd77678d8ff62c91f (diff) | |
download | chromium_src-a1808527030b635ba132a1e0d5e3de22dd44b20b.zip chromium_src-a1808527030b635ba132a1e0d5e3de22dd44b20b.tar.gz chromium_src-a1808527030b635ba132a1e0d5e3de22dd44b20b.tar.bz2 |
non-third_party side of merge 38389:38450.
Review URL: http://codereview.chromium.org/11301
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/platform/graphics')
-rw-r--r-- | webkit/port/platform/graphics/GraphicsContextSkia.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/webkit/port/platform/graphics/GraphicsContextSkia.cpp b/webkit/port/platform/graphics/GraphicsContextSkia.cpp index c85a6e1..5579170 100644 --- a/webkit/port/platform/graphics/GraphicsContextSkia.cpp +++ b/webkit/port/platform/graphics/GraphicsContextSkia.cpp @@ -392,6 +392,17 @@ void GraphicsContext::clipOutEllipseInRect(const IntRect& rect) platformContext()->canvas()->clipPath(path, SkRegion::kDifference_Op); } +void GraphicsContext::clipPath(WindRule clipRule) +{ + if (paintingDisabled()) + return; + + const SkPath* oldPath = platformContext()->currentPath(); + SkPath path(*oldPath); + path.setFillType(clipRule == RULE_EVENODD ? SkPath::kEvenOdd_FillType : SkPath::kWinding_FillType); + platformContext()->canvas()->clipPath(path); +} + void GraphicsContext::clipToImageBuffer(const FloatRect& rect, const ImageBuffer* imageBuffer) { |