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

Issue 1557713003: Two malloc+bzero -> calloc. (Closed)

Created:
4 years, 11 months ago by mtklein_C
Modified:
4 years, 11 months 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

Two malloc+bzero -> calloc. I was profiling DM and noticed a couple spots where we malloc then bzero. These might as well call calloc instead: - any time DM itself allocates bitmaps for raster drawing; - any time Skia allocates memory for a raster SkSurface. We could use malloc for opaque surfaces, but it seems simpler to always calloc. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557713003 Committed: https://skia.googlesource.com/skia/+/c8be09aaf2bbfa004c574553fc9d194ac7f1ce1a

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -7 lines) Patch
M dm/DMSrcSink.cpp View 2 chunks +5 lines, -2 lines 0 comments Download
M src/image/SkSurface_Raster.cpp View 2 chunks +1 line, -5 lines 2 comments Download

Messages

Total messages: 16 (8 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/1557713003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1557713003/1
4 years, 11 months ago (2015-12-31 06:13:20 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2015-12-31 06:28:50 UTC) #6
mtklein_C
4 years, 11 months ago (2015-12-31 07:27:19 UTC) #8
reed1
https://codereview.chromium.org/1557713003/diff/1/src/image/SkSurface_Raster.cpp File src/image/SkSurface_Raster.cpp (right): https://codereview.chromium.org/1557713003/diff/1/src/image/SkSurface_Raster.cpp#newcode171 src/image/SkSurface_Raster.cpp:171: return new SkSurface_Raster(info, pixels, rb, releaseProc, context, props); When ...
4 years, 11 months ago (2015-12-31 13:17:49 UTC) #9
mtklein
https://codereview.chromium.org/1557713003/diff/1/src/image/SkSurface_Raster.cpp File src/image/SkSurface_Raster.cpp (right): https://codereview.chromium.org/1557713003/diff/1/src/image/SkSurface_Raster.cpp#newcode171 src/image/SkSurface_Raster.cpp:171: return new SkSurface_Raster(info, pixels, rb, releaseProc, context, props); On ...
4 years, 11 months ago (2015-12-31 21:35:47 UTC) #11
reed1
You're right, and in fact, the new (2) constructors are clearly more parallel than before, ...
4 years, 11 months ago (2016-01-04 15:04:22 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1557713003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1557713003/1
4 years, 11 months ago (2016-01-05 02:37:56 UTC) #14
commit-bot: I haz the power
4 years, 11 months ago (2016-01-05 02:57:00 UTC) #16
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://skia.googlesource.com/skia/+/c8be09aaf2bbfa004c574553fc9d194ac7f1ce1a

Powered by Google App Engine
This is Rietveld 408576698