move in center of radial_gradient_precision

{1K,1K} ought to work fine for F16 precision.  16 bit floats step by 1.0
between 1024 and 2048, so they should be able to just barely represent
distinct coordinates for each pixel.  If precision drops below 16 bit
we'll start seeing banding because we can't distinguish coordinates.

Swap out the colors a little so that it's clear which images are the 1K
(black+green) and which are the old 100K (black+white).

Change-Id: I92761c3aa67cab57332e6f00a421c63c1d9d990a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201041
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This commit is contained in:
Mike Klein 2019-03-13 15:49:23 -05:00 committed by Skia Commit-Bot
parent 45fe9473d1
commit 1b258182ad

View File

@ -10,9 +10,9 @@
// All we're looking for here is that we see a smooth gradient.
DEF_SIMPLE_GM(radial_gradient_precision, canvas, 200, 200) {
SkPoint center = {100000, 100000};
SkPoint center = {1000, 1000};
SkScalar radius = 40;
SkColor colors[] = {SK_ColorBLACK, SK_ColorWHITE};
SkColor colors[] = {SK_ColorBLACK, SK_ColorGREEN};
SkPaint p;
p.setShader(SkGradientShader::MakeRadial(center, radius,