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

Issue 22918012: Add luminance mask transfer modes. (Closed)

Created:
7 years, 4 months ago by f(malita)
Modified:
7 years, 4 months ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Add luminance mask transfer modes. This adds kSrcInLum_Mode and kDstInLum_Mode, to support CSS and SVG luminance masks (http://www.w3.org/TR/css-masking/#MaskValues , http://www.w3.org/TR/SVG/masking.html#Masking ). The transfer coefficient is computed according to http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#feColorMatrixElement "luminance-to-alpha": luma = 0.2125 * r + 0.7154 * g + 0.0721 * b R=reed@google.com,robertphillips@google.com,bsalomon@google.com Committed: http://code.google.com/p/skia/source/detail?r=10887

Patch Set 1 #

Total comments: 2

Patch Set 2 : Refactored as a custom xfer mode, per comments. #

Patch Set 3 : Fix VS builds (no named variadic macro params support) #

Total comments: 8

Patch Set 4 : Dropped background texture handling, updated docs. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+421 lines, -58 lines) Patch
M bench/XfermodeBench.cpp View 1 2 3 chunks +48 lines, -58 lines 0 comments Download
A gm/lumamode.cpp View 1 1 chunk +86 lines, -0 lines 0 comments Download
M gyp/effects.gypi View 1 2 chunks +2 lines, -0 lines 0 comments Download
M gyp/gmslides.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M gyp/public_headers.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
A include/effects/SkLumaXfermode.h View 1 2 3 1 chunk +58 lines, -0 lines 0 comments Download
A src/effects/SkLumaXfermode.cpp View 1 2 3 1 chunk +221 lines, -0 lines 0 comments Download
M src/ports/SkGlobalInitialization_chromium.cpp View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/ports/SkGlobalInitialization_default.cpp View 1 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
f(malita)
7 years, 4 months ago (2013-08-20 16:22:36 UTC) #1
f(malita)
Some bench numbers: running bench [640 480] Xfermode_DstInLum 8888: cmsecs = 2.02 565: cmsecs = ...
7 years, 4 months ago (2013-08-20 16:24:06 UTC) #2
reed1
https://codereview.chromium.org/22918012/diff/1/include/core/SkXfermode.h File include/core/SkXfermode.h (right): https://codereview.chromium.org/22918012/diff/1/include/core/SkXfermode.h#newcode134 include/core/SkXfermode.h:134: kSrcInLum_Mode, Can we initially introduce this xfermode w/o adding ...
7 years, 4 months ago (2013-08-20 17:21:35 UTC) #3
vandebo (ex-Chrome)
https://codereview.chromium.org/22918012/diff/1/src/pdf/SkPDFGraphicState.cpp File src/pdf/SkPDFGraphicState.cpp (right): https://codereview.chromium.org/22918012/diff/1/src/pdf/SkPDFGraphicState.cpp#newcode51 src/pdf/SkPDFGraphicState.cpp:51: case SkXfermode::kSrcInLum_Mode: These can probably be supported in the ...
7 years, 4 months ago (2013-08-20 17:24:47 UTC) #4
f(malita)
Re-implemented as a custom transfer class - PTAL.
7 years, 4 months ago (2013-08-22 18:30:04 UTC) #5
reed1
https://codereview.chromium.org/22918012/diff/12001/include/effects/SkLumaXfermode.h File include/effects/SkLumaXfermode.h (right): https://codereview.chromium.org/22918012/diff/12001/include/effects/SkLumaXfermode.h#newcode19 include/effects/SkLumaXfermode.h:19: * SrcIn or DstIn xfer: Is this list (srcin, ...
7 years, 4 months ago (2013-08-22 18:35:51 UTC) #6
f(malita)
https://codereview.chromium.org/22918012/diff/12001/include/effects/SkLumaXfermode.h File include/effects/SkLumaXfermode.h (right): https://codereview.chromium.org/22918012/diff/12001/include/effects/SkLumaXfermode.h#newcode19 include/effects/SkLumaXfermode.h:19: * SrcIn or DstIn xfer: On 2013/08/22 18:35:51, reed1 ...
7 years, 4 months ago (2013-08-22 19:25:52 UTC) #7
reed1
All good explanations. As long as the dox are very clear under what conditions the ...
7 years, 4 months ago (2013-08-22 19:38:43 UTC) #8
bsalomon
I think it'd be good to get rid of the background texture stuff in the ...
7 years, 4 months ago (2013-08-22 19:47:46 UTC) #9
f(malita)
On 2013/08/22 19:47:46, bsalomon wrote: > I think it'd be good to get rid of ...
7 years, 4 months ago (2013-08-22 20:48:21 UTC) #10
bsalomon
lgtm
7 years, 4 months ago (2013-08-22 20:52:20 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/fmalita@chromium.org/22918012/29001
7 years, 4 months ago (2013-08-23 13:12:37 UTC) #12
commit-bot: I haz the power
7 years, 4 months ago (2013-08-23 13:13:25 UTC) #13
Message was sent while issue was closed.
Change committed as 10887

Powered by Google App Engine
This is Rietveld 408576698