Propagated AA flags through Ganesh's clip stack (in preparation for GL AA clipping)
http://codereview.appspot.com/6038051/
git-svn-id: http://skia.googlecode.com/svn/trunk@3685 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h
index f4dab53..6bc6549 100644
--- a/include/gpu/SkGr.h
+++ b/include/gpu/SkGr.h
@@ -103,14 +103,16 @@
void reset(const SkClipStack& clipStack);
// overrides
- virtual bool isDone() const { return NULL == fCurr; }
- virtual void next() { fCurr = fIter.next(); }
- virtual void rewind() { this->reset(*fClipStack); }
- virtual GrClipType getType() const;
+ virtual bool isDone() const SK_OVERRIDE { return NULL == fCurr; }
+ virtual void next() SK_OVERRIDE { fCurr = fIter.next(); }
+ virtual void rewind() SK_OVERRIDE { this->reset(*fClipStack); }
+ virtual GrClipType getType() const SK_OVERRIDE;
- virtual GrSetOp getOp() const;
+ virtual GrSetOp getOp() const SK_OVERRIDE;
- virtual void getRect(GrRect* rect) const {
+ virtual bool getDoAA() const SK_OVERRIDE;
+
+ virtual void getRect(GrRect* rect) const SK_OVERRIDE {
if (!fCurr->fRect) {
rect->setEmpty();
} else {
@@ -118,11 +120,11 @@
}
}
- virtual const GrPath* getPath() {
+ virtual const GrPath* getPath() SK_OVERRIDE {
return fCurr->fPath;
}
- virtual GrPathFill getPathFill() const;
+ virtual GrPathFill getPathFill() const SK_OVERRIDE;
private:
const SkClipStack* fClipStack;
@@ -132,46 +134,6 @@
const SkClipStack::B2FIter::Clip* fCurr;
};
-class SkGrRegionIterator : public GrClipIterator {
-public:
- SkGrRegionIterator() {}
- SkGrRegionIterator(const SkRegion& region) { this->reset(region); }
-
- void reset(const SkRegion& region) {
- fRegion = ®ion;
- fIter.reset(region);
- }
-
- // overrides
- virtual bool isDone() const { return fIter.done(); }
- virtual void next() { fIter.next(); }
- virtual void rewind() { this->reset(*fRegion); }
- virtual GrClipType getType() const { return kRect_ClipType; }
-
- virtual GrSetOp getOp() const { return kUnion_SetOp; }
-
- virtual void getRect(GrRect* rect) const {
- const SkIRect& r = fIter.rect();
- rect->fLeft = GrIntToScalar(r.fLeft);
- rect->fTop = GrIntToScalar(r.fTop);
- rect->fRight = GrIntToScalar(r.fRight);
- rect->fBottom = GrIntToScalar(r.fBottom);
- }
-
- virtual const GrPath* getPath() {
- SkASSERT(0);
- return NULL;
- }
-
- virtual GrPathFill getPathFill() const {
- SkASSERT(0);
- return kWinding_PathFill;
- }
-private:
- const SkRegion* fRegion;
- SkRegion::Iterator fIter;
-};
-
class SkGlyphCache;
class SkGrFontScaler : public GrFontScaler {