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

Issue 6489055: Add R-Tree data structure. (Closed)

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

Description

Add R-Tree data structure. Committed: https://code.google.com/p/skia/source/detail?r=5401

Patch Set 1 #

Total comments: 27

Patch Set 2 : Add comments, style cleanup. #

Patch Set 3 : Remove templated 'T' replace with void ptr, fix bug in bulk load. #

Patch Set 4 : No more templates. #

Patch Set 5 : Add SkRTree.cpp. #

Total comments: 6

Patch Set 6 : #

Total comments: 2

Patch Set 7 : Various fixes, added comments to BBoxHierarchy, etc. #

Total comments: 4

Patch Set 8 : Add explanation for min/max children, and fix unit test. #

Patch Set 9 : One more tweak to the unit test. #

Patch Set 10 : Wrap comment. #

Patch Set 11 : Fix bug when bulk loading single branch. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+848 lines, -0 lines) Patch
M gyp/core.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M gyp/tests.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
A src/core/SkBBoxHierarchy.h View 1 2 3 4 5 6 7 8 9 1 chunk +53 lines, -0 lines 0 comments Download
A src/core/SkRTree.h View 1 2 3 4 5 6 7 8 1 chunk +177 lines, -0 lines 0 comments Download
A src/core/SkRTree.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +470 lines, -0 lines 0 comments Download
A tests/RTreeTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +144 lines, -0 lines 0 comments Download

Messages

