This bug was introduced in https://skia-review.googlesource.com/c/skia/+/160162 (Make GrYUVtoRGBEffect more flexible)
I don't know why I wasn't seeing this locally!
Change-Id: Ic4d9b88b70c6d691d1e30d5ee0dc592a00b9b4e7
Reviewed-on: https://skia-review.googlesource.com/c/161044
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This makes GL & Vulkan render the wacky_yuv_formats GM correctly (transparency and all).
Bug: skia:7903
Change-Id: I09cf872beae3fd0fc1c5109b03ca1714ed51ae85
Reviewed-on: https://skia-review.googlesource.com/c/160162
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: I1f05014a6ab955f324e4cde4f7b7aebe8f7d72a1
Reviewed-on: https://skia-review.googlesource.com/c/160385
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:7903
Change-Id: Ie7d0135f392b67085a23a59cb469429f9e2b0221
Reviewed-on: https://skia-review.googlesource.com/c/160029
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:7903
Change-Id: I04630ebec37b087423e8305cc1716544fa00a403
Reviewed-on: https://skia-review.googlesource.com/c/160020
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I7b35dd063c19cacd0022840d17207cbf4bb03cc7
Reviewed-on: https://skia-review.googlesource.com/c/159063
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Convert GrConstColorProcessor to store SkPMColor4f
Bug: skia:
Change-Id: I6c505856653a02e576ae11fca59dc307545437f7
Reviewed-on: https://skia-review.googlesource.com/c/159152
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I3da7c566cdf9256e57ac7e7f30fee18b9c1a144d
Reviewed-on: https://skia-review.googlesource.com/c/159460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
It's been driving me nuts that I can't just write `SkMatrix44 m;`,
and I often don't care whether it's initialized or not. The default
identity constructor would be nice to use, but it's deprecated.
By tagging this constructor deprecated, we're only hurting ourselves;
our big clients disable warnings about deprecated routines and use it
freely.
A quick tally in Skia shows we mostly use the uninitialized constructor,
but sometimes the identity constructor, and there is a spread of all
three in Chromium. So I've left the two explicit calls available.
I switched a bunch of calls in Skia to use the less verbose constructor
where it was clear that it didn't matter if the matrix was initialized.
Literally zero of the kUninitialized constructor calls looked important
for performance, so the only place I've kept is its lone unit test.
A few places read clearer with an explicit "identity" to read.
Change-Id: I0573cb6201f5a36f3b43070fb111f7d9af92736f
Reviewed-on: https://skia-review.googlesource.com/c/159480
Reviewed-by: Brian Osman <brianosman@google.com>
This is a reland of f065907ccc
3rd time's the charm:
The new analytic gradient shader was sporadically triggering violations of the coverage as alpha
compatibility optimization. Unfortunately, even when using the same device and random seed for the
test, the bots did not always reproduce the error. However, we identified the likely cause of the
violation.
The test requires that all output channels are less than the input alpha, which it uses to validate
whether or not the shader is modulating its values by the input alpha. This test does not pass if
the RGB values are greater than 1. The original version of the analytic gradient shader used half4s
for its scale and bias values. Given the threshold limit for hardstops of 0.00024 (SkNearlyZero),
a very small interval that is not treated as a hardstop can create a scale or bias of over 4000.
This moves into the very imprecise region of 16-bit floats, making it plausible that the gradient
outputs colors greater than 1, due to rounding. The kicker is that the random test generation for
stop locations does not use a uniform distribution, but is instead biased towards the remaining
interval, which increases the likelihood of generating a small interval that is not treated as a
hard stop. We are keeping this behavior since ill-conditioned gradients are useful in testing.
Original change's description:
> Reland "Implement an explicit binary search-based analytic gradient colorizer"
>
> This reverts commit 9461dcf130.
>
> Reason for revert: Fixes for ANGLE's incorrect shader behavior
>
> Original change's description:
> > Revert "Implement an explicit binary search-based analytic gradient colorizer"
> >
> > This reverts commit dcc85fc610.
> >
> > Reason for revert: ANGLE is frequently corrupted, particularly radial_gradient4 and mixershader
> >
> > Original change's description:
> > > Implement an explicit binary search-based analytic gradient colorizer
> > >
> > > Provides a reasonably flexible fragment processor that defines another
> > > colorizer implementation for gradients. It can support up to 8
> > > interpolation intervals (which is 16 colors if every stop is a hard stop
> > > or 9 colors if every stop is a smooth transition). It
> > > supports mixtures of hard and smooth stops. It is conditionally compiled
> > > into versions specific to the interval count (so it can produce up to
> > > 8 shader variants).
> > >
> > > The GrGradientShader controller does not remove the single and dual
> > > interval colorizers, which are useful specializations of this explicit
> > > binary search colorizer. Similarly, since it can only handle up to 8
> > > intervals, the texture colorizer is still used as a fallback.
> > >
> > > Currently it does not employ capabilities detection to determine if the
> > > hardware can support the number of required uniforms, which can become
> > > substantial for the larger gradient configurations.
> > >
> > > Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> > > Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b
> > > Reviewed-on: https://skia-review.googlesource.com/155080
> > > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> >
> > TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com
> >
> > Change-Id: I351a387f0528e4c2db2d47ab2e5d6b336991fb98
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> > Reviewed-on: https://skia-review.googlesource.com/156541
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com
>
> Change-Id: I2aca36307d88c26905d860ec29417ec68c6037cc
> Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> Reviewed-on: https://skia-review.googlesource.com/156542
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
Change-Id: I2d050624781c77cdd160291cadbadac602b48bde
Reviewed-on: https://skia-review.googlesource.com/c/157569
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:7903
Change-Id: I2399e4aaae6b91914d637ff0e921e04596b52836
Reviewed-on: https://skia-review.googlesource.com/159141
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 412dd56589.
Reason for revert: serialize-8888
Original change's description:
> Add GM for less common YUV formats
>
> Bug: skia:7903
> Change-Id: I0d6e6d6274d66a71aaf24b68b6d9ceb0f2148b68
> Reviewed-on: https://skia-review.googlesource.com/157601
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
TBR=jvanverth@google.com,robertphillips@google.com
Change-Id: I3c8375244ddee5d12836076793ec78a46cc04450
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7903
Reviewed-on: https://skia-review.googlesource.com/c/159043
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:7903
Change-Id: I0d6e6d6274d66a71aaf24b68b6d9ceb0f2148b68
Reviewed-on: https://skia-review.googlesource.com/157601
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This is a reland of b8fef7c986
readpixels is now disabled on serialize-8888.
The image encoding means it doesn't quite round trip,
though the image looks fine to the eye.
Original change's description:
> clamp gamut if needed in SkConvertPixels
>
> We need to clamp here for all the same reasons we need to clamp when
> blitting. I've centralized the clamp's implementation to help that.
>
> I've allowed any --config to run this GM. --config 565 was actually
> pointing out this problem by asserting, and now looks fine.
>
> Change-Id: Icc066792fc53747b161302d200abdd8dc4669f7f
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
> Reviewed-on: https://skia-review.googlesource.com/158721
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I07601149e1d1e070bf96361f5303569b6a7b4e2a
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://skia-review.googlesource.com/c/159001
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit b8fef7c986.
Reason for revert: serialize-8888?
Original change's description:
> clamp gamut if needed in SkConvertPixels
>
> We need to clamp here for all the same reasons we need to clamp when
> blitting. I've centralized the clamp's implementation to help that.
>
> I've allowed any --config to run this GM. --config 565 was actually
> pointing out this problem by asserting, and now looks fine.
>
> Change-Id: Icc066792fc53747b161302d200abdd8dc4669f7f
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
> Reviewed-on: https://skia-review.googlesource.com/158721
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,brianosman@google.com
Change-Id: Id888656b313619ab2652a3387bdbc5208e192ec1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://skia-review.googlesource.com/c/158980
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Outsetting in perspective case outsets the original homogeneous quad
points rather than the homogenized 2d points in order to avoid seaming
issues along shared edges.
Currently there is no way to trigger this from the public API and it
is tested by directly accessing GrRenderTargetContext from the added gm.
Change-Id: I24e0d53cc5821c8c8be07c23aca5bfafb4935c33
Reviewed-on: https://skia-review.googlesource.com/157600
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
We need to clamp here for all the same reasons we need to clamp when
blitting. I've centralized the clamp's implementation to help that.
I've allowed any --config to run this GM. --config 565 was actually
pointing out this problem by asserting, and now looks fine.
Change-Id: Icc066792fc53747b161302d200abdd8dc4669f7f
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://skia-review.googlesource.com/158721
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
After sk_imageinfo was initially created, we have added a colorspace to it,
and that object is a smart-pointer. In response to that, this CL upgrades
imageinfo to an "object" (like paint), so we can manage the ref-counting of
its colorspace, and to allow for future changes/expansion (like paint).
Bug: skia:
Change-Id: I629ff99c0820fdbe83f062d9fb768c15cda68e18
Reviewed-on: https://skia-review.googlesource.com/157156
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:
Change-Id: Ie59aace6ba7ca3685d481fcb3af508629c56f0c3
Reviewed-on: https://skia-review.googlesource.com/157742
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Change encode-srgb-* to exercise this code. The encoders
handle this just fine, so just remove those checks. The
decoders still rely on having a color space, so detect
and fix this inside SkCodec. Eventually I'd like to get
rid of the swizzler, use skcms for all format conversion,
etc... but that's a really big change, and this will let
us land other changes without breaking layout tests.
Bug: skia:8382
Change-Id: I8d85bf44ee3a287ad295515a745ded2ff5051417
Reviewed-on: https://skia-review.googlesource.com/156627
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Converts GrResourceProvider::Flags and GrResourceCache::ScratchFlags
to "enum class" and fixes a case where we were accidentally using the
wrong type of flag. Makes sure to allocate GrSWMaskHelper proxies with
kNoPendingIO.
Bug: skia:8351
Change-Id: Ibcaa26314a53d0cb31ae22915ab94ab0fc07e76d
Reviewed-on: https://skia-review.googlesource.com/157280
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit f065907ccc.
Reason for revert: Processor test failing (inconsistently) on several bots.
Original change's description:
> Reland "Implement an explicit binary search-based analytic gradient colorizer"
>
> This reverts commit 9461dcf130.
>
> Reason for revert: Fixes for ANGLE's incorrect shader behavior
>
> Original change's description:
> > Revert "Implement an explicit binary search-based analytic gradient colorizer"
> >
> > This reverts commit dcc85fc610.
> >
> > Reason for revert: ANGLE is frequently corrupted, particularly radial_gradient4 and mixershader
> >
> > Original change's description:
> > > Implement an explicit binary search-based analytic gradient colorizer
> > >
> > > Provides a reasonably flexible fragment processor that defines another
> > > colorizer implementation for gradients. It can support up to 8
> > > interpolation intervals (which is 16 colors if every stop is a hard stop
> > > or 9 colors if every stop is a smooth transition). It
> > > supports mixtures of hard and smooth stops. It is conditionally compiled
> > > into versions specific to the interval count (so it can produce up to
> > > 8 shader variants).
> > >
> > > The GrGradientShader controller does not remove the single and dual
> > > interval colorizers, which are useful specializations of this explicit
> > > binary search colorizer. Similarly, since it can only handle up to 8
> > > intervals, the texture colorizer is still used as a fallback.
> > >
> > > Currently it does not employ capabilities detection to determine if the
> > > hardware can support the number of required uniforms, which can become
> > > substantial for the larger gradient configurations.
> > >
> > > Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> > > Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b
> > > Reviewed-on: https://skia-review.googlesource.com/155080
> > > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> >
> > TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com
> >
> > Change-Id: I351a387f0528e4c2db2d47ab2e5d6b336991fb98
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> > Reviewed-on: https://skia-review.googlesource.com/156541
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com
>
> Change-Id: I2aca36307d88c26905d860ec29417ec68c6037cc
> Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> Reviewed-on: https://skia-review.googlesource.com/156542
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com
Change-Id: Icd925d568d8cdffdc3020c07a9c50a4aa9cf0bb9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
Reviewed-on: https://skia-review.googlesource.com/157429
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 9461dcf130.
Reason for revert: Fixes for ANGLE's incorrect shader behavior
Original change's description:
> Revert "Implement an explicit binary search-based analytic gradient colorizer"
>
> This reverts commit dcc85fc610.
>
> Reason for revert: ANGLE is frequently corrupted, particularly radial_gradient4 and mixershader
>
> Original change's description:
> > Implement an explicit binary search-based analytic gradient colorizer
> >
> > Provides a reasonably flexible fragment processor that defines another
> > colorizer implementation for gradients. It can support up to 8
> > interpolation intervals (which is 16 colors if every stop is a hard stop
> > or 9 colors if every stop is a smooth transition). It
> > supports mixtures of hard and smooth stops. It is conditionally compiled
> > into versions specific to the interval count (so it can produce up to
> > 8 shader variants).
> >
> > The GrGradientShader controller does not remove the single and dual
> > interval colorizers, which are useful specializations of this explicit
> > binary search colorizer. Similarly, since it can only handle up to 8
> > intervals, the texture colorizer is still used as a fallback.
> >
> > Currently it does not employ capabilities detection to determine if the
> > hardware can support the number of required uniforms, which can become
> > substantial for the larger gradient configurations.
> >
> > Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> > Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b
> > Reviewed-on: https://skia-review.googlesource.com/155080
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com
>
> Change-Id: I351a387f0528e4c2db2d47ab2e5d6b336991fb98
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> Reviewed-on: https://skia-review.googlesource.com/156541
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com
Change-Id: I2aca36307d88c26905d860ec29417ec68c6037cc
Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
Reviewed-on: https://skia-review.googlesource.com/156542
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
The "pointy vertex" test was only considering the distance from the
next (outgoing) edge to the previous point. It must also consider the
distance from the previous (incoming) edge to the next point. If
either are less than a quarter pixel, the vertex is considered pointy
and should be removed. (884166)
Also (887103), when an interior region was completely removed due to
boundary simplification, it would leave a degenerate edge consisting
of the same vertex. So avoid introducing a join edge when prev == next.
Bug: 884166, 887103
Change-Id: I7f1d5b98e418d8f2a1c11643259d3cd74d08f286
Reviewed-on: https://skia-review.googlesource.com/157220
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
- gammaencodedpremul GM was just demonstrating something that we
understand well (and have much better testing for).
- readpixels GM was filled with workarounds for things that are no
longer true (unpremul images, clamped F16).
- Other uses can be switched to SkConvertPixels trivially.
- Remove SkColorSpaceXformPriv and SkColorLookUpTable, all unused.
- Remove SkColorSpaceXform_skcms.cpp, no longer referenced by clients.
Bug: skia:
Change-Id: I7298bb53aa61b49ad1398ebc504d35c119fd5cf4
Reviewed-on: https://skia-review.googlesource.com/157153
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Basically I just wanted to refactor this GM so that it drew a bitmap of
the same (ct,at,cs) as the canvas so that we could get some coverage of
drawing, say, F16.
But then I just started refactoring here and there and before I knew
it I've basically rewritten the GM. What it draws is unchanged, but
- I've stripped the parameters that never change from the names
- I've removed a lot of inheritance instead using a single
SkBitmap (*)(SkImageInfo) pointer passed to the constructor
- formatting, header cleanup, etc.
Sadly this doesn't reproduce the crash mentioned in the attached bug.
PS 2+3 oughta stop --config serialize-8888 from asserting.
Bug: skia:8410
Change-Id: I9dd40e0dfe84b7fe315082d899bb2fc327728363
Reviewed-on: https://skia-review.googlesource.com/156980
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
This template is only used in practice for SkBitmaps. There is already a
public API that does the same thing, so there's no need for this one.
Change-Id: I20b10aa8bc87a56face947689e1f0eaf4c3cc4e8
Reviewed-on: https://skia-review.googlesource.com/156540
Reviewed-by: Hal Canary <halcanary@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This reverts commit dcc85fc610.
Reason for revert: ANGLE is frequently corrupted, particularly radial_gradient4 and mixershader
Original change's description:
> Implement an explicit binary search-based analytic gradient colorizer
>
> Provides a reasonably flexible fragment processor that defines another
> colorizer implementation for gradients. It can support up to 8
> interpolation intervals (which is 16 colors if every stop is a hard stop
> or 9 colors if every stop is a smooth transition). It
> supports mixtures of hard and smooth stops. It is conditionally compiled
> into versions specific to the interval count (so it can produce up to
> 8 shader variants).
>
> The GrGradientShader controller does not remove the single and dual
> interval colorizers, which are useful specializations of this explicit
> binary search colorizer. Similarly, since it can only handle up to 8
> intervals, the texture colorizer is still used as a fallback.
>
> Currently it does not employ capabilities detection to determine if the
> hardware can support the number of required uniforms, which can become
> substantial for the larger gradient configurations.
>
> Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
> Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b
> Reviewed-on: https://skia-review.googlesource.com/155080
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,brianosman@google.com,michaelludwig@google.com
Change-Id: I351a387f0528e4c2db2d47ab2e5d6b336991fb98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
Reviewed-on: https://skia-review.googlesource.com/156541
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Provides a reasonably flexible fragment processor that defines another
colorizer implementation for gradients. It can support up to 8
interpolation intervals (which is 16 colors if every stop is a hard stop
or 9 colors if every stop is a smooth transition). It
supports mixtures of hard and smooth stops. It is conditionally compiled
into versions specific to the interval count (so it can produce up to
8 shader variants).
The GrGradientShader controller does not remove the single and dual
interval colorizers, which are useful specializations of this explicit
binary search colorizer. Similarly, since it can only handle up to 8
intervals, the texture colorizer is still used as a fallback.
Currently it does not employ capabilities detection to determine if the
hardware can support the number of required uniforms, which can become
substantial for the larger gradient configurations.
Bug: chromium:796479, chromium:729727, chromium:696603, chromium:543625, chromium:414254
Change-Id: Ia1f735a5019766ae4796cc22964b2913db34b95b
Reviewed-on: https://skia-review.googlesource.com/155080
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Sets up a fake web font loader which serves a local/resource font to
the sample text animation.
Also rename resources/skotty/skotty_* -> resources/skottie/skottie_*.
Change-Id: I4af5b24fc3cc5c63c78801979f9be56744047134
Reviewed-on: https://skia-review.googlesource.com/155881
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
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>
Bug: skia:
Change-Id: I6a06b2ff951b9a1319c40b16b33840e220fecc37
Reviewed-on: https://skia-review.googlesource.com/155900
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:
Change-Id: I71ea8f4275c2eb89dd88b7abf501b71e37469785
Reviewed-on: https://skia-review.googlesource.com/155605
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ibb2dfdf6eccb48fbd2c4a503e473170389e2ec2a
Reviewed-on: https://skia-review.googlesource.com/155169
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@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>
The CPU type is still specified using GrVertexAttribType.
The GPU type is specified directly using GrSLType.
kHalfX_GrVertexAttribType now really means half-float buffer
data, rather than float. (Caveat: The GL enum is only correct
with ES3/GL3 - ES2+extension needs a different value. Sigh.)
Bug: skia:
Change-Id: Ife101db68a5d4ea1ddc2f6c60fbec0c66d725c16
Reviewed-on: https://skia-review.googlesource.com/154628
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: 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>
Currently, this won't draw on GPU backends that don't have F16 support.
Bug: skia:8375
Change-Id: Ie1975e7503384a8233ddfb5135452bb8cdc406f3
Reviewed-on: https://skia-review.googlesource.com/153888
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This had poorly defined semantics in the world of DDL, and was only used
for a handful of GMs and tests. Switch those to use the SkImage version.
Bug: skia:
Change-Id: I2bec65c7547b2c904bd7f57a6296aacc0f7b4ed2
Reviewed-on: https://skia-review.googlesource.com/153886
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>