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

Issue 2256843004: Implement gradient simplification for 0,0,1 and 0,1,1 gradients (Closed)

Created:
4 years, 4 months ago by fmenozzi
Modified:
4 years, 4 months ago
Reviewers:
f(malita), reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@remove-expand-one-color-macro
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Implement gradient simplification for 0,0,1 and 0,1,1 gradients Depends on https://codereview.chromium.org/2259823005/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2256843004 Committed: https://skia.googlesource.com/skia/+/68d952cf4061dc455d6a6040ce1e4625e4f2ab29

Patch Set 1 #

Patch Set 2 : Remove unnecessary include #

Total comments: 2

Patch Set 3 : Replace simplify() with ColorStopOptimizer struct #

Total comments: 1

Patch Set 4 : Add null pos check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -11 lines) Patch
M src/effects/gradients/SkGradientShader.cpp View 1 2 3 5 chunks +70 lines, -11 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 14 (6 generated)
fmenozzi
Simplified cases of 0,0,1 and 0,1,1 gradients where colors at hard stop are identical OR ...
4 years, 4 months ago (2016-08-18 21:17:09 UTC) #3
f(malita)
https://codereview.chromium.org/2256843004/diff/20001/src/effects/gradients/SkGradientShader.cpp File src/effects/gradients/SkGradientShader.cpp (right): https://codereview.chromium.org/2256843004/diff/20001/src/effects/gradients/SkGradientShader.cpp#newcode779 src/effects/gradients/SkGradientShader.cpp:779: colorCount = 2; If we fall through here, I ...
4 years, 4 months ago (2016-08-18 22:54:17 UTC) #4
fmenozzi
ptal
4 years, 4 months ago (2016-08-19 14:54:54 UTC) #5
f(malita)
Thanks! LGTM % pos null check. https://codereview.chromium.org/2256843004/diff/40001/src/effects/gradients/SkGradientShader.cpp File src/effects/gradients/SkGradientShader.cpp (right): https://codereview.chromium.org/2256843004/diff/40001/src/effects/gradients/SkGradientShader.cpp#newcode777 src/effects/gradients/SkGradientShader.cpp:777: if (count != ...
4 years, 4 months ago (2016-08-19 15:26:20 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2256843004/60001
4 years, 4 months ago (2016-08-19 15:33:43 UTC) #9
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://skia.googlesource.com/skia/+/68d952cf4061dc455d6a6040ce1e4625e4f2ab29
4 years, 4 months ago (2016-08-19 15:56:59 UTC) #11
reed1
do we have a test that exercises/confirms this check?
4 years, 4 months ago (2016-08-21 15:18:32 UTC) #13
f(malita)
4 years, 4 months ago (2016-08-21 15:23:30 UTC) #14
Message was sent while issue was closed.
On 2016/08/21 15:18:32, reed1 wrote:
> do we have a test that exercises/confirms this check?

I couldn't think of a good way to check the internal shader data, but now that
you bring it up I recall we do have SkShader::asGradient().  Let me see if I can
use that for a test.

Powered by Google App Engine
This is Rietveld 408576698