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

Issue 1516833003: Switch SkAutoMalloc to SkAutoTMalloc to avoid cast (Closed)

Created:
5 years ago by scroggo
Modified:
5 years ago
Reviewers:
mtklein, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Switch SkAutoMalloc to SkAutoTMalloc to avoid cast Make SkAutoTMalloc's interface look more like SkAutoMalloc: - add free(), which does what you expect - make reset() return a pointer fPtr No public API changes (SkAutoTMalloc is in include/private) BUG=skia:2148 Committed: https://skia.googlesource.com/skia/+/565901db954c231840750ea955ed31b820b9ade8

Patch Set 1 #

Total comments: 6

Patch Set 2 : Respond to comments #

Total comments: 1

Patch Set 3 : Fix a conversion from 'size_t' to 'int' #

Total comments: 1

Patch Set 4 : Fix signature for SkAutoTMalloc::operator[] #

Patch Set 5 : Go back to patch set 3 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -69 lines) Patch
M bench/ColorCubeBench.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M gm/colorcube.cpp View 2 chunks +5 lines, -4 lines 0 comments Download
M gm/etc1bitmap.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M include/effects/SkColorCubeFilter.h View 2 chunks +2 lines, -1 line 0 comments Download
M include/private/SkTemplates.h View 1 4 2 chunks +9 lines, -1 line 0 comments Download
M samplecode/SampleApp.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M samplecode/SampleFilterFuzz.cpp View 1 1 chunk +4 lines, -4 lines 0 comments Download
M src/codec/SkCodec_libpng.cpp View 7 chunks +8 lines, -7 lines 0 comments Download
M src/codec/SkJpegCodec.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/codec/SkJpegCodec.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M src/codec/SkSampledCodec.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M src/codec/SkWebpCodec.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/SkBitmap.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M src/core/SkDraw.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M src/effects/SkColorCubeFilter.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/images/SkImageDecoder_libgif.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M src/images/SkImageDecoder_libjpeg.cpp View 1 3 chunks +4 lines, -4 lines 0 comments Download
M src/images/SkImageDecoder_libpng.cpp View 3 chunks +6 lines, -6 lines 0 comments Download
M src/images/SkImageDecoder_libwebp.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M src/svg/parser/SkSVG.cpp View 2 chunks +4 lines, -3 lines 0 comments Download
M tests/ARGBImageEncoderTest.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M tests/BitmapCopyTest.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M tests/CanvasTest.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M tests/TextureCompressionTest.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M tests/Writer32Test.cpp View 1 2 4 1 chunk +4 lines, -7 lines 0 comments Download

Messages

Total messages: 34 (14 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1516833003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1516833003/1
5 years ago (2015-12-10 15:50:03 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot/builds/3033)
5 years ago (2015-12-10 15:51:21 UTC) #4
scroggo
https://codereview.chromium.org/1516833003/diff/1/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (right): https://codereview.chromium.org/1516833003/diff/1/src/images/SkImageDecoder_libjpeg.cpp#newcode969 src/images/SkImageDecoder_libjpeg.cpp:969: oneRow.reset(width * 3); I could change SkAutoTMalloc::reset to return ...
5 years ago (2015-12-10 15:53:34 UTC) #6
mtklein
lgtm I trust fixing the typos won't affect things too much. :) https://codereview.chromium.org/1516833003/diff/1/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp ...
5 years ago (2015-12-10 16:00:03 UTC) #7
reed1
https://codereview.chromium.org/1516833003/diff/1/include/private/SkTemplates.h File include/private/SkTemplates.h (right): https://codereview.chromium.org/1516833003/diff/1/include/private/SkTemplates.h#newcode301 include/private/SkTemplates.h:301: void free() { seemes like a fine method/name. Does ...
5 years ago (2015-12-10 16:04:12 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1516833003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1516833003/20001
5 years ago (2015-12-10 16:25:14 UTC) #11
scroggo
https://codereview.chromium.org/1516833003/diff/1/include/private/SkTemplates.h File include/private/SkTemplates.h (right): https://codereview.chromium.org/1516833003/diff/1/include/private/SkTemplates.h#newcode301 include/private/SkTemplates.h:301: void free() { On 2015/12/10 16:04:12, reed1 wrote: > ...
5 years ago (2015-12-10 16:26:46 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/4799)
5 years ago (2015-12-10 16:29:37 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1516833003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1516833003/40001
5 years ago (2015-12-10 16:35:50 UTC) #16
scroggo
https://codereview.chromium.org/1516833003/diff/40001/tests/Writer32Test.cpp File tests/Writer32Test.cpp (right): https://codereview.chromium.org/1516833003/diff/40001/tests/Writer32Test.cpp#newcode153 tests/Writer32Test.cpp:153: originalData[(int) i] = rand.nextU(); I traded one cast for ...
5 years ago (2015-12-10 16:37:27 UTC) #17
mtklein
> SkAutoTMalloc's constructor takes a size_t, but SkAutoTMalloc::operator[] takes an int. That's pretty weird man.
5 years ago (2015-12-10 16:38:46 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1516833003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1516833003/60001
5 years ago (2015-12-10 16:50:12 UTC) #20
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Mac10.9-Clang-Arm7-Debug-iOS-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Mac10.9-Clang-Arm7-Debug-iOS-Trybot/builds/150)
5 years ago (2015-12-10 16:51:04 UTC) #22
scroggo
On 2015/12/10 16:38:46, mtklein wrote: > > SkAutoTMalloc's constructor takes a size_t, but SkAutoTMalloc::operator[] > ...
5 years ago (2015-12-10 16:51:05 UTC) #23
scroggo
On 2015/12/10 16:51:05, scroggo wrote: > On 2015/12/10 16:38:46, mtklein wrote: > > > SkAutoTMalloc's ...
5 years ago (2015-12-10 17:05:39 UTC) #24
mtklein
On 2015/12/10 at 17:05:39, scroggo wrote: > On 2015/12/10 16:51:05, scroggo wrote: > > On ...
5 years ago (2015-12-10 17:30:50 UTC) #25
scroggo
On 2015/12/10 17:30:50, mtklein wrote: > On 2015/12/10 at 17:05:39, scroggo wrote: > > On ...
5 years ago (2015-12-10 17:39:58 UTC) #28
reed1
lgtm
5 years ago (2015-12-10 18:30:33 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1516833003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1516833003/80001
5 years ago (2015-12-10 18:31:18 UTC) #32
commit-bot: I haz the power
5 years ago (2015-12-10 18:44:17 UTC) #34
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://skia.googlesource.com/skia/+/565901db954c231840750ea955ed31b820b9ade8

Powered by Google App Engine
This is Rietveld 408576698