diff options
Diffstat (limited to 'include/gpu/SkGr.h')
-rw-r--r-- | include/gpu/SkGr.h | 58 |
1 files changed, 10 insertions, 48 deletions
diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h index f4dab532ed..6bc65499a2 100644 --- a/include/gpu/SkGr.h +++ b/include/gpu/SkGr.h @@ -103,14 +103,16 @@ public: 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 @@ public: } } - 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 @@ private: 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 { |