Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(568)

Issue 6919044: Adding quickContains API method to SkClipStack (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by junov1
Modified:
11 years, 6 months ago
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Adding quickContains API method to SkClipStack BUG=http://code.google.com/p/chromium/issues/detail?id=164580 TEST=unit test ClipStack/quickContains Committed: https://code.google.com/p/skia/source/detail?r=6760

Patch Set 1 #

Total comments: 8

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -0 lines) Patch
include/core/SkClipStack.h View 1 chunk +7 lines, -0 lines 0 comments Download
src/core/SkClipStack.cpp View 1 2 3 1 chunk +25 lines, -0 lines 1 comment Download
tests/ClipStackTest.cpp View 1 2 3 2 chunks +179 lines, -0 lines 0 comments Download

Messages

Total messages: 11
junov1
PTAL. Brian, Robert, I think this might intersect with stuff you are doing on the ...
11 years, 6 months ago (2012-12-10 20:09:16 UTC) #1
bsalomon
https://codereview.appspot.com/6919044/diff/1/src/core/SkClipStack.cpp File src/core/SkClipStack.cpp (right): https://codereview.appspot.com/6919044/diff/1/src/core/SkClipStack.cpp#newcode502 src/core/SkClipStack.cpp:502: SkDeque::F2BIter iter(fDeque); Might be clearer to use the SkClipStack::Iter. ...
11 years, 6 months ago (2012-12-11 17:19:12 UTC) #2
robertphillips
LGTM + comment suggestions & a question https://codereview.appspot.com/6919044/diff/1/src/core/SkClipStack.cpp File src/core/SkClipStack.cpp (right): https://codereview.appspot.com/6919044/diff/1/src/core/SkClipStack.cpp#newcode508 src/core/SkClipStack.cpp:508: if (element->isInverseFilled()) ...
11 years, 6 months ago (2012-12-11 20:48:56 UTC) #3
junov1
Patch.
11 years, 6 months ago (2012-12-11 21:10:57 UTC) #4
bsalomon
https://codereview.appspot.com/6919044/diff/9001/src/core/SkClipStack.cpp File src/core/SkClipStack.cpp (right): https://codereview.appspot.com/6919044/diff/9001/src/core/SkClipStack.cpp#newcode509 src/core/SkClipStack.cpp:509: if (SkRect::Intersects(element->getBounds(), rect)) style nit: {}'s here a few ...
11 years, 6 months ago (2012-12-11 22:47:59 UTC) #5
junov1
Patch. I beefed-up unit testing to catch problems related to clip element traversal.
11 years, 6 months ago (2012-12-12 15:54:30 UTC) #6
bsalomon
https://codereview.appspot.com/6919044/diff/12001/src/core/SkClipStack.cpp File src/core/SkClipStack.cpp (right): https://codereview.appspot.com/6919044/diff/12001/src/core/SkClipStack.cpp#newcode503 src/core/SkClipStack.cpp:503: const Element* element = iter.prev(); Hm... I think this ...
11 years, 6 months ago (2012-12-12 16:17:18 UTC) #7
junov1
On 2012/12/12 16:17:18, bsalomon wrote: > https://codereview.appspot.com/6919044/diff/12001/src/core/SkClipStack.cpp > File src/core/SkClipStack.cpp (right): > > https://codereview.appspot.com/6919044/diff/12001/src/core/SkClipStack.cpp#newcode503 > ...
11 years, 6 months ago (2012-12-12 16:44:09 UTC) #8
junov1
FYI: void* SkDeque::Iter::prev() { char* pos = fPos; if (pos) { // if we were ...
11 years, 6 months ago (2012-12-12 16:44:44 UTC) #9
bsalomon
On 2012/12/12 16:44:44, junov1 wrote: > FYI: > > void* SkDeque::Iter::prev() { > char* pos ...
11 years, 6 months ago (2012-12-12 16:49:17 UTC) #10
bsalomon
11 years, 6 months ago (2012-12-12 16:49:34 UTC) #11
On 2012/12/12 16:49:17, bsalomon wrote:
> On 2012/12/12 16:44:44, junov1 wrote:
> > FYI:
> > 
> > void* SkDeque::Iter::prev() {
> >     char* pos = fPos;
> > 
> >     if (pos) {   // if we were valid, try to move to the prior setting
> >         char* prev = pos - fElemSize;
> >         SkASSERT(prev >= fCurBlock->fBegin - fElemSize);
> >         if (prev < fCurBlock->fBegin) { // exhausted this chunk, move to
prior
> >             do {
> >                 fCurBlock = fCurBlock->fPrev;
> >             } while (fCurBlock != NULL && fCurBlock->fEnd == NULL);
> >             prev = fCurBlock ? fCurBlock->fEnd - fElemSize : NULL;
> >         }
> >         fPos = prev;
> >     }
> >     return pos;
> > }
> 
> Sorry you're right... I was thinking about the SkTLList iterator.
> 
> LTM

LGTM, I mean.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b