Bug: skia:13033
Change-Id: I2b4a30f8adb927966ab20e8175a0dcf15fb3ed1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518636
Reviewed-by: Erik Rose <erikrose@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
At this CL, we should run exactly the same tests as before; the only
difference is that we enable and disable tests via SkSLTestFlags instead
of using different SKSL_TEST_xxxxxx macros for different test types.
There is an inert flag for SkQP; this will be implemented in a followup
CL.
The SKSL_TEST block now extends past 100 characters in some spots
because it was, overall, a lot easier to read and edit tabular data in
a tabular format than with inconsistent formatting and line wrapping.
Change-Id: Ic90f88b10c6e59357275b471e6e86e53e611f101
Bug: skia:13037
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518138
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Draw all the faces at the same animation time to prevent fast movement
from causing strange frames when all the faces are drawn at different
times (and orientations). Change a few names to make things a bit more
understadable.
Change-Id: I932c22f9f996e5fe1509723d5d426f188bf8ddef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518637
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I1fa160941b18392616708f4e08a4ebbf7398480e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518521
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
4 byte alignment was being used, when it should be 256 on Intel Macs.
Bug: skia:13033
Change-Id: If902885f62e019b10c316dcfd7f4a336e0982db7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518522
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This is pretty much just refactoring, condensing the virtual APIs of
PathTessellator and StrokeTessellator to not require exposing
PatchWriter. Once landed, this makes it easier to move PatchWriter to
a template where each Tessellator subclass has a different instantation.
Bug: skia:13012
Change-Id: I1211a707f3e6ac6b3543cf17a3d3af0372221ce4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517978
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Introduce a new text property ("xl"), to limit the number of lines when
auto-sizing.
This is a Skottie extension, pending UI/controls in Bodymovin.
Change-Id: Id0f1e633e1b324a97b227d6b187cd540990796a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518498
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
The motivation is that a future change will add a factory fn that
makes an aniso samplerstate. We don't want to support arbitrary
combinations of aniso with other knobs.
Bug: skia:13036
Change-Id: Id962f89019a37763961981990d0e49e298e16064
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516816
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The main change here is having the SkShaderInfo hold BlockReaders instead of ShaderSnippet entries.
Bug: skia:12701
Change-Id: I90f72d5a5b9735c5ce8342bee004f7adeb76ccff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517976
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The general flow of the blendInfo is:
It is created/filled in during the PaintParamsKey creation
- it is currently stored on the SkPipelineData to get it
out of the creation phase
Ownership is "transferred" to the ShaderCodeDictionary::Entry
when the PaintParamsKey is converted to a uniqueKey
- this makes sense bc the blendInfo depends pretty directly
on the PaintParamsKey
When a FS is generated by a backend the BlendInfo is retrieved
(from the SCD::Entry) and placed in the SkShaderInfo
- the backend can then use the BlendInfo to set up the
fixed-function blending
Note:
The duplication of the BlendInfo in the SkPipelineData and the
SCD::Entry is unfortunate but may go away in the future. We
are faced with the general problem of the pre-compilation pass
needing to get both the structure of the uniforms a program
requires and the BlendInfo but _not_ the uniforms. So, in the
future, an SkPipelineData may always be passed in to collect
data but then disassembled (e.g., the uniformBlock is cached,
the blendInfo goes into the SCD::Entry, etc.)
Bug: skia:12701
Change-Id: I5571809981cefa6770f69a4c1b8361db14afc44b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517876
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
ExtractPaintData currently returns:
std::tuple<SkUniquePaintParamsID, std::unique_ptr<SkPipelineData>>
SkShaderCodeDictionary::findOrCreate is going to change in an upcoming CL and this sets up to better isolate those changes.
Bug: skia:12701
Change-Id: I8d077b3d342e6ea16ac99227eb145d92e8247ea4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517736
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
On Linux, Viewer can sometimes attempt to animate a sample before the
first time it is drawn. If the sample's onAnimate depends on resources
being loaded in onOnceBeforeDraw then it may crash.
Change-Id: Idddf3dc80e2ee2bc3252cc3ee58784d14165bc07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/518136
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
PS1 regenerates BUILD.bazel files
I suggest reviewing the deltas between PS1 and the latest
PS to focus on the interesting bits.
The changes here allow for a Vulkan-only build of HelloWorld
based on sk_app. The toughest change was properly fetching
the VisualID after removing the gl calls that used to
fill that in.
There are a few changes that fix resolution of Dawn
header files, but those won't actually be built until
a follow-on CL.
Change-Id: I54fb58b5dd7ecd4313562aed401759b3eaed53c0
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516999
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
These are flags and so are logically unsigned. This fixes an issue where
ASAN detects that the bitwise negation of of all listed enum values will
not fit in underlying enum type.
Change-Id: Idb993f29bdac36ef8960392b89a748f708dae520
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517878
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: skia:12754
Change-Id: I8b74fadabee2ec90c20f9b53ff4946a3e2062cd3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/515956
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This is required, now that the passthrough decoder is enabled
(particularly on Mac, where we run our command buffer bots).
Change-Id: Id2c5ccff1f27669c487cade04b912a7792077c38
Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac-Clang-x86_64-Debug-CommandBuffer
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517776
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This was motivated by SkScalerContextFlags putting `kNone` into the
global namespace. Instead of adding a suffix, change these internal
enums to be scoped and update the users.
Because SkScalerContextFlags is used like a bitfield,
`SK_MAKE_BITFIELD_OPS` is used to provide the appropriate operators. The
macro implementation is updated to handle scoped enums, remove the very
dangerous, unwanted, and unused templated operators, and add operator~
since that is needed by one existing user.
Also, for some reason this allows the compiler to find an unused field
which is removed.
Change-Id: Id31c80b381bffaf9b623f6a8ec7d86751d3d99f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517616
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
If a glyph is to be drawn from a bitmap, preemptively mark it as not
having any path. This prevents attempts to fake bold or draw large
`sbix` glyphs from paths.
Change-Id: I2959f18e70f29b13ca198a710dffc88a249c73d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517617
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
SkPipelineData is evolving into a big deal - it deserves it owns files.
Bug: skia:12701
Change-Id: I78b4100f1b90fa10f2b264e6d13fca6f15bba39b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516157
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I5b37d4ce1b8b78de634e6bfaa2d32bfc3b88c54f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517756
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: oss-fuzz:45355
Change-Id: I1958f7c009ae186485cc59e9ce1c3e8179a0acee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517737
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This class hides a lot of the finicky details of block handling and provides a structured means of accessing an SkPaintParamsKey's data payload.
In a following CL this will be used to expose the SkPaintParamsKey's data to the snippet glue code.
Bug: skia:12701
Change-Id: I6554940429c7c6e048cfd37533951c61cf255408
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516337
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Additionally make the enums enum-classes.
We will need this to specify fixed function blend modes in Graphite.
This CL is mainly mechanical (i.e., global replace) but some fix-ups were required for our internal bit twiddling with the enum-classes.
Bug: skia:12701
Change-Id: I67abcf8274d14e691974cf253bf65dcb4697bd9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/515318
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
DEF_CONDITIONAL_TEST and DEF_CONDITIONAL_GPUTEST_FOR_xxxx_CONTEXTS will
allow unit tests to be considered or ignored based on a passed-in
boolean condition. DEF_TEST_DISABLED is now implemented as a conditional
test hard-coded with a "false" condition.
This allows macros (such as SKSL_TEST) to add unit tests based on the
result of a comparison.
Change-Id: Ic5325569009cfce768ba8942907c1d3e7d69ca1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517516
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
These were still using an outdated version of SkRuntimeEffect.makeShader
Change-Id: Ie55b0eb764cc7f662a8a8893973a60b9746ca51c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517276
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This only affected one helper script; the others just automatically
forward any user-specified arguments.
Change-Id: Icd401d222d14e459e3c4429e2b2fec567834cada
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517356
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bug: skia:12754
Change-Id: I666bda6a192e3c3dc95953e5a36fbabbf65171ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/515857
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Guarded for chromium and Google3
Bug: chromium:1302855
Change-Id: If9b085a24d5f03e6971506c98463aa8c09100a67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516016
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We only want to run pass/fail unit tests on SkQP. Gold image support has
been removed.
In this CL, the command-line argument for render tests has been left
as-is to avoid breaking scripts which rely on it. This can be removed in
a followup. The Java binding continues to exist as a no-op.
Change-Id: Ib8acb6cb490b935b10d841e2319fe4537696bda1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516336
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
that wouldn't allow to use RasterPipeline
when SkVM blitter cannot be created
Change-Id: Ieadf06169c8163a8490df19258eb4dd25e31ee05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516997
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
ag/16935648 added a method to detect the color depth of R/G/B channel
for input sources. This change does the following: (1) call this new method and default
SkAndroidCodec to 1010102 for 10-bit images; (2) add color-depth to
SkEncodedInfo.
Change-Id: I3ede4a7a6223da2d4c075403d6ee280db086e0be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512076
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
as a small optimization and to prepare for future
bigger optimization
Change-Id: Iafda673533c05417de5092549105e82959ba9fcf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516378
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
ES2 disallows opaque types in expressions (other than passing them to
their associated builtin functions). We now enforce a similar
restriction on SkSL opaque types.
While I was there, I added several other cases to the invalid-shader
test to make sure that they were all caught.
I needed to reorder some code to make sure that ternary expression error
messages didn't change. Ternary expressions now check for opaque types
before checking that the left-side type and right-side type are
compatible. This is because we check for "compatible" ternary
expressions by checking if `leftSide == rightSide` would be accepted.
`shader1 == shader2` used to be considered a valid expression for the
purposes of this test, but not anymore.
Change-Id: I62a0a31feca9dadd428da7d1b48d7693c4b6434d
Bug: skia:13026
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516802
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>