LGTM. I'll put a (partially completed) style guide on the Skia wiki soon. http://codereview.appspot.com/4272065/diff/1/include/gpu/SkGr.h File include/gpu/SkGr.h (right): http://codereview.appspot.com/4272065/diff/1/include/gpu/SkGr.h#newcode211 include/gpu/SkGr.h:211: rect->setEmpty(); It's Skia-style to always use braces. if (lala) { ... } else { ... }
fixed style
LGTM On Wed, Mar 23, 2011 at 10:56 AM, <Scroggo@gmail.com> wrote: > Reviewers: bsalomon, > > Message: > fixed style > > Description: > crashes on canvas/philip/tests/2d.voidreturn.html > > Please review this at http://codereview.appspot.com/4272065/ > > Affected files: > include/gpu/SkGr.h > src/gpu/SkGr.cpp > > > Index: include/gpu/SkGr.h > =================================================================== > --- include/gpu/SkGr.h (revision 983) > +++ include/gpu/SkGr.h (working copy) > @@ -207,7 +207,11 @@ > virtual GrSetOp getOp() const; > > virtual void getRect(GrRect* rect) const { > - *rect = Sk2Gr(*fCurr->fRect); > + if (!fCurr->fRect) { > + rect->setEmpty(); > + } else { > + *rect = Sk2Gr(*fCurr->fRect); > + } > } > > virtual GrPathIter* getPathIter() { > Index: src/gpu/SkGr.cpp > =================================================================== > --- src/gpu/SkGr.cpp (revision 983) > +++ src/gpu/SkGr.cpp (working copy) > @@ -166,10 +166,9 @@ > > GrClipType SkGrClipIterator::getType() const { > GrAssert(!this->isDone()); > - if (NULL != fCurr->fRect) { > + if (NULL == fCurr->fPath) { > return kRect_ClipType; > } else { > - GrAssert(NULL != fCurr->fPath); > return kPath_ClipType; > } > } > > >