| commit | 60040292be58ac553298209fb2e0684a4cb17dcc | [log] [tgz] |
|---|---|---|
| author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Mon Feb 04 18:21:23 2013 +0000 |
| committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Mon Feb 04 18:21:23 2013 +0000 |
| tree | 6cfc2e2a1ccde64fd438978f49b036ae11ac1aa7 | |
| parent | 73349aa33277889d79e3e8bd8cef89cdf0310288 [diff] [blame] |
Go from a 1x2 to a 2x2 dither cell, and change/simplify the logic for how we compute the "dithered" version of a color to just a graduated fixed-point-round. Also, add this new dither to conical and sweep, which before had no dithering. Disabled for now using SK_IGNORE_GRADIENT_DITHER_FIX. Will enable this and and rebaseline skia. http://code.google.com/p/skia/issues/detail?id=1098 Review URL: https://codereview.appspot.com/7248046 git-svn-id: http://skia.googlecode.com/svn/trunk@7549 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp index 328fe76..fdca340 100644 --- a/src/effects/gradients/SkRadialGradient.cpp +++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -335,8 +335,7 @@ if (count) { UNPINNED_RADIAL_STEP; } - } - else { + } else { // Specializing for dy == 0 gains us 25% on Skia benchmarks if (dy == 0) { unsigned yy = SkPin32(fy, -0xFFFF >> 1, 0xFFFF >> 1);