aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-16 17:21:57 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-16 17:21:57 +0000
commit07f3ee10d34f09342abb93d758b5e151ff78f7a5 (patch)
treeee95d5ac1d798dc2a0f52b37acfa61d2cfe140b4 /include
parentff174b39474df20945fc7cc5c9d5bb68916f39a8 (diff)
use SkPath for GrPath, removing GrPathIter entirely
Diffstat (limited to 'include')
-rw-r--r--include/gpu/SkGr.h33
1 files changed, 4 insertions, 29 deletions
diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h
index 75099b2df6..65565c9b68 100644
--- a/include/gpu/SkGr.h
+++ b/include/gpu/SkGr.h
@@ -24,8 +24,8 @@
#include "GrConfig.h"
#include "GrContext.h"
#include "GrFontScaler.h"
-#include "GrPathIter.h"
#include "GrClipIterator.h"
+#include "GrPath.h"
// skia headers
#include "SkBitmap.h"
@@ -130,29 +130,6 @@ public:
////////////////////////////////////////////////////////////////////////////////
// Classes
-class SkGrPathIter : public GrPathIter {
-public:
- SkGrPathIter() { fPath = NULL; }
- SkGrPathIter(const SkPath& path) { reset(path); }
- virtual GrPathCmd next(GrPoint pts[]);
- virtual GrPathCmd next();
- virtual void rewind();
- virtual GrConvexHint convexHint() const;
- virtual bool getConservativeBounds(GrRect* rect) const;
-
- void reset(const SkPath& path) {
- fPath = &path;
- fIter.setPath(path, false);
- }
-private:
-
-#if !SK_SCALAR_IS_GR_SCALAR
- SkPoint fPoints[4];
-#endif
- SkPath::Iter fIter;
- const SkPath* fPath;
-};
-
class SkGrClipIterator : public GrClipIterator {
public:
SkGrClipIterator() { fClipStack = NULL; fCurr = NULL; }
@@ -176,9 +153,8 @@ public:
}
}
- virtual GrPathIter* getPathIter() {
- fPathIter.reset(*fCurr->fPath);
- return &fPathIter;
+ virtual const GrPath* getPath() {
+ return fCurr->fPath;
}
virtual GrPathFill getPathFill() const;
@@ -186,7 +162,6 @@ public:
private:
const SkClipStack* fClipStack;
SkClipStack::B2FIter fIter;
- SkGrPathIter fPathIter;
// SkClipStack's auto advances on each get
// so we store the current pos here.
const SkClipStack::B2FIter::Clip* fCurr;
@@ -218,7 +193,7 @@ public:
rect->fBottom = GrIntToScalar(r.fBottom);
}
- virtual GrPathIter* getPathIter() {
+ virtual const GrPath* getPath() {
SkASSERT(0);
return NULL;
}