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

Issue 6430060: Use asNewCustomStage instead of asABitmap in SkGpuDevice, also removed now-unecessary twoPointRadia… (Closed)

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

Description

Use asNewCustomStage instead of asABitmap in SkGpuDevice, also removed now-unecessary twoPointRadialParams parameter from asABitmap. In SkGpuDevice we still fall back on using asABitmap for effects that don't have asNewCustomStage implemented, but it still simplifies things a fair amount. Committed: https://code.google.com/p/skia/source/detail?r=4755

Patch Set 1 #

Total comments: 7

Patch Set 2 : asNewCustomStage no longer uses asABitmap, moved Gradient_Shader into a private header. #

Patch Set 3 : Fixed various problems with local matrices, and 2pt radial params. #

Total comments: 2

Patch Set 4 : Revert renaming/file reorg until next CL. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -127 lines) Patch
M include/core/SkColorShader.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M include/core/SkShader.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkBitmapProcShader.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/core/SkBitmapProcShader.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/core/SkShader.cpp View 1 2 chunks +2 lines, -3 lines 0 comments Download
M src/device/xps/SkXPSDevice.cpp View 1 1 chunk +1 line, -3 lines 0 comments Download
M src/effects/SkGradientShader.cpp View 1 2 3 16 chunks +16 lines, -33 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 4 chunks +20 lines, -39 lines 0 comments Download
M src/gpu/effects/GrGradientEffects.h View 1 2 3 7 chunks +17 lines, -7 lines 2 comments Download
M src/gpu/effects/GrGradientEffects.cpp View 1 2 3 8 chunks +36 lines, -34 lines 1 comment Download
M src/pdf/SkPDFShader.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12
rileya
Actually hooked up asNewCustomStage to be used instead of the giant asABitmap switch in skPaint2GrPaintShader(). ...
12 years, 4 months ago (2012-07-20 21:21:46 UTC) #1
TomH
https://codereview.appspot.com/6430060/diff/1/src/effects/SkGradientShader.cpp File src/effects/SkGradientShader.cpp (right): https://codereview.appspot.com/6430060/diff/1/src/effects/SkGradientShader.cpp#newcode1883 src/effects/SkGradientShader.cpp:1883: virtual BitmapType asABitmap(SkBitmap* bitmap, If we're no longer passing ...
12 years, 4 months ago (2012-07-20 21:27:00 UTC) #2
reed1
lgtm -- defers to other reviewers
12 years, 4 months ago (2012-07-21 16:52:01 UTC) #3
bsalomon
https://codereview.appspot.com/6430060/diff/1/src/effects/SkGradientShader.cpp File src/effects/SkGradientShader.cpp (right): https://codereview.appspot.com/6430060/diff/1/src/effects/SkGradientShader.cpp#newcode1883 src/effects/SkGradientShader.cpp:1883: virtual BitmapType asABitmap(SkBitmap* bitmap, On 2012/07/20 21:27:01, TomH wrote: ...
12 years, 4 months ago (2012-07-23 12:13:37 UTC) #4
rileya
https://codereview.appspot.com/6430060/diff/1/src/effects/SkGradientShader.cpp File src/effects/SkGradientShader.cpp (right): https://codereview.appspot.com/6430060/diff/1/src/effects/SkGradientShader.cpp#newcode1883 src/effects/SkGradientShader.cpp:1883: virtual BitmapType asABitmap(SkBitmap* bitmap, On 2012/07/23 12:13:37, bsalomon wrote: ...
12 years, 4 months ago (2012-07-23 13:13:26 UTC) #5
rileya
asNewCustomStage no longer uses asABitmap. Moved Gradient_Shader into a private header and renamed to SkGradientShaderBase, ...
12 years, 4 months ago (2012-07-25 13:59:38 UTC) #6
bsalomon
On 2012/07/25 13:59:38, rileya wrote: > asNewCustomStage no longer uses asABitmap. Moved Gradient_Shader into a ...
12 years, 4 months ago (2012-07-25 14:26:16 UTC) #7
reed1
On 2012/07/25 14:26:16, bsalomon wrote: > On 2012/07/25 13:59:38, rileya wrote: > > asNewCustomStage no ...
12 years, 4 months ago (2012-07-25 14:42:45 UTC) #8
rileya
On 2012/07/25 14:42:45, reed1 wrote: > On 2012/07/25 14:26:16, bsalomon wrote: > > On 2012/07/25 ...
12 years, 4 months ago (2012-07-25 14:56:20 UTC) #9
bsalomon
I was thinking of the other order: move code then change code. But whatever :) ...
12 years, 4 months ago (2012-07-25 15:21:15 UTC) #10
rileya
On 2012/07/25 15:21:15, bsalomon wrote: > I was thinking of the other order: move code ...
12 years, 4 months ago (2012-07-25 15:39:49 UTC) #11
bsalomon
12 years, 4 months ago (2012-07-25 15:56:06 UTC) #12
On 2012/07/25 15:39:49, rileya wrote:
> On 2012/07/25 15:21:15, bsalomon wrote:
> > I was thinking of the other order: move code then change code. But whatever
:)
> 
> Oh, whoops, that probably would've made more sense... oh well.
> 
>
http://codereview.appspot.com/6430060/diff/11001/src/effects/SkGradientShader...
> File src/effects/SkGradientShaderPriv.h (right):
> 
>
http://codereview.appspot.com/6430060/diff/11001/src/effects/SkGradientShader...
> src/effects/SkGradientShaderPriv.h:21: int count) {
> On 2012/07/25 15:21:15, bsalomon wrote:
> > Are all these static functions used in more than one cpp now?
> 
> Not currently, but if we want to split up SkGradientShader into files for each
> gradient type to make it more manageable, I believe that would be the case.
> 
>
http://codereview.appspot.com/6430060/diff/10004/src/gpu/effects/GrGradientEf...
> File src/gpu/effects/GrGradientEffects.h (right):
> 
>
http://codereview.appspot.com/6430060/diff/10004/src/gpu/effects/GrGradientEf...
> src/gpu/effects/GrGradientEffects.h:115: GrSamplerState* sampler, SkScalar
> center,
> On 2012/07/25 15:21:15, bsalomon wrote:
> > It seems a bit odd to pass both the SkShader and these other params. Is it
> > possible to pass the gradient shader subclass and extract the params using
> > member functions?
> This is what I was going to do, but since I reverted the move of
> Gradient_Shader, that subclass isn't visible from here. This CL originally
used
> asAGradient to get these, but it resulted in duplicating a fair amount of math
> (to get the 3 special parameters out of the basic gradient info).
> 
> After reorganizing and making the gradient subclasses visible from here, this
> can take the appropriate subclass and get the parameters directly that way.

Ok, LGTM.
Sign in to reply to this message.

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