Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1208)

Issue 14502003: Add SkSTDArray.

Created:
7 years, 8 months ago by bungeman-skia
Modified:
5 years, 8 months ago
Reviewers:
joshualitt, mtklein, reed1
CC:
skia-review_googlegroups.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add SkSTDArray.

Patch Set 1 #

Patch Set 2 : Remove unwanted change. #

Total comments: 7

Patch Set 3 : Fix swap and preserve fArray==NULL when count==0. #

Patch Set 4 : Actually upload the previous change. #

Total comments: 1

Patch Set 5 : Preserve count==0, detatch()==NULL. #

Total comments: 1

Patch Set 6 : Add doc. #

Patch Set 7 : Hopefully clearer version. #

Total comments: 2

Patch Set 8 : Clean up and add tests. #

Patch Set 9 : Because reasons. #

Patch Set 10 : Clean up. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+275 lines, -67 lines) Patch
M gyp/tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkTDArray.h View 1 2 3 4 5 6 7 8 9 10 chunks +173 lines, -67 lines 2 comments Download
A tests/TDArrayTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +101 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
bungeman-skia
As if Skia needed another container, this introduces SkSTDArray, based on how SkSTArray is implemented. ...
7 years, 8 months ago (2013-04-25 22:41:30 UTC) #1
bungeman-skia
With Patch Set 5 this all works more like it used to, and more like ...
7 years, 8 months ago (2013-04-26 15:58:36 UTC) #2
reed1
https://codereview.chromium.org/14502003/diff/2001/include/core/SkTDArray.h File include/core/SkTDArray.h (right): https://codereview.chromium.org/14502003/diff/2001/include/core/SkTDArray.h#newcode64 include/core/SkTDArray.h:64: if (fArray == fPreAllocMemArray) { && fCount > 0 ...
7 years, 8 months ago (2013-04-26 16:06:52 UTC) #3
bungeman-skia
https://codereview.chromium.org/14502003/diff/2001/include/core/SkTDArray.h File include/core/SkTDArray.h (right): https://codereview.chromium.org/14502003/diff/2001/include/core/SkTDArray.h#newcode64 include/core/SkTDArray.h:64: if (fArray == fPreAllocMemArray) { On 2013/04/26 16:06:52, reed1 ...
7 years, 8 months ago (2013-04-26 16:26:16 UTC) #4
bungeman-skia
So I've found a simpler method of doing what I want to do in the ...
7 years, 7 months ago (2013-04-29 21:28:33 UTC) #5
reed1
seems fine, lets park until needed.
7 years, 7 months ago (2013-04-30 17:40:41 UTC) #6
bungeman-skia
Joshua was complaining this didn't exist today, so I dug it out of retirement for ...
5 years, 8 months ago (2015-04-22 22:20:29 UTC) #8
reed1
Since it seems to add complexity (and overhead) to all SkTDArrays, is there any way ...
5 years, 8 months ago (2015-04-22 23:02:12 UTC) #9
joshualitt
5 years, 8 months ago (2015-04-22 23:21:51 UTC) #10
On 2015/04/22 23:02:12, reed1 wrote:
> Since it seems to add complexity (and overhead) to all SkTDArrays, is there
any
> way to add it "template-wise" so that instances that do not take advantage of
it
> don't have to pay for the extra code/size?
> 
> Where did Josh want to use this?
src/gpu/GrBatchAtlas.h:98 SkSTArray<kMinItems, int, true> fPlotsToUpdate, I can,
however, use SkAutoSTMalloc and just manually do the copying / moving about
myself.  If I have a chance tomorrow, maybe I can find a way to reduce the cost.
> 
> https://codereview.chromium.org/14502003/diff/61001/include/core/SkTDArray.h
> File include/core/SkTDArray.h (right):
> 
>
https://codereview.chromium.org/14502003/diff/61001/include/core/SkTDArray.h#...
> include/core/SkTDArray.h:389: size_t fReserve;
> Why change fReserve and fCount from int to size_t? Clearly in some places we
had
> to add casts. Can these stay ints?

Powered by Google App Engine
This is Rietveld 408576698