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

Issue 2488523003: Make SkSmallAllocator obey the RAII invariants and be expandable (Closed)

Created:
4 years, 1 month ago by herb_g
Modified:
4 years, 1 month ago
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Make SkSmallAllocator obey the RAII invariants and move to heap structures when needed. The biggest change is to the API which allowed code to bypass the destruction invariants. This destruction bypass feature was needed in only one use, and is totally encapsulated using createWithIniterT. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2488523003 Committed: https://skia.googlesource.com/skia/+/d5dc657b8c3ac916f98005dafdedafe02f023449 Committed: https://skia.googlesource.com/skia/+/c18b5f8f57a4efc5d5d1e399ed8bd3bd02c592ab Committed: https://skia.googlesource.com/skia/+/bf6d80a7a496f96589f1592ee5f644002fbb9f6d

Patch Set 1 #

Patch Set 2 : Use STArray for holding info #

Patch Set 3 : fix test #

Patch Set 4 : fix includes #

Total comments: 8

Patch Set 5 : Remove test problem. #

Patch Set 6 : Desturctor name change #

Total comments: 1

Patch Set 7 : Make SkSmallAllocator enforce alignment #

Patch Set 8 : Use older version of max_align_t #

Patch Set 9 : Pick different alignments for different machines. #

Patch Set 10 : Remove size fields #

Patch Set 11 : Rewrite align and bookkeepping #

Patch Set 12 : Fix debug build #

Patch Set 13 : Remove the space field #

Total comments: 2

Patch Set 14 : Use less for comparison. #

Patch Set 15 : Fix patch conflict. #

Patch Set 16 : Strip pointer to make correct type #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -101 lines) Patch
M src/core/SkBlitter.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -4 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -3 lines 0 comments Download
M src/core/SkDrawLooper.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +10 lines, -4 lines 0 comments Download
M src/core/SkRasterPipelineBlitter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M src/core/SkSmallAllocator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +90 lines, -77 lines 0 comments Download
M tests/LayerDrawLooperTest.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +15 lines, -6 lines 0 comments Download
M tests/SmallAllocatorTest.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +15 lines, -5 lines 0 comments Download

Messages

