The end goal for the PaintCombo is that it is opaque to the user and
generated via a CombinationBuilder object.
Bug: skia:12701
Change-Id: I0ca6fb52207e85c444f2ddbcb43f7cf90bcafb34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540746
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Previously, our kernel and offset data was stored in two separate arrays
of half4. Now, they are interleaved into one array of half2. This allows
us to index into the data without complex control-flow or extra ALU ops
per sample. This change would allow us to use the "fixed-length loop"
path on ES2 hardware, assuming it's no slower.
Change-Id: I65c5b4c74475ca03f12d86f8896af2f95a059635
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541070
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
* Added support for field access expressions, excluding user-defined
interface blocks.
* Added a test case for vertex stage builtin declarations.
* Added a NOP workaround for sk_PointSize which does not have a
WGSL/WebGPU equivalent.
Bug: skia:13092
Change-Id: I46fd7bb0a9fe55d2e3ed2b3b72f63376c1ed4f31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539082
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
subprocess.check_output needs encoding or it defaults
to bytes.
Python 3 has / be float division and // be integer
division.
The skpbench fix is speculative.
Change-Id: I13d0e976c03bba30761c8ab533e6fdd041b795c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541696
Reviewed-by: Ravi Mistry <rmistry@google.com>
Based on the structure of the checks, there's no way to enter an if
block if the denominator of the division would be zero.
Change-Id: I252c05aab43f26984afa2eab89648d5ec4e280b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541074
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
This was removed from the DSLSymbols header when DSLParser first landed
(see http://go/skiareview/c/skia/+/400622/55/include/sksl/DSLSymbols.h)
but not removed from the cpp file. It appears to have been unused ever
since then.
Change-Id: Iaa948c62f7e8f5530c6a27f65e7f4e74919cf966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541636
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
We no longer support compiling in C++14, so we don't need these
workarounds anymore.
Change-Id: Idec5a90e98c242928182f4b32dd47459be8ca47f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541075
Reviewed-by: Arman Uguray <armansito@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
This reverts commit b143520625.
Reason for revert: might have caused chromium:1326848
Original change's description:
> Remove operator= from DSL expression types.
>
> This means that in raw DSL code, `foo = bar` will need to be written as
> `foo.assign(bar)`. This is admittedly slightly less convenient. However,
> in practice, raw DSL code is very rare, and in fact we only had one
> use-case for operator= across all of our code. This change will allow us
> to simplify the DSL parser by eliminating the `DSLWrapper` helper class,
> which was only needed because we overloaded `operator=`.
>
> Change-Id: I4fbc39b2c1443fc26a761d424c52e3b9b59169eb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541062
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I7c7e032c465aba004ba78fd69650c8037e019861
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541737
Auto-Submit: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This reverts commit 3b4f862d05.
Reason for revert: might have caused chromium:1326848
Original change's description:
> Remove DSLWrapper helper class.
>
> Without an `operator=` on our expressions and variables, we no longer
> need to wrap all our expressions with a helper.
>
> Change-Id: I8110079f61c9ad01997f7c4b376db223dc4b6e17
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541063
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I7efb3004913f7c85dc551d9740a6b31971de52d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541736
Auto-Submit: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
- Add support for simple assignment expressions, as well as swizzle,
variable references, and type conversion constructors to support
simple assignment test cases that reference built-ins and local variables.
- Handle a case where the type of a SkSL built-in differs from its WGSL
counterpart and emit a type cast when such a variable gets referenced.
- Add additional test cases for supported WGSL features that could not
be tested without simple assignment support.
Bug: skia:13092
Change-Id: Ib1ff3bcef60e436c9be5c08236c9fe4de02dd005
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538420
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
WGSL requires that pipeline stage IO parameters that are scalar or
vector integers be annotated with the "flat" interpolation attribute.
Bug: skia:13092
Change-Id: I2930da6cf468ac8cd9ccaca0004e5849065411dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538419
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is similar to https://skia-review.googlesource.com/c/buildbot/+/538218
BIG CHANGE: If we fail to download uninteresting hashes
(because Gold is down or the script otherwise fails), we
now crash/fail our Test-* tasks. In an early version of
this removal, that lack of failure masked an issue with
the script (urllib2 is not in Python3) and nearly would
have landed. Failing loudly is better, IMO.
This removes the symbolize_stack_trace script, which
stopped working with Python3 for reasons unknown.
If we need the behavior, we can rewrite it.
Relatedly, we removed 4 jobs, the Docker ones, because
we will not get much value out of them as we migrate
towards Bazel and removing the symbolization script
was tricky to get right.
There are a few cleanups around copypasta that I noticed
when combing through the recipes.
Change-Id: I8dfab416e964fd494267800b4ebe216061895f19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538636
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
The version in CIPD is 4.46, which has the following
issue when run in Python 3:
https://github.com/GoogleCloudPlatform/gsutil/issues/961
This asset uses the latest version, 5.10, which *only*
supports Python 3.
Our gsutil recipe module had some "Windows-specific"
behavior that was actually running on Linux and needed
to be changed because it was using Python2 to run
gsutil.
Change-Id: I6884b9b6fcc600351a8e608dc9e3c0114907a586
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541220
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This just adds the API. Additional work will be required to actually
create an SkShaderSnippet for the runtime effect.
The SkBlenderID will be used in the combination system to specify the
Blender runtime effect as a combination candidate.
Bug: skia:12701
Change-Id: I524a2fa7a00ece6d9422891bcbc82ce0237679e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540170
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
1. It is illegal to declare an empty struct in WGSL. The codegen no longer
declares an empty struct for pipeline stage inputs and outputs if the
program does not reference them.
2. WGSL requires that every vertex program declare a @builtin(position) output.
The codegen now emits this pipeline stage output even for an empty
program that doesn't assign to sk_Position. This allows unit tests for
vertex programs to be authored without unnecessary boilerplate.
Bug: skia:13092
Change-Id: Ib023200e2ba13acf96859817249686d7f815cb00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538418
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
- Introduced the SK_ENABLE_WGSL_VALIDATION macro which is currently only
enabled when skslc gets compiled when using the `skia_compile_sksl_tests`
setting.
- SkSLCompiler::toWGSL now validates its output using Tint's WGSL reader
structures based on conditionally compiled code depending on the
SK_ENABLE_WGSL_VALIDATION flag.
- Fixed `warning: use of deprecated language feature: struct members should be separated with commas"
warnings that were generated for HelloWorld.wgsl.
Bug: skia:13092
Change-Id: Ib894457030004966221faf82f61360e390b95e22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537802
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This adds aliases like skvx::float2, float4, etc. to SkVx.h and goes
through existing usages of SkVx to standardize on those aliases, or
refer to the full name directly.
In particular, this lets us clean up the equivalent aliases in
src/gpu/tessellate, src/gpu/graphite/VectorTypes and src/gpu/ganesh/GrVx
Where possible, I switched to using skvx::Foo directly and leveraged
auto to make it less redundant. Headers always used the full type
except for PatchWriter.h and Rect.h because of the number of their
usages. In this case, the alias is scoped to private so it can't leak.
This is prep to migrate older code that is still using SkNx and its
aliases like Sk4f to SkVx as well.
Change-Id: I9dd104e83cf17c2b88995a047cfd2e2b0fe6fac2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
ProgramSettings now has a fRequiredVersion, based on the #version
directive (if any). There is plenty more to do, and this is an
intermediate state where the "fEnforceES2Restrictions" bool still
exists. Eventually, that will go away, or change into a check between
the required version and the SkCapabilities supplied (also in
ProgramSettings).
As a proof-of-concept, this migrates some use-cases to insert the new
version directive, and unlock ES3 features in some tests and benches.
Bug: skia:11209
Change-Id: I964975931039588d7a302bfedd09246e3d4a79d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540037
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Id6e4d82d96f6393c70866bcc8430d4f088d2ad2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541066
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Remove the unneeded device information from the Painter. Flow
the device info where needed in the code.
Change-Id: I31f79979a0e8f4d41ea942ea9c7052fbe83cd330
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541059
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This eliminates duplicate code and gives a consistent API between the
three tessellation approaches, which will let the graphite
PatchAllocators be generalized into a template that takes a
FixedCountFoo.
Bug: skia:13056, skia:13012
Change-Id: I556822b43807c14c2e4e5c919f60cb766d43f6fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537456
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Consolidates some other constants, removes the pow2 and pow4 functions
that just computed `x*x` or `x*x*x*x`. Moves the `mix` function into
PatchWriter since that's the only place it's used.
Change-Id: Idaaba40f1007e1f0331ec8d335e6afbe69ddfbad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540920
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
SkFontMgr_Fuchsia::GetOrCreateTypeface() may be called from multiple
threads, but it wasn't thread-safe. Added a mutex that's used to
synchronize access to fTypefaceCache.
Bug: chromium:1316932
Change-Id: Ic6c0f4c4af01a8630cece3e6864a3cb304d8ef63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541078
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Without an `operator=` on our expressions and variables, we no longer
need to wrap all our expressions with a helper.
Change-Id: I8110079f61c9ad01997f7c4b376db223dc4b6e17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541063
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This means that in raw DSL code, `foo = bar` will need to be written as
`foo.assign(bar)`. This is admittedly slightly less convenient. However,
in practice, raw DSL code is very rare, and in fact we only had one
use-case for operator= across all of our code. This change will allow us
to simplify the DSL parser by eliminating the `DSLWrapper` helper class,
which was only needed because we overloaded `operator=`.
Change-Id: I4fbc39b2c1443fc26a761d424c52e3b9b59169eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541062
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is a reland of commit 69fecd6c2d
Original change's description:
> Add SkCapabilities object
>
> This describes the capabilities of a particular Skia rendering context
> (GPU context, or the CPU backend). At the moment, it only contains the
> supported SkSL version (with a new enum added to specify the current
> value as "100" and a new ES3 value as "300".
>
> SkCapabilities can not be retrieved from an SkCanvas - the client must
> have a concrete way of knowing what their destination device that will
> do the actual rendering is (GrCaps or SkSurface).
>
> This CL doesn't make use of the SkCapabilities yet, that's coming in
> follow-up CLs that alter the SkSL compiler and SkRuntimeEffect API.
>
> Bug: skia:11209
> Change-Id: I4e9fd21ff7ffd79f1926c5c2eb34e10b3af4bc9b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537876
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
Bug: skia:11209
Change-Id: If76343a8a536ade25f6b3d80e0885c7bc47d2adf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540919
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Font feature start/end indexes must be relative to the start of the utf8
buffer passed to SkShaper. SkParagraph had been passing indexes based on
the start of the block.
See https://github.com/flutter/flutter/issues/103615
Change-Id: Ie15611cb05e3532fc34d66724ac347b9bddc3c8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540157
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
This is a reland of commit 167e608bb3
Original change's description:
> [infra] Remove old python scripts and urllib2 references
>
> I was searching for urllib2 while resolving issues with
> https://skia-review.googlesource.com/c/skia/+/538636
> when I found several old, apparently unused scripts.
>
> Rather than fix them, let's get rid of them. If they
> are still in use, the conversion to urllib.request is
> pretty easy.
>
> Change-Id: I27d419601e81c93a3d53e280188a379dfab927c4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538936
> Auto-Submit: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
Change-Id: I656b45cbcbde61c45d6d9daa0d6b97324d738631
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541077
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
DSL runtime effects were unused outside of test code.
Change-Id: I561afc533c7c204183968aff0b9c4389b0587114
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540917
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Introduce SkStrikeDeviceInfo which contains all the device
information need to categorize the SubRuns. This abstraction will
be used in future CLs to move the Painters off of the devices,
and the SurfaceDrawingContext.
Change-Id: I77b9eff37e1e98175dfcebfc0f392c70aff19dc0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541057
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
third_party/**/BUILD.gn have a copyright header, so we'll add one
to our third_party/**/BUILD.bazel files too.
Change-Id: Ifc04d36624af07d91d279a139f3a691e51ce7418
Bug: skia:13323
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541076
Reviewed-by: Ravi Mistry <rmistry@google.com>
Change-Id: I1d8874e1371ce2ddeba119b097d018ad94aa474c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/541016
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Encountered while creating a presentation
Change-Id: I16962f089d263504644cc6b5f17d35644ff2099d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539056
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This will allow text blobs to be removed from GrTextBlobRedrawCoordinator
when they have perspective transformations.
Bug: skia:12966
Change-Id: I53d2a7f5ea1ba0560b49c2f6bb4c62ffa564dcc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540737
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit 69fecd6c2d.
Reason for revert: Why do we even bother separating include from src?
Original change's description:
> Add SkCapabilities object
>
> This describes the capabilities of a particular Skia rendering context
> (GPU context, or the CPU backend). At the moment, it only contains the
> supported SkSL version (with a new enum added to specify the current
> value as "100" and a new ES3 value as "300".
>
> SkCapabilities can not be retrieved from an SkCanvas - the client must
> have a concrete way of knowing what their destination device that will
> do the actual rendering is (GrCaps or SkSurface).
>
> This CL doesn't make use of the SkCapabilities yet, that's coming in
> follow-up CLs that alter the SkSL compiler and SkRuntimeEffect API.
>
> Bug: skia:11209
> Change-Id: I4e9fd21ff7ffd79f1926c5c2eb34e10b3af4bc9b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537876
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
Bug: skia:11209
Change-Id: I3bc843b0abf154dbaecb209b251f80741757bf70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/540858
Commit-Queue: Brian Osman <brianosman@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>