Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Issue 115633002: Add AlphaThreshold filter. (Closed)

Created:
7 years ago by Zachary Kuznia
Modified:
6 years, 11 months ago
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Add AlphaThreshold filter. This is based on the Bitmap Alpha Threshold filter, and will be used by Chromium to implement the window shape API. Committed: http://code.google.com/p/skia/source/detail?r=12935

Patch Set 1 #

Total comments: 8

Patch Set 2 : fix warnings on windows #

Patch Set 3 : one more warning fix #

Patch Set 4 : Test change, software implementation #

Patch Set 5 : Code review fixes #

Patch Set 6 : Use proper coordinates #

Total comments: 21

Patch Set 7 : Code review fixes #

Patch Set 8 : Fix alpha in software path #

Total comments: 2

Patch Set 9 : Fix ifdef and fix max() #

Patch Set 10 : Rebase #

Patch Set 11 : Rebase #

Patch Set 12 : Fix tests build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+481 lines, -0 lines) Patch
A gm/imagealphathreshold.cpp View 1 2 3 4 5 6 1 chunk +82 lines, -0 lines 0 comments Download
M gyp/effects.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M gyp/gmslides.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M gyp/public_headers.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A include/effects/SkAlphaThresholdFilter.h View 1 2 3 4 5 6 1 chunk +26 lines, -0 lines 0 comments Download
A src/effects/SkAlphaThresholdFilter.cpp View 1 2 3 4 5 6 7 8 1 chunk +367 lines, -0 lines 0 comments Download
M tests/GLProgramsTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Zachary Kuznia
Please take a look.
7 years ago (2013-12-14 00:16:30 UTC) #1
bsalomon
Just curious, what was wrong with the shader-as-filter approach? I'm wondering why this will be ...
7 years ago (2013-12-16 14:20:57 UTC) #2
reed1
+1 to understand the shader alternative. https://codereview.chromium.org/115633002/diff/1/src/effects/SkAlphaThresholdFilter.cpp File src/effects/SkAlphaThresholdFilter.cpp (right): https://codereview.chromium.org/115633002/diff/1/src/effects/SkAlphaThresholdFilter.cpp#newcode285 src/effects/SkAlphaThresholdFilter.cpp:285: return true; Why ...
7 years ago (2013-12-16 14:30:49 UTC) #3
Wez
https://codereview.chromium.org/115633002/diff/1/gm/imagealphathreshold.cpp File gm/imagealphathreshold.cpp (right): https://codereview.chromium.org/115633002/diff/1/gm/imagealphathreshold.cpp#newcode45 gm/imagealphathreshold.cpp:45: region.setRects(rects, 2); So we need to plumb through the ...
7 years ago (2013-12-17 06:39:04 UTC) #4
Zachary Kuznia
Restating the bit I explained to bsalomon offline: Implementing this as a shader instead of ...
7 years ago (2013-12-18 00:06:26 UTC) #5
Wez
https://codereview.chromium.org/115633002/diff/100001/src/effects/SkAlphaThresholdFilter.cpp File src/effects/SkAlphaThresholdFilter.cpp (right): https://codereview.chromium.org/115633002/diff/100001/src/effects/SkAlphaThresholdFilter.cpp#newcode178 src/effects/SkAlphaThresholdFilter.cpp:178: "\t\t\tfloat scale = inner_thresh / color.a;\n" Won't this explode ...
7 years ago (2013-12-18 01:21:01 UTC) #6
bsalomon
https://codereview.chromium.org/115633002/diff/100001/gm/imagealphathreshold.cpp File gm/imagealphathreshold.cpp (right): https://codereview.chromium.org/115633002/diff/100001/gm/imagealphathreshold.cpp#newcode43 gm/imagealphathreshold.cpp:43: SkPaint paint; Can we make the GM somehow test ...
7 years ago (2013-12-18 14:38:12 UTC) #7
Zachary Kuznia
https://codereview.chromium.org/115633002/diff/100001/gm/imagealphathreshold.cpp File gm/imagealphathreshold.cpp (right): https://codereview.chromium.org/115633002/diff/100001/gm/imagealphathreshold.cpp#newcode43 gm/imagealphathreshold.cpp:43: SkPaint paint; On 2013/12/18 14:38:12, bsalomon wrote: > Can ...
7 years ago (2013-12-19 01:28:40 UTC) #8
bsalomon
If the sw and gpu impls produce similar results then lgtm. https://codereview.chromium.org/115633002/diff/100001/src/effects/SkAlphaThresholdFilter.cpp File src/effects/SkAlphaThresholdFilter.cpp (right): ...
7 years ago (2013-12-19 14:50:01 UTC) #9
Zachary Kuznia
On 2013/12/19 14:50:01, bsalomon wrote: > If the sw and gpu impls produce similar results ...
7 years ago (2013-12-19 20:55:01 UTC) #10
bsalomon
On 2013/12/19 20:55:01, Zachary Kuznia wrote: > On 2013/12/19 14:50:01, bsalomon wrote: > > If ...
7 years ago (2013-12-19 20:58:01 UTC) #11
reed1
https://codereview.chromium.org/115633002/diff/140001/src/effects/SkAlphaThresholdFilter.cpp File src/effects/SkAlphaThresholdFilter.cpp (right): https://codereview.chromium.org/115633002/diff/140001/src/effects/SkAlphaThresholdFilter.cpp#newcode344 src/effects/SkAlphaThresholdFilter.cpp:344: float scale = (float)innerThreshold / SkColorGetA(source); What if src ...
7 years ago (2013-12-19 21:09:14 UTC) #12
bsalomon
Actually I think you're #if SK_SUPPORT_GPU usage. There are two of these blocks nested in ...
7 years ago (2013-12-19 21:09:46 UTC) #13
Zachary Kuznia
On 2013/12/19 20:58:01, bsalomon wrote: > On 2013/12/19 20:55:01, Zachary Kuznia wrote: > > On ...
7 years ago (2013-12-19 21:09:57 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/zork@chromium.org/115633002/140001
7 years ago (2013-12-19 21:10:12 UTC) #15
bsalomon
On 2013/12/19 21:09:46, bsalomon wrote: > Actually I think you're #if SK_SUPPORT_GPU usage. There are ...
7 years ago (2013-12-19 21:10:39 UTC) #16
bsalomon
https://codereview.chromium.org/115633002/diff/140001/src/effects/SkAlphaThresholdFilter.cpp File src/effects/SkAlphaThresholdFilter.cpp (right): https://codereview.chromium.org/115633002/diff/140001/src/effects/SkAlphaThresholdFilter.cpp#newcode177 src/effects/SkAlphaThresholdFilter.cpp:177: "\t\t\tfloat scale = inner_thresh / color.a;\n" need max() here ...
7 years ago (2013-12-19 21:11:20 UTC) #17
Zachary Kuznia
On 2013/12/19 21:11:20, bsalomon wrote: > https://codereview.chromium.org/115633002/diff/140001/src/effects/SkAlphaThresholdFilter.cpp > File src/effects/SkAlphaThresholdFilter.cpp (right): > > https://codereview.chromium.org/115633002/diff/140001/src/effects/SkAlphaThresholdFilter.cpp#newcode177 > ...
7 years ago (2013-12-19 21:39:24 UTC) #18
Zachary Kuznia
On 2013/12/19 21:39:24, Zachary Kuznia wrote: > On 2013/12/19 21:11:20, bsalomon wrote: > > > ...
6 years, 11 months ago (2014-01-06 22:13:10 UTC) #19
bsalomon
lgtm
6 years, 11 months ago (2014-01-06 22:17:37 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/zork@chromium.org/115633002/310001
6 years, 11 months ago (2014-01-06 22:31:43 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/zork@chromium.org/115633002/380001
6 years, 11 months ago (2014-01-06 22:45:54 UTC) #22
commit-bot: I haz the power
6 years, 11 months ago (2014-01-06 23:41:18 UTC) #23
Message was sent while issue was closed.
Change committed as 12935

Powered by Google App Engine
This is Rietveld 408576698