Total messages: 98 (62 generated)
herb_g
Use STArray for holding info
4 years, 1 month ago (2016-11-09 16:50:49 UTC) #6
herb_g
fix test
4 years, 1 month ago (2016-11-09 17:09:36 UTC) #13
herb_g
fix includes
4 years, 1 month ago (2016-11-09 18:33:12 UTC) #18
herb_g
4 years, 1 month ago (2016-11-09 18:43:06 UTC) #21
bungeman-skia
https://codereview.chromium.org/2488523003/diff/60001/src/core/SkSmallAllocator.h File src/core/SkSmallAllocator.h (right): https://codereview.chromium.org/2488523003/diff/60001/src/core/SkSmallAllocator.h#newcode79 src/core/SkSmallAllocator.h:79: struct Rec { If this Rec were to have ...
4 years, 1 month ago (2016-11-09 19:30:57 UTC) #24
herb_g
Remove test problem.
4 years, 1 month ago (2016-11-09 20:01:01 UTC) #25
herb_g
Desturctor name change
4 years, 1 month ago (2016-11-09 20:17:30 UTC) #26
herb_g
PTAL https://codereview.chromium.org/2488523003/diff/60001/src/core/SkSmallAllocator.h File src/core/SkSmallAllocator.h (right): https://codereview.chromium.org/2488523003/diff/60001/src/core/SkSmallAllocator.h#newcode79 src/core/SkSmallAllocator.h:79: struct Rec { On 2016/11/09 19:30:56, bungeman-skia wrote: ...
4 years, 1 month ago (2016-11-09 20:20:06 UTC) #29
bungeman-skia
lgtm with promises
4 years, 1 month ago (2016-11-09 20:43:59 UTC) #30
mtklein_C
https://codereview.chromium.org/2488523003/diff/100001/src/core/SkSmallAllocator.h File src/core/SkSmallAllocator.h (right): https://codereview.chromium.org/2488523003/diff/100001/src/core/SkSmallAllocator.h#newcode53 src/core/SkSmallAllocator.h:53: T* createWithIniterT(size_t size, Initer initer) { Can't we infer ...
4 years, 1 month ago (2016-11-09 20:47:57 UTC) #33
herb_g
On 2016/11/09 20:47:57, mtklein_C wrote: > https://codereview.chromium.org/2488523003/diff/100001/src/core/SkSmallAllocator.h > File src/core/SkSmallAllocator.h (right): > > https://codereview.chromium.org/2488523003/diff/100001/src/core/SkSmallAllocator.h#newcode53 > ...
4 years, 1 month ago (2016-11-09 21:00:31 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2488523003/100001
4 years, 1 month ago (2016-11-09 21:00:42 UTC) #38
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://skia.googlesource.com/skia/+/d5dc657b8c3ac916f98005dafdedafe02f023449
4 years, 1 month ago (2016-11-09 21:01:49 UTC) #40
mtklein_C
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/2485853005/ by mtklein@chromium.org. ...
4 years, 1 month ago (2016-11-09 22:50:18 UTC) #41
herb_g
Make SkSmallAllocator enforce alignment
4 years, 1 month ago (2016-11-10 16:10:14 UTC) #43
herb_g
PTAL at the alignment fix.
4 years, 1 month ago (2016-11-10 16:12:57 UTC) #46
herb_g
On 2016/11/10 16:12:57, herb_g wrote: > PTAL at the alignment fix. This fixes the bug ...
4 years, 1 month ago (2016-11-10 16:15:41 UTC) #47
herb_g
Use older version of max_align_t
4 years, 1 month ago (2016-11-10 16:24:50 UTC) #50
herb_g
Pick different alignments for different machines.
4 years, 1 month ago (2016-11-10 16:52:13 UTC) #55
herb_g
Remove size fields
4 years, 1 month ago (2016-11-11 03:59:43 UTC) #60
herb_g
Rewrite align and bookkeepping
4 years, 1 month ago (2016-11-11 19:41:16 UTC) #61
herb_g
Fix debug build
4 years, 1 month ago (2016-11-11 19:54:48 UTC) #62
herb_g
Remove the space field
4 years, 1 month ago (2016-11-11 20:24:01 UTC) #65
bungeman-skia
https://codereview.chromium.org/2488523003/diff/240001/src/core/SkSmallAllocator.h File src/core/SkSmallAllocator.h (right): https://codereview.chromium.org/2488523003/diff/240001/src/core/SkSmallAllocator.h#newcode134 src/core/SkSmallAllocator.h:134: if (rec.fObj < fStorage || &fStorage[kTotalBytes] <= rec.fObj) { ...
4 years, 1 month ago (2016-11-11 20:58:23 UTC) #68
herb_g
Use less for comparison.
4 years, 1 month ago (2016-11-11 21:14:35 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2488523003/260001
4 years, 1 month ago (2016-11-12 17:20:59 UTC) #76
commit-bot: I haz the power
Failed to apply patch for src/core/SkRasterPipelineBlitter.cpp: While running git apply --index -p1; error: patch failed: ...
4 years, 1 month ago (2016-11-12 17:21:55 UTC) #78
herb_g
Fix patch conflict.
4 years, 1 month ago (2016-11-13 16:54:39 UTC) #79
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2488523003/280001
4 years, 1 month ago (2016-11-13 16:55:14 UTC) #82
commit-bot: I haz the power
Committed patchset #15 (id:280001) as https://skia.googlesource.com/skia/+/c18b5f8f57a4efc5d5d1e399ed8bd3bd02c592ab
4 years, 1 month ago (2016-11-13 17:34:22 UTC) #84
mtklein_C
A revert of this CL (patchset #15 id:280001) has been created in https://codereview.chromium.org/2494353002/ by mtklein@chromium.org. ...
4 years, 1 month ago (2016-11-13 17:54:53 UTC) #85
herb_g
Strip pointer to make correct type
4 years, 1 month ago (2016-11-14 20:35:23 UTC) #86
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2488523003/300001
4 years, 1 month ago (2016-11-15 14:26:00 UTC) #94
commit-bot: I haz the power
Committed patchset #16 (id:300001) as https://skia.googlesource.com/skia/+/bf6d80a7a496f96589f1592ee5f644002fbb9f6d
4 years, 1 month ago (2016-11-15 14:27:01 UTC) #96
herb_g
https://codereview.chromium.org/2488523003/diff/240001/src/core/SkSmallAllocator.h File src/core/SkSmallAllocator.h (right): https://codereview.chromium.org/2488523003/diff/240001/src/core/SkSmallAllocator.h#newcode134 src/core/SkSmallAllocator.h:134: if (rec.fObj < fStorage || &fStorage[kTotalBytes] <= rec.fObj) { ...
4 years, 1 month ago (2016-11-15 20:54:43 UTC) #97
herb_g
4 years, 1 month ago (2016-11-15 20:54:48 UTC) #98
Message was sent while issue was closed.

          

Powered by Google App Engine
This is Rietveld 408576698