Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(125)

Issue 4657046: replace detach/getStream apis on dynamicwstream with SkData (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 12 months ago by reed1
Modified:
12 years, 11 months ago
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Patch Set 1 #

Total comments: 10

Patch Set 2 : rename NewWithMalloc to NewFromMalloc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -158 lines) Patch
M gm/gmmain.cpp View 2 chunks +3 lines, -1 line 0 comments Download
M include/core/SkData.h View 1 2 chunks +47 lines, -0 lines 0 comments Download
M include/core/SkStream.h View 5 chunks +26 lines, -15 lines 0 comments Download
M include/svg/SkSVGParser.h View 1 chunk +1 line, -1 line 0 comments Download
M samplecode/SampleApp.cpp View 2 chunks +3 lines, -1 line 0 comments Download
M src/animator/SkScriptTokenizer.cpp View 3 chunks +7 lines, -4 lines 0 comments Download
M src/core/SkData.cpp View 1 1 chunk +8 lines, -4 lines 0 comments Download
M src/core/SkStream.cpp View 1 8 chunks +97 lines, -100 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 3 chunks +8 lines, -2 lines 0 comments Download
M src/pdf/SkPDFFont.cpp View 1 5 chunks +11 lines, -5 lines 0 comments Download
M src/pdf/SkPDFStream.cpp View 2 chunks +6 lines, -3 lines 0 comments Download
M src/pipe/SkGPipeWrite.cpp View 2 chunks +3 lines, -1 line 0 comments Download
M src/svg/SkSVGParser.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M tests/FlateTest.cpp View 3 chunks +8 lines, -6 lines 0 comments Download
M tests/PDFPrimitivesTest.cpp View 1 5 chunks +22 lines, -14 lines 0 comments Download
M tests/StreamTest.cpp View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 8
reed1
start with the API changes in SkStream.h... basically detach() and getStream() were fragile apis, and ...
12 years, 12 months ago (2011-06-24 14:51:33 UTC) #1
bungeman
LGTM Notes from conversation: *SVG should go to experimental *Most places fixed up here should ...
12 years, 12 months ago (2011-06-24 17:22:07 UTC) #2
Steve VanDeBogart
http://codereview.appspot.com/4657046/diff/1/include/core/SkData.h File include/core/SkData.h (right): http://codereview.appspot.com/4657046/diff/1/include/core/SkData.h#newcode78 include/core/SkData.h:78: static SkData* NewWithMalloc(const void* data, size_t length); This name ...
12 years, 12 months ago (2011-06-24 18:48:13 UTC) #3
reed1
uploaded new version http://codereview.appspot.com/4657046/diff/1/include/core/SkData.h File include/core/SkData.h (right): http://codereview.appspot.com/4657046/diff/1/include/core/SkData.h#newcode78 include/core/SkData.h:78: static SkData* NewWithMalloc(const void* data, size_t ...
12 years, 12 months ago (2011-06-24 19:01:48 UTC) #4
Steve VanDeBogart
Thanks LGTM with comment. http://codereview.appspot.com/4657046/diff/1/src/core/SkStream.cpp File src/core/SkStream.cpp (right): http://codereview.appspot.com/4657046/diff/1/src/core/SkStream.cpp#newcode269 src/core/SkStream.cpp:269: if (copyData) { You could ...
12 years, 12 months ago (2011-06-24 19:06:36 UTC) #5
reed1
On 2011/06/24 19:06:36, Steve VanDeBogart wrote: > Thanks > > LGTM with comment. > > ...
12 years, 12 months ago (2011-06-24 19:09:57 UTC) #6
reed1
12 years, 12 months ago (2011-06-24 19:10:00 UTC) #7
Steve VanDeBogart
12 years, 12 months ago (2011-06-24 19:51:05 UTC) #8
Still LGTM.

On 2011/06/24 19:09:57, reed1 wrote:
> On 2011/06/24 19:06:36, Steve VanDeBogart wrote:
> > Thanks
> > 
> > LGTM with comment.
> > 
> > http://codereview.appspot.com/4657046/diff/1/src/core/SkStream.cpp
> > File src/core/SkStream.cpp (right):
> > 
> >
http://codereview.appspot.com/4657046/diff/1/src/core/SkStream.cpp#newcode269
> > src/core/SkStream.cpp:269: if (copyData) {
> > You could make it use SkSafeUnref and init fData to NULL.
> 
> Thought about that, but then I think I'd have to check for null everywhere I
use
> fData. We can write a private helper method to do the copyData check and build
> in a later CL.

I don't think so - All the constructors would set fData.  This one would just
set it by way of setMemory()...

> 
> > 
> > On 2011/06/24 19:01:48, reed1 wrote:
> > > setMemory() calls fData->unref()
> > > 
> > > On 2011/06/24 18:48:13, Steve VanDeBogart wrote:
> > > > This can just call setMemory.
> > >
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b