diff options
author | Ben Murdoch <benm@google.com> | 2011-05-06 11:54:21 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-10 15:38:33 +0100 |
commit | aa3c571eb58ddae5c8d2de8a7899e8d7f3f80b0e (patch) | |
tree | 7da4a0005a134e105c6e6c8cf004de6058473042 | |
parent | 90237ab2393d82e868358ee40f82248c19d33e41 (diff) | |
download | external_webkit-aa3c571eb58ddae5c8d2de8a7899e8d7f3f80b0e.zip external_webkit-aa3c571eb58ddae5c8d2de8a7899e8d7f3f80b0e.tar.gz external_webkit-aa3c571eb58ddae5c8d2de8a7899e8d7f3f80b0e.tar.bz2 |
Merge WebKit at r74534: Fix GraphicsContextAndroid.cpp (Paths)
Update our platform FraphicsContext after upstream Path
refactoring.
See http://trac.webkit.org/changeset/72926
Change-Id: I574ede8dfc74fce5edc3558cd63c6b703f45fe7c
-rw-r--r-- | WebCore/platform/graphics/android/GraphicsContextAndroid.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp index 429c2f1..3744796 100644 --- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp @@ -904,10 +904,15 @@ void GraphicsContext::clipOut(const IntRect& r) } #if ENABLE(SVG) -void GraphicsContext::clipPath(WindRule clipRule) +void GraphicsContext::clipPath(const Path& pathToClip, WindRule clipRule) { if (paintingDisabled()) return; + + // FIXME: Be smarter about this. + beginPath(); + addPath(pathToClip); + const SkPath* oldPath = m_data->getPath(); SkPath path(*oldPath); path.setFillType(clipRule == RULE_EVENODD ? SkPath::kEvenOdd_FillType : SkPath::kWinding_FillType); @@ -1236,8 +1241,12 @@ void GraphicsContext::addPath(const Path& p) m_data->addPath(*p.platformPath()); } -void GraphicsContext::fillPath() +void GraphicsContext::fillPath(const Path& pathToFill) { + // FIXME: Be smarter about this. + beginPath(); + addPath(pathToFill); + SkPath* path = m_data->getPath(); if (paintingDisabled() || !path) return; @@ -1261,8 +1270,12 @@ void GraphicsContext::fillPath() GC2CANVAS(this)->drawPath(*path, paint); } -void GraphicsContext::strokePath() +void GraphicsContext::strokePath(const Path& pathToStroke) { + // FIXME: Be smarter about this. + beginPath(); + addPath(pathToStroke); + const SkPath* path = m_data->getPath(); if (paintingDisabled() || !path) return; |