Change-Id: I894658882da92cb221be8355c8b1c7590c09895f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303650
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>
We don't have a way to erase with a non-sRGB color.
Update the P3 gm to test this, removing the SkBitmap erase case where
there's no option for even an SkColor4f, let alone non-sRGB. I'm not
sure it's really important to have one when we've got this on pixmap.
Updated release notes.
Change-Id: Ie98270d3f83e041593b4c6b2da8e325b36d4ff18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285341
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This keeps an alias so code keeps building.
Bug: skia:9792
Change-Id: If8575468d929d2ca28bc2f9e82de27291fb19aa1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264691
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This almost gets gms to be iwyu clean. The last bit is around gm.cpp
and the tracing framework and its use of atomic. Will also need a way
of keeping things from regressing, which is difficult due to needing to
do this outside-in.
Change-Id: I1393531e99da8b0f1a29f55c53c86d53f459af7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211593
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Current strategy: everything from the top
Things to look at first are the manual changes:
- added tools/rewrite_includes.py
- removed -Idirectives from BUILD.gn
- various compile.sh simplifications
- tweak tools/embed_resources.py
- update gn/find_headers.py to write paths from the top
- update gn/gn_to_bp.py SkUserConfig.h layout
so that #include "include/config/SkUserConfig.h" always
gets the header we want.
No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
We first draw interpolating in P3, UPM+PM, then in sRGB, UPM+PM.
Looks like the last gradient got its labels as a copy and paste
from the second.
Add a todo to test the middle color somehow. That's where we
either are or were going wrong, and it's an easy way to test
interpolation.
Change-Id: Ib7ff385c9244e33ee13fd206279119de25ce2eb6
Reviewed-on: https://skia-review.googlesource.com/c/196581
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Running...
$ ninja -C out dm
$ out/dm -m p3 --config 8888 srgb f16 esrgb p3 glp3 glesrgb glf16 -w foo
$ open foo/*/gm/p3.png
... looks like esrgb and f16 are marked wrong, and all others right,
which points to a problem specific to the software backend.
Bug: skia:8730
Change-Id: Ibffe3014e6ed1ade9c04381530a3c84a690e6469
Reviewed-on: https://skia-review.googlesource.com/c/188028
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
This reverts commit 754b5cb57d.
Reason for revert: will reland if the other CL does.
Original change's description:
> update p3 GM
>
> The pixmap calls are pretty easy to update.
> There's no equivalent SkBitmap call, so bye bye.
>
> Change-Id: I6eab40c69c0585d51b494e2761cd299a0758e79c
> Reviewed-on: https://skia-review.googlesource.com/c/181985
> 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>
TBR=mtklein@google.com,scroggo@google.com,brianosman@google.com
Change-Id: I29cb2685927731e22fc1dedef80f95c7dca49459
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/182102
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
The pixmap calls are pretty easy to update.
There's no equivalent SkBitmap call, so bye bye.
Change-Id: I6eab40c69c0585d51b494e2761cd299a0758e79c
Reviewed-on: https://skia-review.googlesource.com/c/181985
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>
Moved named common transfer functions and gamuts to constexpr values in
SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces.
Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the
new factory with the named values. Multiple clients want a way to
extract named transfer function and gamut - this still doesn't provide
that, but this may be a better path forward for honestly advertising how
SkColorSpace works internally.
Originally landed as:
https://skia.googlesource.com/skia/+/a9549ab31630fc244094e6f1692371cbaf87f666
Re-landing with a new serialization format, but maintaining ability to
load old serialized color spaces, for SKP compatibility.
Bug: skia:
Change-Id: Ib84a6e1cd5d7d9816175773fdbaff2ca32658667
Reviewed-on: https://skia-review.googlesource.com/c/181176
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit a9549ab316.
Reason for revert: SKPs changed?
Original change's description:
> Add SkColorSpace factory from 3x3 row-major gamut and transfer function
>
> Moved named common transfer functions and gamuts to constexpr values in
> SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces.
>
> Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the
> new factory with the named values. Multiple clients want a way to
> extract named transfer function and gamut - this still doesn't provide
> that, but this may be a better path forward for honestly advertising how
> SkColorSpace works internally.
>
> Bug: skia:
> Change-Id: I9296d67e8f0dab5ceb49869cb3ba24e98a05f3c4
> Reviewed-on: https://skia-review.googlesource.com/c/180360
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,brianosman@google.com,reed@google.com
Change-Id: Ie888f877b3c1dba33e1a8c0f5fa92594628de7fb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/181300
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Moved named common transfer functions and gamuts to constexpr values in
SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces.
Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the
new factory with the named values. Multiple clients want a way to
extract named transfer function and gamut - this still doesn't provide
that, but this may be a better path forward for honestly advertising how
SkColorSpace works internally.
Bug: skia:
Change-Id: I9296d67e8f0dab5ceb49869cb3ba24e98a05f3c4
Reviewed-on: https://skia-review.googlesource.com/c/180360
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
I was sampling near the edge of the stroke, not the middle of it,
so some configs were picking up antialiased pixels.
Bug: skia:
Change-Id: I46314ba0bafe056505037deaa8dd32f4f68119f6
Reviewed-on: https://skia-review.googlesource.com/c/172503
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
p3_ovals GM exercises four different oval ops. Before, they all drew
wrong in extended range GPU configs. Now, they all draw correctly.
Bug: skia:
Change-Id: I4ea803b6325bfd20e9361880b1822cc6f0441cea
Reviewed-on: https://skia-review.googlesource.com/c/172480
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: I48ba39465a160e73502ee38d90062d955da6e8e6
Reviewed-on: https://skia-review.googlesource.com/c/167140
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: I3126fb8b055b58e45f1bd0d913413b4d4d38f032
Reviewed-on: https://skia-review.googlesource.com/c/166740
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
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>