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

Issue 150663014: Change growth function for SkWriter32 (Closed)

Created:
6 years, 10 months ago by iancottrell
Modified:
6 years, 10 months ago
Reviewers:
tomhudson, mtklein, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@no_external_test
Visibility:
Public.

Description

Change growth function for SkWriter32 Add setCountExact to SkTDArray to allow external control of array growth. Use it to allow SkWriter to control the buffer growth pattern. Change buffer growth pattern to 1.5n+4096 BUG=skia:2125 Committed: http://code.google.com/p/skia/source/detail?r=13401

Patch Set 1 #

Total comments: 6

Patch Set 2 : Add documentation #

Total comments: 4

Patch Set 3 : Cleaning up the SkTDArray growth code to be more understandable #

Patch Set 4 : Rename growTo to resizeStorageTo #

Total comments: 6

Patch Set 5 : Add comment and assert. #

Total comments: 6

Patch Set 6 : Make adjustCount private and add TODO for setCountExact #

Patch Set 7 : Rebase patch #

Patch Set 8 : Read back reserved space in case it is bigger #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -28 lines) Patch
M include/core/SkTDArray.h View 1 2 3 4 5 4 chunks +62 lines, -21 lines 0 comments Download
M src/core/SkWriter32.cpp View 1 2 3 4 5 6 7 1 chunk +9 lines, -7 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
iancottrell
This one might need some discussion. This cl takes the approach of adding explicit size ...
6 years, 10 months ago (2014-02-07 15:30:05 UTC) #1
reed1
https://codereview.chromium.org/150663014/diff/1/include/core/SkTDArray.h File include/core/SkTDArray.h (right): https://codereview.chromium.org/150663014/diff/1/include/core/SkTDArray.h#newcode154 include/core/SkTDArray.h:154: void setCount(int count) { yikes -- what can this ...
6 years, 10 months ago (2014-02-07 15:37:49 UTC) #2
iancottrell
https://codereview.chromium.org/150663014/diff/1/include/core/SkTDArray.h File include/core/SkTDArray.h (right): https://codereview.chromium.org/150663014/diff/1/include/core/SkTDArray.h#newcode154 include/core/SkTDArray.h:154: void setCount(int count) { On 2014/02/07 15:37:49, reed1 wrote: ...
6 years, 10 months ago (2014-02-07 16:54:15 UTC) #3
reed1
Thank you for iterating on this. https://codereview.chromium.org/150663014/diff/50001/include/core/SkTDArray.h File include/core/SkTDArray.h (right): https://codereview.chromium.org/150663014/diff/50001/include/core/SkTDArray.h#newcode163 include/core/SkTDArray.h:163: } else { ...
6 years, 10 months ago (2014-02-07 17:05:15 UTC) #4
iancottrell
On 2014/02/07 17:05:15, reed1 wrote: > Thank you for iterating on this. > > https://codereview.chromium.org/150663014/diff/50001/include/core/SkTDArray.h ...
6 years, 10 months ago (2014-02-07 17:44:04 UTC) #5
reed1
lgtm https://codereview.chromium.org/150663014/diff/160001/include/core/SkTDArray.h File include/core/SkTDArray.h (right): https://codereview.chromium.org/150663014/diff/160001/include/core/SkTDArray.h#newcode387 include/core/SkTDArray.h:387: * the previous allocation size, or about fCount. ...
6 years, 10 months ago (2014-02-07 18:00:05 UTC) #6
iancottrell
https://codereview.chromium.org/150663014/diff/160001/include/core/SkTDArray.h File include/core/SkTDArray.h (right): https://codereview.chromium.org/150663014/diff/160001/include/core/SkTDArray.h#newcode387 include/core/SkTDArray.h:387: * the previous allocation size, or about fCount. On ...
6 years, 10 months ago (2014-02-11 10:15:06 UTC) #7
mtklein
https://codereview.chromium.org/150663014/diff/210001/include/core/SkTDArray.h File include/core/SkTDArray.h (right): https://codereview.chromium.org/150663014/diff/210001/include/core/SkTDArray.h#newcode160 include/core/SkTDArray.h:160: void setCount(int count) { I suspect that we'll ultimately ...
6 years, 10 months ago (2014-02-11 12:52:55 UTC) #8
iancottrell
https://codereview.chromium.org/150663014/diff/210001/include/core/SkTDArray.h File include/core/SkTDArray.h (right): https://codereview.chromium.org/150663014/diff/210001/include/core/SkTDArray.h#newcode160 include/core/SkTDArray.h:160: void setCount(int count) { On 2014/02/11 12:52:55, mtklein wrote: ...
6 years, 10 months ago (2014-02-11 13:25:04 UTC) #9
mtklein
On 2014/02/11 13:25:04, iancottrell wrote: > https://codereview.chromium.org/150663014/diff/210001/include/core/SkTDArray.h > File include/core/SkTDArray.h (right): > > https://codereview.chromium.org/150663014/diff/210001/include/core/SkTDArray.h#newcode160 > ...
6 years, 10 months ago (2014-02-11 13:27:26 UTC) #10
iancottrell
The CQ bit was checked by iancottrell@google.com
6 years, 10 months ago (2014-02-11 13:29:50 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/iancottrell@google.com/150663014/220006
6 years, 10 months ago (2014-02-11 13:29:56 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-11 13:29:58 UTC) #13
commit-bot: I haz the power
Failed to apply patch for src/core/SkWriter32.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 10 months ago (2014-02-11 13:29:59 UTC) #14
iancottrell
The CQ bit was checked by iancottrell@google.com
6 years, 10 months ago (2014-02-11 14:58:17 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/iancottrell@google.com/150663014/400001
6 years, 10 months ago (2014-02-11 14:58:24 UTC) #16
commit-bot: I haz the power
Change committed as 13401
6 years, 10 months ago (2014-02-11 15:07:29 UTC) #17
mtklein
A revert of this CL has been created in https://codereview.chromium.org/132313013/ by mtklein@google.com. The reason for ...
6 years, 10 months ago (2014-02-11 15:56:39 UTC) #18
iancottrell
6 years, 10 months ago (2014-02-11 16:29:30 UTC) #19
Adding stuff to deal with reset buffers.

Powered by Google App Engine
This is Rietveld 408576698