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

Issue 492963002: extend SkShader to report a luminance-color to be used for gamma correction (Closed)

Created:
6 years, 4 months ago by reed1
Modified:
6 years, 3 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

extend SkShader to report a luminance-color to be used for gamma correction BUG=skia:590 Committed: https://skia.googlesource.com/skia/+/8367b8cb7a6b2f163ee41365323cb219b7049b15

Patch Set 1 #

Total comments: 4

Patch Set 2 : cleanup rounded_divide, add override to SkColorShader #

Patch Set 3 : rebase, add SkShader::CreateColorShader(c) #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -12 lines) Patch
M gm/gammatext.cpp View 1 2 3 chunks +81 lines, -6 lines 0 comments Download
M include/core/SkColorShader.h View 1 3 chunks +5 lines, -3 lines 0 comments Download
M include/core/SkShader.h View 1 2 3 chunks +19 lines, -0 lines 0 comments Download
M src/core/SkPaint.cpp View 1 chunk +4 lines, -2 lines 0 comments Download
M src/core/SkShader.cpp View 1 2 4 chunks +17 lines, -1 line 0 comments Download
M src/effects/gradients/SkGradientShader.cpp View 1 2 1 chunk +22 lines, -0 lines 2 comments Download
M src/effects/gradients/SkGradientShaderPriv.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (1 generated)
reed1
need to modify ColorShader as well
6 years, 4 months ago (2014-08-21 01:45:31 UTC) #1
bungeman-skia
https://codereview.chromium.org/492963002/diff/1/gm/aaclip.cpp File gm/aaclip.cpp (right): https://codereview.chromium.org/492963002/diff/1/gm/aaclip.cpp#newcode126 gm/aaclip.cpp:126: if (true) { test_gamma(canvas); return; } I'm supposing this ...
6 years, 4 months ago (2014-08-21 14:15:43 UTC) #2
reed1
https://codereview.chromium.org/492963002/diff/1/gm/aaclip.cpp File gm/aaclip.cpp (right): https://codereview.chromium.org/492963002/diff/1/gm/aaclip.cpp#newcode126 gm/aaclip.cpp:126: if (true) { test_gamma(canvas); return; } On 2014/08/21 14:15:43, ...
6 years, 4 months ago (2014-08-21 20:07:39 UTC) #3
reed1
The CQ bit was checked by reed@google.com
6 years, 4 months ago (2014-08-21 20:24:21 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/492963002/40001
6 years, 4 months ago (2014-08-21 20:25:09 UTC) #5
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 4 months ago (2014-08-21 20:25:10 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot on tryserver.skia ...
6 years, 4 months ago (2014-08-21 20:38:09 UTC) #7
reed1
The CQ bit was unchecked by reed@google.com
6 years, 4 months ago (2014-08-21 20:41:06 UTC) #8
reed1
waiting on 565 Blend fix (CL in the works)
6 years, 4 months ago (2014-08-21 21:29:41 UTC) #9
bungeman-skia
lgtm
6 years, 4 months ago (2014-08-21 22:29:15 UTC) #10
reed1
The CQ bit was checked by reed@google.com
6 years, 4 months ago (2014-08-22 15:21:19 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/492963002/40001
6 years, 4 months ago (2014-08-22 15:21:45 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (40001) as 8367b8cb7a6b2f163ee41365323cb219b7049b15
6 years, 4 months ago (2014-08-22 15:30:26 UTC) #13
tomhudson
https://codereview.chromium.org/492963002/diff/40001/src/effects/gradients/SkGradientShader.cpp File src/effects/gradients/SkGradientShader.cpp (right): https://codereview.chromium.org/492963002/diff/40001/src/effects/gradients/SkGradientShader.cpp#newcode341 src/effects/gradients/SkGradientShader.cpp:341: for (int i = 0; i < n; ++i) ...
6 years, 3 months ago (2014-08-29 22:52:43 UTC) #15
reed1
6 years, 3 months ago (2014-09-02 13:52:55 UTC) #16
Message was sent while issue was closed.
https://codereview.chromium.org/492963002/diff/40001/src/effects/gradients/Sk...
File src/effects/gradients/SkGradientShader.cpp (right):

https://codereview.chromium.org/492963002/diff/40001/src/effects/gradients/Sk...
src/effects/gradients/SkGradientShader.cpp:341: for (int i = 0; i < n; ++i) {
On 2014/08/29 22:52:43, tomhudson wrote:
> Seems like this works well for the trivial case (2 colors, or equidistant
color
> samples), but would need weighting to look representative for several
> non-uniformly-spaced color stops?

Agreed. I have a comment to that effect just above.

Powered by Google App Engine
This is Rietveld 408576698