This is a reland of 57263c2e0c
Original change's description:
> Add compressed data support for SkImage.
>
> Adds a new SkImage::MakeFromCompressed method which takes raw data,
> a size, and a compression method, and returns a GPU-backed
> image.
>
> Bug: skia:8684
> Change-Id: I570c9dafce283bcd64dfbef4fbe1c4bfeac6ce2a
> Reviewed-on: https://skia-review.googlesource.com/c/184484
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:8684
Change-Id: I25fb320e8cc05e1c5afa6faa81e1a55ffd83a7a3
Reviewed-on: https://skia-review.googlesource.com/c/185200
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This reverts commit 57263c2e0c.
Reason for revert: assert failures in test bots.
Original change's description:
> Add compressed data support for SkImage.
>
> Adds a new SkImage::MakeFromCompressed method which takes raw data,
> a size, and a compression method, and returns a GPU-backed
> image.
>
> Bug: skia:8684
> Change-Id: I570c9dafce283bcd64dfbef4fbe1c4bfeac6ce2a
> Reviewed-on: https://skia-review.googlesource.com/c/184484
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com,ericrk@google.com
Change-Id: If5705507f4aa34c6495fa72ff1a927cb18eca6ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8684
Reviewed-on: https://skia-review.googlesource.com/c/185002
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Adds a new SkImage::MakeFromCompressed method which takes raw data,
a size, and a compression method, and returns a GPU-backed
image.
Bug: skia:8684
Change-Id: I570c9dafce283bcd64dfbef4fbe1c4bfeac6ce2a
Reviewed-on: https://skia-review.googlesource.com/c/184484
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:8684
Change-Id: I78aa90af2d643656532e082c4c12a60b08cf4d23
Reviewed-on: https://skia-review.googlesource.com/c/184194
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:8684
Change-Id: I44477c77326a4e502be4df5fdad25b126403d3a7
Reviewed-on: https://skia-review.googlesource.com/c/184191
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Brings back GL ETC1 support and adds Vulkan support as well.
Bug: skia:8684
Change-Id: Ie65da0a3172793081f0e4072f161bfb9b14678bc
Reviewed-on: https://skia-review.googlesource.com/c/179724
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:8664
Change-Id: Ic1b4f5afb2847eabb2290cbba808c5692a876972
Reviewed-on: https://skia-review.googlesource.com/c/182152
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 9a97c96c9c.
This works like makeColorSpace, but allows changing color type as well.
Added a GM to test, although the GM demonstrates several ways this can
fail (especially when using this on lazy images).
For simple use-cases (8888 <-> F16), everything should be fine.
For the reland, add logic to the GM to guard against context abandon
failures, and to ensure that lazy images can be decoded (by calling
makeRasterImage) before trying to draw them. That prevents the DDL
recorder from seeing them.
Bug: skia:
Change-Id: Ibc7b07c3399979b1a44d85a38424e5487e606607
Reviewed-on: https://skia-review.googlesource.com/c/183800
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit f855c3c785.
Reason for revert: DDL and Abandon failures.
Original change's description:
> Add SkImage::makeColorTypeAndColorSpace
>
> This works like makeColorSpace, but allows changing color type as well.
> Added a GM to test, although the GM demonstrates several ways this can
> fail (especially when using this on lazy images).
>
> For simple use-cases (8888 <-> F16), everything should be fine.
>
> Bug: skia:8618
> Change-Id: If4c173c0dd4abaf4f8e63b7ae0ffcf8a08c7e9ef
> Reviewed-on: https://skia-review.googlesource.com/c/183382
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I5d7a72e2b674224351e4b0c982408f89780708f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8618
Reviewed-on: https://skia-review.googlesource.com/c/183392
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This works like makeColorSpace, but allows changing color type as well.
Added a GM to test, although the GM demonstrates several ways this can
fail (especially when using this on lazy images).
For simple use-cases (8888 <-> F16), everything should be fine.
Bug: skia:8618
Change-Id: If4c173c0dd4abaf4f8e63b7ae0ffcf8a08c7e9ef
Reviewed-on: https://skia-review.googlesource.com/c/183382
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is a reland of 2232b9ed39
Original change's description:
> Add target SkColorSpace to SkImage_GpuYUVA.
>
> Bug: skia:8868
> Change-Id: I91f58bf88aec14c17ea904adca792e20099c36eb
> Reviewed-on: https://skia-review.googlesource.com/c/182816
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:8668
Change-Id: If41ba39e63b348422afaf6910b03405ef1c2be12
Reviewed-on: https://skia-review.googlesource.com/c/183380
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This reverts commit 2232b9ed39.
Reason for revert: Causing crashes on some ES devices and ANGLE.
Original change's description:
> Add target SkColorSpace to SkImage_GpuYUVA.
>
> Bug: skia:8868
> Change-Id: I91f58bf88aec14c17ea904adca792e20099c36eb
> Reviewed-on: https://skia-review.googlesource.com/c/182816
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=jvanverth@google.com,brianosman@google.com
Change-Id: I61752dbd244c0b4c25578bae08f8da40db6bb514
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8668
Reviewed-on: https://skia-review.googlesource.com/c/183301
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:8868
Change-Id: I91f58bf88aec14c17ea904adca792e20099c36eb
Reviewed-on: https://skia-review.googlesource.com/c/182816
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
for f in $(git grep -l drawSimpleText); do
sed -i 's/wSimpleText(\([[:alnum:]]\), strlen(\1), kUTF8_SkTextEncoding,/wString(\1,/g' "$f"
sed -i 's/wSimpleText(\([[:alnum:]]*\)\.c_str(), \1\.size(), kUTF8_SkTextEncoding,/wString(\1,/g' "$f"
done
git checkout @~ include/core/SkCanvas.h samplecode/SampleCusp.cpp
git cl format
Change-Id: Ibc0c3afd30f86465a645fadb26177d61919f57fd
Reviewed-on: https://skia-review.googlesource.com/c/181561
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
No longer used in Chromium.
Change-Id: I974fc345c78212fa0378bb3e5a57348c32319adc
Reviewed-on: https://skia-review.googlesource.com/c/181841
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
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>
The cloud-build is now at a new enough Clang to find these.
Bug: skia:
Change-Id: Ib7cfecb7d79194dcdeca7c0cf22a9b2dbb8cb655
Reviewed-on: https://skia-review.googlesource.com/c/181162
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
trying to reduce casts at call-sites
Bug: skia:
Change-Id: I7c74cfd89111f7a197cbb1d77b499e2adc193579
Reviewed-on: https://skia-review.googlesource.com/c/180363
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Change-Id: I6e29e08a1bfaeafe98c8a61f8ce5c279839f4b3c
Reviewed-on: https://skia-review.googlesource.com/c/180301
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Like other image drawing, paint color is only used when drawing alpha
images, so I had to add a new GM to trigger the relevant code path.
That GM previously drew wrong (clipped color) in glenarrow, and now
draws correctly (matching enarrow).
Bug: skia:
Change-Id: I12c19c2afba29d5176b3ac60ef840d849107bb17
Reviewed-on: https://skia-review.googlesource.com/c/179987
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The function is inlined - the compiler can do whatever optimizations it
wants at each call-site. In the future, stride and uvOffset won't be
static (with optional wide colors), so this is required anyway.
Also, the pointer being passed in is never const, so stop cleverly
casting away the const-ness via reinterpret into and out of intptr_t.
Bug: skia:
Change-Id: I404c418a01d70ac77667ba89338940b086922dc6
Reviewed-on: https://skia-review.googlesource.com/c/179988
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The proxy/proxies in the SkImage_GpuBase subclasses already track
whether they're budgeted.
The parameters are sometimes redundantly stating the known budgeted
status of the proxy. Other times they are an illusion of control as
the value doesn't actually affected the budgeting of the proxy/proxies.
Change-Id: Ic2b12fbbed653fca1ec1910eeab686de69782834
Reviewed-on: https://skia-review.googlesource.com/c/179402
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
It's probably nicer to draw these images than not draw them.
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: I9f8df081c8256d345ad2d8bbbb30dbad982ad94e
Reviewed-on: https://skia-review.googlesource.com/c/178981
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>