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

Issue 6426049: New subclasses for both Gr and GrGL gradient effect classes. (Closed)

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

Description

New subclasses for both Gr and GrGL gradient effect classes. This replaces GrSingleTextureEffect as the base for gradient effects (so we'll be able to do gradient effects without textures), and adds a base class to the GL gradient custom stage implementations (which will soon handle generating the appropriate code to pass colors in and lerp instead of using a cached texture for simpler gradient cases). Also added a custom stage for linear gradients. Committed: https://code.google.com/p/skia/source/detail?r=4674

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -54 lines) Patch
M include/core/SkShader.h View 1 chunk +3 lines, -1 line 0 comments Download
M src/effects/SkGradientShader.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 2 chunks +10 lines, -1 line 1 comment Download
M src/gpu/effects/GrGradientEffects.h View 5 chunks +53 lines, -8 lines 0 comments Download
M src/gpu/effects/GrGradientEffects.cpp View 18 chunks +136 lines, -42 lines 4 comments Download

Messages

Total messages: 4
rileya
https://codereview.appspot.com/6426049/diff/1/src/gpu/SkGpuDevice.cpp File src/gpu/SkGpuDevice.cpp (right): https://codereview.appspot.com/6426049/diff/1/src/gpu/SkGpuDevice.cpp#newcode613 src/gpu/SkGpuDevice.cpp:613: if (skPaint.isFilterBitmap()) { Originally linear gradients would fall into ...
12 years, 3 months ago (2012-07-19 14:58:44 UTC) #1
bsalomon
On 2012/07/19 14:58:44, rileya wrote: > https://codereview.appspot.com/6426049/diff/1/src/gpu/SkGpuDevice.cpp > File src/gpu/SkGpuDevice.cpp (right): > > https://codereview.appspot.com/6426049/diff/1/src/gpu/SkGpuDevice.cpp#newcode613 > ...
12 years, 3 months ago (2012-07-19 15:07:31 UTC) #2
TomH
After-the-fact LG, but wanted to get my two nits in: https://codereview.appspot.com/6426049/diff/1/src/gpu/effects/GrGradientEffects.cpp File src/gpu/effects/GrGradientEffects.cpp (right): https://codereview.appspot.com/6426049/diff/1/src/gpu/effects/GrGradientEffects.cpp#newcode54 ...
12 years, 3 months ago (2012-07-19 15:55:57 UTC) #3
rileya
12 years, 3 months ago (2012-07-19 16:23:48 UTC) #4
https://codereview.appspot.com/6426049/diff/1/src/gpu/effects/GrGradientEffec...
File src/gpu/effects/GrGradientEffects.cpp (right):

https://codereview.appspot.com/6426049/diff/1/src/gpu/effects/GrGradientEffec...
src/gpu/effects/GrGradientEffects.cpp:54: if (fTexture) {
On 2012/07/19 15:55:57, TomH wrote:
> SkSafeUnref() is all about not having to have this if() explicit in your code.

Ah, I had thought that might be the case, but forget to check... I'll get rid of
the if in a future CL.

https://codereview.appspot.com/6426049/diff/1/src/gpu/effects/GrGradientEffec...
src/gpu/effects/GrGradientEffects.cpp:117: return INHERITED::isEqual(sBase);
On 2012/07/19 15:55:57, TomH wrote:
> This function is completely unnecessary? Or are you just putting in
scaffolding
> for later use?

I think I carelessly pasted this from GrRadialGradient below, but this override
will possibly be necessary soon, I'll remove it (and the GrRadialGradient one
too) in a future CL if that turns out not to be the case.
Sign in to reply to this message.

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