Update our platform FraphicsContext after upstream Path
refactoring.
See http://trac.webkit.org/changeset/72926
Change-Id: I574ede8dfc74fce5edc3558cd63c6b703f45fe7c
-void GraphicsContext::clipPath(WindRule clipRule)
+void GraphicsContext::clipPath(const Path& pathToClip, WindRule clipRule)
{
if (paintingDisabled())
return;
{
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);
const SkPath* oldPath = m_data->getPath();
SkPath path(*oldPath);
path.setFillType(clipRule == RULE_EVENODD ? SkPath::kEvenOdd_FillType : SkPath::kWinding_FillType);
m_data->addPath(*p.platformPath());
}
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;
SkPath* path = m_data->getPath();
if (paintingDisabled() || !path)
return;
GC2CANVAS(this)->drawPath(*path, paint);
}
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;
const SkPath* path = m_data->getPath();
if (paintingDisabled() || !path)
return;