Total messages: 20
rileya
Sorry about the gigantic CL, but I don't think this can really be broken up ...
12 years, 3 months ago (2012-08-29 21:13:03 UTC) #1
bsalomon
On 2012/08/29 21:13:03, rileya wrote: > Sorry about the gigantic CL, but I don't think ...
12 years, 3 months ago (2012-08-29 21:25:09 UTC) #2
reed1
does every stitch of code need to be templated? that's a lot of duplication if ...
12 years, 3 months ago (2012-08-30 11:58:57 UTC) #3
robertphillips
LGTM + questions & comment suggestions http://codereview.appspot.com/6489055/diff/1/src/core/SkRTree.h File src/core/SkRTree.h (right): http://codereview.appspot.com/6489055/diff/1/src/core/SkRTree.h#newcode197 src/core/SkRTree.h:197: Comment? // Recursively ...
12 years, 3 months ago (2012-08-30 13:25:34 UTC) #4
bsalomon
https://codereview.appspot.com/6489055/diff/1/src/core/SkRTree.h File src/core/SkRTree.h (right): https://codereview.appspot.com/6489055/diff/1/src/core/SkRTree.h#newcode17 src/core/SkRTree.h:17: static inline uint32_t getArea(const SkIRect& rect); i_find_it_easier_to_read_file_local_non_member_functions_named_like_this_because_it_makes_it_more_obvious_that_they_arent_just_missing_a_this_arrow(); https://codereview.appspot.com/6489055/diff/1/src/core/SkRTree.h#newcode242 src/core/SkRTree.h:242: ...
12 years, 3 months ago (2012-08-30 13:48:04 UTC) #5
robertphillips
https://codereview.appspot.com/6489055/diff/1/tests/RTreeTest.cpp File tests/RTreeTest.cpp (right): https://codereview.appspot.com/6489055/diff/1/tests/RTreeTest.cpp#newcode57 tests/RTreeTest.cpp:57: return false; I think this might be clearer w/o ...
12 years, 3 months ago (2012-08-30 13:53:03 UTC) #6
rileya
@Mike on templating: As we discussed, I can change the T to a void*, T ...
12 years, 3 months ago (2012-08-30 14:42:28 UTC) #7
bsalomon
On 2012/08/30 14:42:28, rileya wrote: > @Mike on templating: As we discussed, I can change ...
12 years, 3 months ago (2012-08-30 14:54:13 UTC) #8
bsalomon
On 2012/08/30 14:54:13, bsalomon wrote: > On 2012/08/30 14:42:28, rileya wrote: > > @Mike on ...
12 years, 3 months ago (2012-08-30 14:57:10 UTC) #9
bsalomon
https://codereview.appspot.com/6489055/diff/1/src/core/SkRTree.h File src/core/SkRTree.h (right): https://codereview.appspot.com/6489055/diff/1/src/core/SkRTree.h#newcode388 src/core/SkRTree.h:388: static bool rectLessX(int&, const Branch lhs, const Branch rhs) ...
12 years, 3 months ago (2012-08-30 14:58:07 UTC) #10
rileya
Un-templated it, and moved implementation to a source file.
12 years, 3 months ago (2012-08-30 21:40:56 UTC) #11
reed1
I like much better now. 1. Can we see how this class gets used for ...
12 years, 3 months ago (2012-08-31 12:00:02 UTC) #12
bsalomon
https://codereview.appspot.com/6489055/diff/6003/src/core/SkRTree.h File src/core/SkRTree.h (right): https://codereview.appspot.com/6489055/diff/6003/src/core/SkRTree.h#newcode71 src/core/SkRTree.h:71: int getCount() const { return fCount; } Maybe a ...
12 years, 3 months ago (2012-08-31 15:51:57 UTC) #13
rileya
Addressed a few more things, also added a base class for this (naming could probably ...
12 years, 3 months ago (2012-09-04 16:20:10 UTC) #14
rileya
http://codereview.appspot.com/6489055/diff/6003/src/core/SkRTree.h File src/core/SkRTree.h (right): http://codereview.appspot.com/6489055/diff/6003/src/core/SkRTree.h#newcode44 src/core/SkRTree.h:44: On 2012/08/31 12:00:02, reed1 wrote: > nit: parameters should ...
12 years, 3 months ago (2012-09-04 16:20:20 UTC) #15
bsalomon
https://codereview.appspot.com/6489055/diff/8/src/core/SkRTree.cpp File src/core/SkRTree.cpp (right): https://codereview.appspot.com/6489055/diff/8/src/core/SkRTree.cpp#newcode28 src/core/SkRTree.cpp:28: SkASSERT(minChildren > maxChildren && minChildren > 0); maxChildren > ...
12 years, 3 months ago (2012-09-04 20:36:50 UTC) #16
rileya
http://codereview.appspot.com/6489055/diff/8/src/core/SkRTree.cpp File src/core/SkRTree.cpp (right): http://codereview.appspot.com/6489055/diff/8/src/core/SkRTree.cpp#newcode28 src/core/SkRTree.cpp:28: SkASSERT(minChildren > maxChildren && minChildren > 0); On 2012/09/04 ...
12 years, 3 months ago (2012-09-05 12:56:57 UTC) #17
bsalomon
LGTM (with two minor nits) https://codereview.appspot.com/6489055/diff/1014/src/core/SkBBoxHierarchy.h File src/core/SkBBoxHierarchy.h (right): https://codereview.appspot.com/6489055/diff/1014/src/core/SkBBoxHierarchy.h#newcode29 src/core/SkBBoxHierarchy.h:29: * structures than repeated ...
12 years, 3 months ago (2012-09-05 13:02:24 UTC) #18
rileya
Fixed the unit test, and addressed the nits. http://codereview.appspot.com/6489055/diff/1014/src/core/SkBBoxHierarchy.h File src/core/SkBBoxHierarchy.h (right): http://codereview.appspot.com/6489055/diff/1014/src/core/SkBBoxHierarchy.h#newcode29 src/core/SkBBoxHierarchy.h:29: * ...
12 years, 3 months ago (2012-09-05 13:38:26 UTC) #19
bsalomon
12 years, 3 months ago (2012-09-05 13:49:27 UTC) #20
On 2012/09/05 13:38:26, rileya wrote:
> Fixed the unit test, and addressed the nits.
> 
> http://codereview.appspot.com/6489055/diff/1014/src/core/SkBBoxHierarchy.h
> File src/core/SkBBoxHierarchy.h (right):
> 
>
http://codereview.appspot.com/6489055/diff/1014/src/core/SkBBoxHierarchy.h#ne...
> src/core/SkBBoxHierarchy.h:29: *        structures than repeated inserts)
until
> flushDeferredInserts is called or the first search.
> On 2012/09/05 13:02:24, bsalomon wrote:
> > line wrap
> Fixed.
> 
> http://codereview.appspot.com/6489055/diff/1014/src/core/SkRTree.h
> File src/core/SkRTree.h (right):
> 
> http://codereview.appspot.com/6489055/diff/1014/src/core/SkRTree.h#newcode46
> src/core/SkRTree.h:46: static SkRTree* Create(int minChildren, int
maxChildren);
> On 2012/09/05 13:02:24, bsalomon wrote:
> > Can you document the restrictions on min and max?
> Done.

LGTM
Sign in to reply to this message.

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