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

Issue 6448095: Update SkFlattenable buffers to be more modular. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by DerekS
Modified:
11 years, 9 months ago
Reviewers:
Leon, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

Update SkFlattenable buffers to be more modular. This CL is an effort to stage the conversion to named parameters for all SkFlattenable commands. This particular stage only does the following two things... 1. Move flattenable buffers from SkFlattenable.h into their own header. 2. Update and Add new read write methods for better clarity and convenience. BUG= Committed: https://code.google.com/p/skia/source/detail?r=4980

Patch Set 1 #

Total comments: 46

Patch Set 2 : addressing comments #

Patch Set 3 : rebase and change SkData #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1114 lines, -747 lines) Patch
M gyp/core.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkAnnotation.h View 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkBitmap.h View 1 chunk +0 lines, -2 lines 0 comments Download
M include/core/SkColorFilter.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkDrawLooper.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkFlattenable.h View 1 2 4 chunks +1 line, -203 lines 0 comments Download
A include/core/SkFlattenableBuffers.h View 1 1 chunk +193 lines, -0 lines 0 comments Download
M include/core/SkImageFilter.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M include/core/SkOrderedReadBuffer.h View 1 1 chunk +84 lines, -27 lines 0 comments Download
M include/core/SkOrderedWriteBuffer.h View 1 2 1 chunk +59 lines, -33 lines 0 comments Download
M include/core/SkPaint.h View 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkShape.h View 1 chunk +1 line, -0 lines 0 comments Download
M include/effects/SkRectShape.h View 1 chunk +1 line, -0 lines 0 comments Download
M include/effects/SkTestImageFilters.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M samplecode/ClockFaceView.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M samplecode/SampleAll.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M samplecode/SampleSlides.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M samplecode/SampleText.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M samplecode/SampleTextEffects.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkAnnotation.cpp View 2 chunks +4 lines, -3 lines 0 comments Download
M src/core/SkBitmap.cpp View 5 chunks +20 lines, -18 lines 0 comments Download
M src/core/SkBitmapProcShader.cpp View 1 3 chunks +7 lines, -6 lines 0 comments Download
M src/core/SkBlitter.cpp View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M src/core/SkColorFilter.cpp View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M src/core/SkColorTable.cpp View 2 chunks +8 lines, -10 lines 0 comments Download
M src/core/SkComposeShader.cpp View 2 chunks +4 lines, -3 lines 0 comments Download
M src/core/SkData.cpp View 1 2 4 chunks +16 lines, -21 lines 0 comments Download
M src/core/SkFlattenable.cpp View 1 2 3 chunks +0 lines, -88 lines 0 comments Download
A src/core/SkFlattenableBuffers.cpp View 1 1 chunk +68 lines, -0 lines 0 comments Download
M src/core/SkGlyphCache.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkMallocPixelRef.cpp View 1 2 chunks +6 lines, -9 lines 0 comments Download
M src/core/SkOrderedReadBuffer.cpp View 1 2 3 chunks +147 lines, -19 lines 0 comments Download
M src/core/SkOrderedWriteBuffer.cpp View 1 2 3 chunks +172 lines, -16 lines 0 comments Download
M src/core/SkPaint.cpp View 1 2 5 chunks +98 lines, -59 lines 0 comments Download
M src/core/SkPathEffect.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M src/core/SkPathHeap.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M src/core/SkPictureFlat.h View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M src/core/SkPictureFlat.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkPicturePlayback.cpp View 1 2 3 6 chunks +18 lines, -13 lines 0 comments Download
M src/core/SkPixelRef.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M src/core/SkShader.cpp View 2 chunks +5 lines, -4 lines 0 comments Download
M src/core/SkXfermode.cpp View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/effects/Sk1DPathEffect.cpp View 3 chunks +3 lines, -2 lines 0 comments Download
M src/effects/Sk2DPathEffect.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/SkAvoidXfermode.cpp View 2 chunks +7 lines, -6 lines 0 comments Download
M src/effects/SkBlurDrawLooper.cpp View 3 chunks +7 lines, -6 lines 0 comments Download
M src/effects/SkBlurImageFilter.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/SkBlurMaskFilter.cpp View 3 chunks +5 lines, -4 lines 0 comments Download
M src/effects/SkColorFilters.cpp View 3 chunks +9 lines, -8 lines 0 comments Download
M src/effects/SkColorMatrix.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/SkColorMatrixFilter.cpp View 1 2 chunks +5 lines, -4 lines 0 comments Download
M src/effects/SkCornerPathEffect.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/SkDashPathEffect.cpp View 1 2 3 2 chunks +9 lines, -9 lines 0 comments Download
M src/effects/SkDiscretePathEffect.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M src/effects/SkEmbossMaskFilter.cpp View 1 3 chunks +4 lines, -2 lines 0 comments Download
M src/effects/SkGroupShape.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M src/effects/SkKernel33MaskFilter.cpp View 3 chunks +8 lines, -6 lines 0 comments Download
M src/effects/SkLayerDrawLooper.cpp View 3 chunks +5 lines, -6 lines 0 comments Download
M src/effects/SkLayerRasterizer.cpp View 1 2 chunks +7 lines, -54 lines 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M src/effects/SkMorphologyImageFilter.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/effects/SkPixelXorXfermode.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M src/effects/SkRectShape.cpp View 1 2 chunks +9 lines, -7 lines 0 comments Download
M src/effects/SkTableColorFilter.cpp View 1 2 3 3 chunks +8 lines, -5 lines 0 comments Download
M src/effects/SkTableMaskFilter.cpp View 1 2 chunks +4 lines, -2 lines 0 comments Download
M src/effects/SkTestImageFilters.cpp View 1 2 3 5 chunks +13 lines, -12 lines 0 comments Download
M src/effects/gradients/SkGradientShader.cpp View 1 2 3 2 chunks +10 lines, -11 lines 0 comments Download
M src/effects/gradients/SkGradientShaderPriv.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/images/SkFlipPixelRef.cpp View 1 2 chunks +4 lines, -6 lines 0 comments Download
M src/images/SkImageRef.cpp View 1 3 chunks +8 lines, -10 lines 0 comments Download
M src/pdf/SkPDFUtils.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/pipe/SkGPipeRead.cpp View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M src/ports/SkImageRef_ashmem.cpp View 1 2 chunks +5 lines, -17 lines 0 comments Download
M src/utils/SkUnitMappers.cpp View 2 chunks +4 lines, -3 lines 0 comments Download
M tests/ColorFilterTest.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5
DerekS
11 years, 9 months ago (2012-08-01 16:01:36 UTC) #1
DerekS
http://codereview.appspot.com/6448095/diff/1/include/core/SkFlattenable.h File include/core/SkFlattenable.h (right): http://codereview.appspot.com/6448095/diff/1/include/core/SkFlattenable.h#newcode15 include/core/SkFlattenable.h:15: class SkFlattenableMapping; remove this http://codereview.appspot.com/6448095/diff/1/include/core/SkFlattenableBuffers.h File include/core/SkFlattenableBuffers.h (right): http://codereview.appspot.com/6448095/diff/1/include/core/SkFlattenableBuffers.h#newcode14 ...
11 years, 9 months ago (2012-08-01 20:00:01 UTC) #2
Leon
http://codereview.appspot.com/6448095/diff/1/include/core/SkFlattenableBuffers.h File include/core/SkFlattenableBuffers.h (right): http://codereview.appspot.com/6448095/diff/1/include/core/SkFlattenableBuffers.h#newcode13 include/core/SkFlattenableBuffers.h:13: #include "SkPoint.h" Minor: not alphabetical http://codereview.appspot.com/6448095/diff/1/include/core/SkFlattenableBuffers.h#newcode152 include/core/SkFlattenableBuffers.h:152: virtual uint32_t ...
11 years, 9 months ago (2012-08-01 21:08:15 UTC) #3
DerekS
I'll follow this up with a new patch that addresses the comments from both myself ...
11 years, 9 months ago (2012-08-02 14:03:28 UTC) #4
Leon
11 years, 9 months ago (2012-08-02 15:29:05 UTC) #5
http://codereview.appspot.com/6448095/diff/1/src/core/SkData.cpp
File src/core/SkData.cpp (left):

http://codereview.appspot.com/6448095/diff/1/src/core/SkData.cpp#oldcode133
src/core/SkData.cpp:133: if (0 == fSize) {
On 2012/08/02 14:03:28, DerekS wrote:
> On 2012/08/01 21:08:15, scroggo-work wrote:
> > Is the check for a zero size no longer necessary?
> 
> It was never really necessary as malloc(0) returns NULL, but I can add it back
> if it makes things more clear.

I do not know that it makes anything more clear. It does change things slightly,
though I cannot say which is better (if statement vs calling a couple
functions). It also means we now always set fReleaseProc to sk_free_releaseproc,
rather than setting it to NULL (which also should be fine).
Sign in to reply to this message.

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