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

Issue 7300046: New SkShaderImageFilter image filter (Closed)

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

Description

New SkRectShaderImageFilter image filter This new changelist also introduces a new image filter called SkRectShaderImageFilter which is make to simply apply a shader on a region without using any inputs. TEST=Added ShaderImageFilter test Committed: https://code.google.com/p/skia/source/detail?r=7808

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Total comments: 21

Patch Set 3 : #

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Total comments: 3

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -17 lines) Patch
M gyp/effects.gypi View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M gyp/tests.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkImageFilter.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -3 lines 1 comment Download
M include/effects/SkColorFilterImageFilter.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A include/effects/SkRectShaderImageFilter.h View 1 2 3 4 5 6 7 1 chunk +43 lines, -0 lines 3 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M src/effects/SkColorFilterImageFilter.cpp View 1 2 3 4 5 6 7 2 chunks +16 lines, -11 lines 0 comments Download
A src/effects/SkRectShaderImageFilter.cpp View 1 2 3 4 5 6 7 1 chunk +58 lines, -0 lines 0 comments Download
A tests/ShaderImageFilterTest.cpp View 1 2 3 4 5 6 7 1 chunk +64 lines, -0 lines 0 comments Download

Messages

Total messages: 33
sugoi
11 years, 10 months ago (2013-02-05 18:05:46 UTC) #1
sugoi
https://codereview.appspot.com/7300046/diff/1/src/core/SkTurbulenceShader.cpp File src/core/SkTurbulenceShader.cpp (right): https://codereview.appspot.com/7300046/diff/1/src/core/SkTurbulenceShader.cpp#newcode2 src/core/SkTurbulenceShader.cpp:2: * Copyright 2006 The Android Open Source Project Oops, ...
11 years, 10 months ago (2013-02-05 18:08:51 UTC) #2
reed1
Lets try to land the SkShaderImageFilter addition separately (first). Also, we could/should add tests for ...
11 years, 10 months ago (2013-02-05 18:28:48 UTC) #3
bsalomon
I really like SkShaderImageFilter. We may to do SkColorFilterImageFilter as well. (general comment, not a ...
11 years, 10 months ago (2013-02-05 18:32:09 UTC) #4
reed1
Also... I thought the naming pattern was asAFoo, not asFoo
11 years, 10 months ago (2013-02-05 18:34:13 UTC) #5
Stephen White
On 2013/02/05 18:32:09, bsalomon wrote: > I really like SkShaderImageFilter. We may to do SkColorFilterImageFilter ...
11 years, 10 months ago (2013-02-05 18:34:31 UTC) #6
sugoi
About the new update : - I didn't remove the turbulence shader from the cl ...
11 years, 10 months ago (2013-02-06 16:35:25 UTC) #7
bsalomon
On 2013/02/06 16:35:25, sugoi wrote: >https://codereview.appspot.com/7300046/diff/1/src/effects/SkShaderImageFilter.cpp#newcode24 > src/effects/SkShaderImageFilter.cpp:24: SkASSERT(s); > Because SkASSERT only affects the ...
11 years, 10 months ago (2013-02-06 16:41:46 UTC) #8
reed1
I vote again to have ShaderImageFilter be its own CL, and TurbulanceShader be its own ...
11 years, 10 months ago (2013-02-06 18:25:21 UTC) #9
sugoi
I agree with Mike about submitting this as 2 separate cls, I just have a ...
11 years, 10 months ago (2013-02-06 19:45:07 UTC) #10
bsalomon
On 2013/02/06 19:45:07, sugoi wrote: > I agree with Mike about submitting this as 2 ...
11 years, 10 months ago (2013-02-06 19:49:56 UTC) #11
Stephen White
https://codereview.appspot.com/7300046/diff/12/include/effects/SkShaderImageFilter.h File include/effects/SkShaderImageFilter.h (right): https://codereview.appspot.com/7300046/diff/12/include/effects/SkShaderImageFilter.h#newcode21 include/effects/SkShaderImageFilter.h:21: * Also, "shadedRegion" represents the area of the canvas ...
11 years, 10 months ago (2013-02-06 19:56:06 UTC) #12
sugoi
Ok, I separated the code into 2 cls. The turbulence shader is no longer in ...
11 years, 10 months ago (2013-02-06 20:36:44 UTC) #13
reed1
Meta: what does it really mean to have an imagefilter that doesn't know about the ...
11 years, 10 months ago (2013-02-08 20:37:23 UTC) #14
sugoi
Here's a new version with the changes requested by Mike. I'm still not sure what ...
11 years, 10 months ago (2013-02-12 19:11:15 UTC) #15
Stephen White
https://codereview.appspot.com/7300046/diff/14/src/effects/SkColorFilterImageFilter.cpp File src/effects/SkColorFilterImageFilter.cpp (right): https://codereview.appspot.com/7300046/diff/14/src/effects/SkColorFilterImageFilter.cpp#newcode66 src/effects/SkColorFilterImageFilter.cpp:66: && (NULL != inputColorFilter)) { Maybe we should just ...
11 years, 10 months ago (2013-02-12 21:28:44 UTC) #16
Stephen White
BTW, you should probably re-title this issue to reflect that it's just the SkShaderImageFilter now.
11 years, 10 months ago (2013-02-12 21:30:15 UTC) #17
sugoi
Re-titled the issue appropriately. https://codereview.appspot.com/7300046/diff/14/src/effects/SkColorFilterImageFilter.cpp File src/effects/SkColorFilterImageFilter.cpp (right): https://codereview.appspot.com/7300046/diff/14/src/effects/SkColorFilterImageFilter.cpp#newcode66 src/effects/SkColorFilterImageFilter.cpp:66: && (NULL != inputColorFilter)) { ...
11 years, 10 months ago (2013-02-12 21:33:02 UTC) #18
Stephen White
On 2013/02/12 21:33:02, sugoi wrote: > Re-titled the issue appropriately. > > https://codereview.appspot.com/7300046/diff/14/src/effects/SkColorFilterImageFilter.cpp > File ...
11 years, 10 months ago (2013-02-12 21:36:14 UTC) #19
bsalomon
https://codereview.appspot.com/7300046/diff/14/src/effects/SkColorFilterImageFilter.cpp File src/effects/SkColorFilterImageFilter.cpp (right): https://codereview.appspot.com/7300046/diff/14/src/effects/SkColorFilterImageFilter.cpp#newcode66 src/effects/SkColorFilterImageFilter.cpp:66: && (NULL != inputColorFilter)) { On 2013/02/12 21:33:02, sugoi ...
11 years, 10 months ago (2013-02-19 19:36:05 UTC) #20
reed1
concrete description (for discussion purposes) bool MyImageFilter1::asColorFilter(SkColorFilter** returnRef) const { if (returnRef) { *returnRef = ...
11 years, 10 months ago (2013-02-19 19:55:43 UTC) #21
sugoi
Could we have : #1 : bool MyImageFilter1::asColorFilter(SkColorFilter** returnRef) const #2 : bool MyImageFilter2::asColorFilter(const SkColorFilter** ...
11 years, 10 months ago (2013-02-19 21:41:43 UTC) #22
reed1
On 2013/02/19 21:41:43, sugoi wrote: > Could we have : > #1 : bool MyImageFilter1::asColorFilter(SkColorFilter** ...
11 years, 10 months ago (2013-02-19 22:40:40 UTC) #23
sugoi
The changes are made. Note that, since the SkRect member is now inside SkShaderImageFilter, that ...
11 years, 9 months ago (2013-02-20 21:53:48 UTC) #24
bsalomon
On 2013/02/20 21:53:48, sugoi wrote: > The changes are made. Note that, since the SkRect ...
11 years, 9 months ago (2013-02-20 21:57:19 UTC) #25
reed1
agreed: 1. lets remove asShader 2. rename this to something more specific. e.g. RectShaderImageFilter
11 years, 9 months ago (2013-02-21 14:27:16 UTC) #26
sugoi
Here's SkRectShaderImageFilter.
11 years, 9 months ago (2013-02-21 14:41:45 UTC) #27
bsalomon
On 2013/02/21 14:41:45, sugoi wrote: > Here's SkRectShaderImageFilter. lgtm
11 years, 9 months ago (2013-02-21 14:56:44 UTC) #28
reed1
These comments are about matching general skia pattern for conditional queries. If we return true, ...
11 years, 9 months ago (2013-02-21 15:06:20 UTC) #29
reed1
Given my prev. comment, perhaps we should add the SK_ attribute that warns if the ...
11 years, 9 months ago (2013-02-21 15:06:59 UTC) #30
sugoi
This code was committed. I will follow up on these comments inside https://codereview.appspot.com/7322060/
11 years, 9 months ago (2013-02-21 15:17:27 UTC) #31
Stephen White
https://codereview.appspot.com/7300046/diff/24011/include/effects/SkRectShaderImageFilter.h File include/effects/SkRectShaderImageFilter.h (right): https://codereview.appspot.com/7300046/diff/24011/include/effects/SkRectShaderImageFilter.h#newcode23 include/effects/SkRectShaderImageFilter.h:23: static SkRectShaderImageFilter* Create(SkShader* s, SkRect region); Would this not ...
11 years, 9 months ago (2013-02-21 17:29:36 UTC) #32
reed1
11 years, 9 months ago (2013-02-21 19:30:27 UTC) #33
Message was sent while issue was closed.
Since the "region" will run through the CTM, it might be OK to keep it as a
float.
Sign in to reply to this message.

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