This will allow expressions like `-x == -x` or `!y == !y` to be detected
as matching expressions (which enables various constant-folding paths).
(Also, migrated the analysis code into a separate cpp.)
Change-Id: I3e317fdaed3762f8fa19e684a5ed557fc9348c7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527617
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The clip isn't actually applied, but clip stack manipulation is wired
up. This may have a slight impact on how things draw because the device
clip bounds now reflect the clip actions, and that is currently used as
each draw's scissor.
Bug: skia:12698
Change-Id: I1d2e9cea49762dbfaa008c7c6af6034387b62519
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526917
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This avoids a situation where we didn't know the position of a binary
expression while we were in the middle of evaluating it, which was
leading to problems with upcoming error reporting changes.
Change-Id: Ie41fa82d077de1aa1041cd84c539ba29aaa2f5f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527500
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This avoids a situation where we didn't know the position of a postfix
expression while we were in the middle of evaluating it, which was
leading to problems with upcoming error reporting changes.
Change-Id: Ie6d4dd8411ffb24ac7ee95d3e908483d0d92ba0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527499
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This change does the following:
* Removes 2 Golo Test-TSAN_Vulkan jobs because their counterparts already exist in Skolo.
* Moves 1 Golo Test-TSAN_Vulkan job to Skolo.
Bug: skia:13129
Change-Id: I28b40320c831d109aa4f8778ddc1d03be9473592
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526916
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
This adds egl through swiftshader to unix builds as a separate build target, supporting cl in g3
Change-Id: Ied8c413e9dee0f78f25cbcec1bf937a5eb55dd60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526676
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Followup CLs will improve their output.
Change-Id: I07059348f68cd6cd3154c31a41f81018b26a44e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527616
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>
Previously, we checked for division against zero, but didn't do anything
to prevent division against extraordinarily small values. Now, we only
saturate if the delta between max and min is greater than 0.00001.
Change-Id: I7d1df3430941c7e1a7f94e597d5449f9259612d6
Bug: skia:9320
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527498
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: Ibff49d1928d7f82d04930c8cfd9d574780732c0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527497
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
We were not propagating the position into a double-negated expression,
leading to an assertion failure in PrefixExpression.
Change-Id: I1970ff1a06d9631582626c68e151f12f6b3ef278
Bug: oss-fuzz:46381
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527507
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
GrProcessors should use BlendExpression instead. In practice, this is
currently a wash for GrXferProcessor generation, because anything that
BlendExpression can optimize right now is already be handled by the
PorterDuffXferProcessor. But it does allow us to remove AppendMode.
Also, any future improvements to BlendExpression will be accessible by
CustomXfermode.
Change-Id: Iaad82e4fe62ba5326b69020f254be9d2468813a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527276
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This gm is using ToolUtils::emoji_typeface() to draw, but hardcoding the
result of ToolUtils::emoji_sample_text() to remove the space. Remove
the hardcoded string and use the emoji_sample_text instead. Adjust the
sample text by using only the first two non-space codepoints.
Change-Id: Ifae79b3f73951a2b6216d838b1fe0a63608bd678
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527067
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
The goal here is to replace GrGLSLBlend::AppendMode with a version that
supports blend_porter_duff (i.e., uniform handling must be supported).
AppendMode is removed in the followup CL.
Change-Id: I166232b1238cef57af53d00246e7fee19d1ea156
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526516
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This also adds a make target to build a release version of
the debugger, which is handy when we want to push a fix
quickly. The make targets will also create the local_build
folder in the infra repo if it does not exist.
Change-Id: I073615a35068c425608454311a51c0c4e0a8152a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527181
Reviewed-by: Brian Osman <brianosman@google.com>
This FreeType union is 80 bytes in size and sometimes two of them are
being passed by value. Pass them by const reference instead.
Change-Id: I69f2a326e586c1ddf80d79db96f3df7ed2d00e31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527285
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Once the UniformManager is moved into the SkPipelineDataGatherer, it
will need to be reset-able and write{Uniforms} will need to be able
to be called repeatedly. This CL starts setting up for that future.
Bug: skia:12701
Change-Id: Ia652c05b4eb508dce12c66b2298930d799d1e445
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527280
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:13036
Change-Id: I31ccc3d1cfb271a2c2000476b91a695390cef4a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526518
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The internal ClipGeometry enum is moved to SimplifyResult in header.
The internal get_clip_geometry is renamed to Simplify and declared
header. This was so that the internal types (SaveRecord, Element, etc)
and TransformedShape could easily interoperate.
TransformedShape is a view that bundles references together instead
of requiring that all the internal types have some magical set of
functions that get_clip_geometry used.
The contains and intersect logic has all been consolidated into
TransformedShape instead of spread across many different contains()
functions. Intersect() is also more detailed because it can take
coordinate systems into account the coordinate systems, which will be
particularly useful when draw checking is added in a follow-up patch.
Bug: skia:12698
Change-Id: Ifac41a40715c7b0369fe31c273f12edc1efa956a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526736
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
The SkPipelineDataGatherer is going to subsume all the UniformManagers
scattered across the code so it will need the Layout in its ctor and
be plumbed where ever there is a UniformManager (in order to replace it).
Bug: skia:12701
Change-Id: I4f42bf50023e9e66c90f9a14833b976e214e1cc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526275
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The unused variable was breaking compilation for some versions of clang
Bug: skia:12701
Change-Id: I8ded5bf3d18136b5679878090186746b88292c3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527236
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
We didn't have any existing tests that exercised this path; it is
separate from most operators since it has no C++ equivalent.
Change-Id: I95b538dad01f8c8b122954fb5f66337371a398a8
Bug: oss-fuzz:46289
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527196
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>
This is currently unused and can be re-obtained from the paint params
key if needed. Currently, it is getting in the way of updating how we
collect uniform data.
Bug: skia:12701
Change-Id: I5057cdfa42252b03b0f9756290735bf4b20dcb6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526272
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This fixes an issue with "go embed" not liking symlinks.
Bug: skia:13126
Change-Id: I994751e63ec467e37555f5bfc192243498b0d6cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527057
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
The `owner` field was previously restricted to GrFragmentProcessor,
which excludes other GrProcessor classes like GrXferProcessors from
using the uniform handlers.
Change-Id: I465190334f0fb1e27393108ab7b18d2d3089e69c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526461
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>
This removes some hacks where we were creating nodes with the wrong
positions and later updating them to have the correct positions, along
with a general increase in the rigorousness of position tracking.
Change-Id: I2bc635de6d5f516d5fb6763b00a22a10ccdf135f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526678
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Print a string instead of an integer version of the enum.
Bug: b/215136610
Change-Id: Ia0f11b71e79c87a14347683f42cccb3d8f8be246
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521532
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This adds asserts to DSLParser::expression() to ensure that every
generated expression actually starts at the current offset, and fixes
all of the various spots we weren't successfully doing that.
Change-Id: Ie37dbf9ee8bb47fd03f7a290d2e15da4fbfff938
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525316
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Bug: oss-fuzz:46251
Change-Id: I4bed79ab085860030732d29eaa674b59ea3d2808
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526521
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Replace SK_SHOW_TEXT_BLIT_COVERAGE macro with kSkShowTextBlitCoverage.
Covert the ifdefs to if constexpr. Also fix issue with debugging
converage of aliased masks with FreeType (don't try to treat them like
a8 masks).
Change-Id: I50b5c06b2b4f8ee74ea9c3710740af623be7d6fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526520
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Temporary workaround for crashes that are blocking the Chromium -> Skia
roller.
Bug: skia:13040
Change-Id: I684eb0d0f63fc7e7949a1205ceef16a44eaf5148
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526679
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
These aren't currently used (we recompute them from the PaintParamsKey)
and are only getting in the way as we change how we accumulate uniforms.
We can always re-add them if the recomputation becomes a hot spot.
Bug: skia:12701
Change-Id: Id91ea0d27543666c75c154fc585d954c5f89aded
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526270
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
AE alignment semantics:
- leading white-space counts (i.e. "pushes" the line to the right
in left/center alignment mode)
- trailing white-space is ignored (does not push the line to the left
in center/right alignment mode)
Skottie currently always takes white-space into account. This yields
incorrect center/right alignment not just in the presence of explicit
trailing WS, but also due to residual WS from paragraph line breaks.
To fix, detect trailing WS for each committed line, and adjust glyph
positions to compensate.
Change-Id: Id8589cb30f743f21d77961c0eb4fa20a97e5f13c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526457
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Change-Id: Ia12c07752a9d31dfbf846f2cd2bb63d47532d6f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526677
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
This is a reland of commit 1aedd5dc11
Original change's description:
> Always apply mipmap sharpening on GPU
>
> Bug: skia:13078
>
> Change-Id: If459a96eba09fb10e967bc364435f79b83fdc1ec
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522099
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:13078
Change-Id: Ic05b38fc07566f090d609431f2738d64dfdc8a66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524218
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>