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

Issue 15675025: One allocation for an SkData which makes a copy. (Closed)

Created:
7 years, 6 months ago by bungeman-skia
Modified:
6 years, 3 months ago
Reviewers:
reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

One allocation for an SkData which makes a copy.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Use 'this' instead of function as special case trigger. #

Total comments: 1

Patch Set 3 : More flexible and externally usable. #

Patch Set 4 : Minimize memory and maximize flexibility. #

Patch Set 5 : #

Patch Set 6 : Clean #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -89 lines) Patch
M include/core/SkData.h View 1 2 3 4 5 chunks +127 lines, -21 lines 2 comments Download
M include/core/SkRefCnt.h View 1 2 3 4 2 chunks +3 lines, -12 lines 0 comments Download
M include/core/SkWeakRefCnt.h View 1 2 3 4 3 chunks +3 lines, -3 lines 1 comment Download
M src/core/SkData.cpp View 1 2 3 4 5 6 chunks +48 lines, -45 lines 0 comments Download
M src/core/SkStream.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/pdf/SkPDFFont.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M tests/DataRefTest.cpp View 1 2 3 4 5 2 chunks +11 lines, -6 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
bungeman-skia
I think this is what is needed for an SkData with a copy to make ...
7 years, 6 months ago (2013-06-11 20:33:09 UTC) #1
reed1
https://codereview.chromium.org/15675025/diff/1/src/core/SkData.cpp File src/core/SkData.cpp (right): https://codereview.chromium.org/15675025/diff/1/src/core/SkData.cpp#newcode75 src/core/SkData.cpp:75: // This function intentionally left blank. SkASSERT(!"don't call me"); ...
7 years, 6 months ago (2013-06-11 21:28:15 UTC) #2
bungeman-skia
Slightly more clever way of doing this. https://codereview.chromium.org/15675025/diff/1/src/core/SkData.cpp File src/core/SkData.cpp (right): https://codereview.chromium.org/15675025/diff/1/src/core/SkData.cpp#newcode75 src/core/SkData.cpp:75: // This ...
7 years, 6 months ago (2013-06-11 22:25:32 UTC) #3
reed1
lgtm w/ comment suggestion https://codereview.chromium.org/15675025/diff/5001/src/core/SkData.cpp File src/core/SkData.cpp (right): https://codereview.chromium.org/15675025/diff/5001/src/core/SkData.cpp#newcode84 src/core/SkData.cpp:84: The code is good, but ...
7 years, 6 months ago (2013-06-12 13:39:31 UTC) #4
bungeman-skia
While patch set 2 is rather clever, patch set 3 does more of what we ...
7 years, 6 months ago (2013-06-12 23:02:18 UTC) #5
bungeman-skia
The size of the SkData varies depending on what it needs.
7 years, 6 months ago (2013-06-13 19:51:15 UTC) #6
bungeman-skia
With Patch Set 6 the SkData::NewWithCopy does one allocation. The advantage in Patch Set 6 ...
7 years, 6 months ago (2013-06-21 16:21:20 UTC) #7
reed1
seems like we're going to create a bunch of new template-driving code. Not sure why ...
7 years, 6 months ago (2013-06-21 19:00:36 UTC) #8
bungeman-skia
6 years, 3 months ago (2014-09-18 19:10:27 UTC) #9
Message was sent while issue was closed.
Closing this now that https://codereview.chromium.org/560653004 has landed.

Powered by Google App Engine
This is Rietveld 408576698