use SkPath for GrPath, removing GrPathIter entirely
http://codereview.appspot.com/4515071/
git-svn-id: http://skia.googlecode.com/svn/trunk@1335 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrContext.cpp b/gpu/src/GrContext.cpp
index 8cb932b..3a4233a 100644
--- a/gpu/src/GrContext.cpp
+++ b/gpu/src/GrContext.cpp
@@ -19,7 +19,6 @@
#include "GrTextureCache.h"
#include "GrTextStrike.h"
#include "GrMemory.h"
-#include "GrPathIter.h"
#include "GrClipIterator.h"
#include "GrIndexBuffer.h"
#include "GrInOrderDrawBuffer.h"
@@ -1155,10 +1154,8 @@
///////////////////////////////////////////////////////////////////////////////
-void GrContext::drawPath(const GrPaint& paint,
- GrPathIter* path,
- GrPathFill fill,
- const GrPoint* translate) {
+void GrContext::drawPath(const GrPaint& paint, const GrPath& path,
+ GrPathFill fill, const GrPoint* translate) {
GrDrawTarget* target = this->prepareToDraw(paint, kUnbuffered_DrawCategory);
GrPathRenderer* pr = this->getPathRenderer(target, path, fill);
@@ -1180,8 +1177,8 @@
return;
}
}
- GrRect pathBounds;
- if (path->getConservativeBounds(&pathBounds)) {
+ GrRect pathBounds = path.getBounds();
+ if (!pathBounds.isEmpty()) {
GrIRect pathIBounds;
target->getViewMatrix().mapRect(&pathBounds, pathBounds);
pathBounds.roundOut(&pathIBounds);
@@ -1204,15 +1201,6 @@
pr->drawPath(target, enabledStages, path, fill, translate);
}
-void GrContext::drawPath(const GrPaint& paint,
- const GrPath& path,
- GrPathFill fill,
- const GrPoint* translate) {
- GrPath::Iter iter(path);
- this->drawPath(paint, &iter, fill, translate);
-}
-
-
////////////////////////////////////////////////////////////////////////////////
void GrContext::flush(int flagsBitfield) {
@@ -1483,7 +1471,7 @@
}
GrPathRenderer* GrContext::getPathRenderer(const GrDrawTarget* target,
- GrPathIter* path,
+ const GrPath& path,
GrPathFill fill) {
if (NULL != fCustomPathRenderer &&
fCustomPathRenderer->canDrawPath(target, path, fill)) {