At the moment I'm actually a bit confused about
why the new pair of gradients appear to interpolate
in P3 when drawn in --config 8888.
--config gl works as I'd expect, interpolating the
existing gradients in P3 and the new gradients in
sRGB.
Change-Id: I74b77d834b495a7545753b76c8fd8ecaeb5c7b70
Reviewed-on: https://skia-review.googlesource.com/c/161586
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Change-Id: I9811c76c3db38d5ab49ba0312e433aa46744df05
Reviewed-on: https://skia-review.googlesource.com/155781
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This checks drawBitmap() and a few ways to create P3 bitmaps.
Change-Id: I6f891c641a44249d7562f2f5ddeed8cbaa40ad40
Reviewed-on: https://skia-review.googlesource.com/154863
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Update SkImageShader/SkBlitter_sprite to use SkPaint::getColor4f().
Split the set_rgb into bounded and unbounded variants, just like we did
with uniform_color (the exact rgba variant). Without this we'd try to
draw out-of-gamut colors in lowp for the non-scaled shader draw in
--config srgb, and that can't work. SkRasterPipeline::append_set_rgb()
now checks to see if it's safe to use ::set_rgb and lowp, falling back
on ::unbounded_set_rgb and floats.
In the GM, the new "sprite" case is handled by SkImageShader, and the
old "sprite" case is handled as a uniform color draw through an A8 mask.
I'm having trouble constructing a call that reaches the A8 code in
SkBlitter_Sprite, but I have confirmed that it's definitely used by
quickly running the other GMs. I've updated it to use the float paint
color just like SkImageShader.
Change-Id: I1ca8c08b79631165ac0c0032a1406add80e55c9f
Reviewed-on: https://skia-review.googlesource.com/154624
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
These are a sprite and non-sprite A8 image draw,
where we pick up the color from the paint.
I'm slightly disturbed to see these working.
It turns out I had no idea how A8 draws happened.
There is probably some dead code to remove in
SkBlitter_Sprite (I think, never called for A8)
and in SkImageShader (only ever called with a black
paint color for A8), in this CL as TODOs.
Change-Id: I1d276f8d9b145b57e3ab793735fb184bdae670fb
Reviewed-on: https://skia-review.googlesource.com/154461
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I've tweaked the indicators into overlays so there can be one for each
pixel sampled. This lets me test both gradient corners.
I've dropped displaying the P3 value... not sure if it's as useful as
the other two, and I'm worried about information overload. There's
already a lot to look at.
Change-Id: I57a41c3af0162e8132e50c47a0b967714a57e9e5
Reviewed-on: https://skia-review.googlesource.com/154220
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
I've added a little auto-grader.
I think it's logic makes sense, but I'd appreciate fresh eyes on it.
Now with anti-aliased text.
Change-Id: I43a6d69251d4d93fbd70533f5c4d1cc281e4498b
Reviewed-on: https://skia-review.googlesource.com/154000
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
We don't have anything drawing colors outside sRGB,
but now that we've got SkPaint::setColor4f(), that's easy.
Looks like we have lots of work to do.
Pin GrColor4f floats before converting to unsigned.
Underflowing floats would get pinned to 255 spuriously
instead of to 0. I think this fixes the failing CQ
bot, and the white square problem.
Change-Id: I866963ff026e6ab891b4c7d57decc43538000099
Reviewed-on: https://skia-review.googlesource.com/153640
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>