From c445adfd59bd826c48b35b0041683932e4092228 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 5 Jan 2011 12:29:23 +0000 Subject: [PATCH] Merge WebKit at r72805: Update GraphicsContext method signatures Note that this is a partial revert of "Merge Webkit at r73109: graphics method signature changed." See http://trac.webkit.org/changeset/72926 Note that this is a backwards merge from Chromium release 9.0.600.0 to 9.0.597.0, to align with the Chromium 9 stable release branch. Change-Id: I7e999ae384bd791c5953f5edcf494a008e6fceea --- .../graphics/android/GraphicsContextAndroid.cpp | 27 ++++++---------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp index c1307e81b..06a53b13c 100644 --- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp @@ -839,15 +839,10 @@ void GraphicsContext::clipOut(const IntRect& r) } #if ENABLE(SVG) -void GraphicsContext::clipPath(const Path& pathToClip, WindRule clipRule) +void GraphicsContext::clipPath(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); @@ -1176,16 +1171,12 @@ void GraphicsContext::addPath(const Path& p) m_data->addPath(*p.platformPath()); } -void GraphicsContext::fillPath(const Path& pathToFill) +void GraphicsContext::fillPath() { - if (paintingDisabled()) + SkPath* path = m_data->getPath(); + if (paintingDisabled() || !path) return; - // FIXME: Be smarter about this. - beginPath(); - addPath(pathToFill); - - SkPath* path = m_data->getPath(); switch (this->fillRule()) { case RULE_NONZERO: path->setFillType(SkPath::kWinding_FillType); @@ -1205,15 +1196,12 @@ void GraphicsContext::fillPath(const Path& pathToFill) GC2CANVAS(this)->drawPath(*path, paint); } -void GraphicsContext::strokePath(const Path& pathToStroke) +void GraphicsContext::strokePath() { - if (paintingDisabled()) + const SkPath* path = m_data->getPath(); + if (paintingDisabled() || !path) return; - // FIXME: Be smarter about this. - beginPath(); - addPath(pathToStroke); - SkPaint paint; m_data->setupPaintStroke(&paint, 0); @@ -1221,7 +1209,6 @@ void GraphicsContext::strokePath(const Path& pathToStroke) m_common->state.strokePattern.get(), m_common->state.strokeGradient.get()); - const SkPath* path = m_data->getPath(); GC2CANVAS(this)->drawPath(*path, paint); } -- 2.11.0