Interestingly, this reduces the size of our dehydated data
significantly, because we were storing the result type of the binary
expression explicitly. Now the result type is deduced automatically from
the left and right types by the Make call.
Change-Id: Ic6187a5c36774f5a4ed2ec579e9cd13b331832b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377099
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This reverts commit a950fef9db.
Reason for revert: sigh, Build-Win-Clang-x86_64-Release-Shared too
Original change's description:
> Reland "export SkRuntimeShaderBuilder"
>
> This is a reland of f1a937f141
>
> Original change's description:
> > export SkRuntimeShaderBuilder
> >
> > ... like we do SkRuntimeEffect.
> >
> > Change-Id: I024f1716b2f818d24b002213c02fa83d2b271123
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377757
> > 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>
>
> Cq-Include-Trybots: luci.skia.skia.primary:Build-Win-MSVC-x86_64-Release-Shared
> Change-Id: I82c440be4ea53e21c6c3d2b6999d832f71563d83
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377859
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,brianosman@google.com
Change-Id: Ia0f2da7a6761cad2020449d2d1be2f844f629f9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.skia.skia.primary:Build-Win-MSVC-x86_64-Release-Shared
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377866
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
In http://review.skia.org/375776, an optimization was added to the
Inliner, causing it to skip generation of unnecessary temporary
variables. The fuzzer immediately discovered a flaw in this logic: the
"unnecessary" variable was actually used in the rare case that a
function failed to actually return a value. The inliner didn't detect
this case. Of course, this isn't a valid program either, so now we
report the error and cleanly fail.
Change-Id: I1f201cfd33f45cace3be93765a4e214e43a46e69
Bug: oss-fuzz:31469, oss-fuzz:31525
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377101
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This does mean we won't print the name of a failing source, but that
shouldn't be needed so much given how FM runs on the bots... should be
obvious what failed without it.
On the flip side, this means each log line will print out atomically,
which might be nice when reading through TSAN runs with async threads.
Change-Id: Ib971416f255e60ea6d900ea687abb8404d799dfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377916
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
We note SetDefault() isn't threadsafe, but don't mention anything about
GetDefault(). So it feels like it ought to be thread safe.
But it's not threadsafe as-is, since it writes to gDefaultExecutor.
With tiny tweaks we can make it instead only read gDefaultExecutor.
Change-Id: If229afda3d0bfb4fe491137fd2fc2226d0eafafa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377918
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is a reland of f1a937f141
Original change's description:
> export SkRuntimeShaderBuilder
>
> ... like we do SkRuntimeEffect.
>
> Change-Id: I024f1716b2f818d24b002213c02fa83d2b271123
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377757
> 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>
Cq-Include-Trybots: luci.skia.skia.primary:Build-Win-MSVC-x86_64-Release-Shared
Change-Id: I82c440be4ea53e21c6c3d2b6999d832f71563d83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377859
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit f1a937f141.
Reason for revert: Build-Win-*-x86_64-Release-Shared
Original change's description:
> export SkRuntimeShaderBuilder
>
> ... like we do SkRuntimeEffect.
>
> Change-Id: I024f1716b2f818d24b002213c02fa83d2b271123
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377757
> 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,brianosman@google.com
Change-Id: I594c123c5161102e8341033d7a62c4bb98ab3835
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377858
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This should help with non-skia.git repos which use gen_tasks_logic.
Change-Id: I84bf101554555dd42e9349c93aec39280b7de84f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377837
Reviewed-by: Weston Tracey <westont@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
This is a reland of 202420e014
Original change's description:
> Reland "Remove GrProgramDesc::KeyHeader structure"
>
> This is a reland of 4bcd58afbf
>
> Original change's description:
> > Remove GrProgramDesc::KeyHeader structure
> >
> > Instead, just fold all of this information into the key, like everything
> > else. The only value that was accessed elsewhere is the initial key
> > length. That doesn't need to be part of the key, so store it separately
> > in the GrProgramDesc.
> >
> > Removing this special case logic is just the first step in revising how
> > we assemble keys.
> >
> > Bug: skia:11372
> > Change-Id: I52eb76812045e1906797cb37e809cfd0b3332ef0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376797
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
>
> Bug: skia:11372
> Change-Id: I2cdb49aee3537e54dad9af1f9b47cf1aed1aca21
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376849
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
Cq-Include-Trybots: luci.skia.skia.primary:Build-Win-MSVC-x86-Debug
Bug: skia:11372
Change-Id: I7cc94015d93fcb0365b6aa35daa1f9ea2facdd16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377836
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
... like we do SkRuntimeEffect.
Change-Id: I024f1716b2f818d24b002213c02fa83d2b271123
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377757
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>
This will be used in the Make functions for BinaryExpression,
TernaryExpression and Function.
Change-Id: Ifde9ca83ab415a00c4712eaa43fd93c695b915cb
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377097
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
The binary and ternary operators need this functionality, and it doesn't
actually have anything specific to do with IRGenerator.
Change-Id: I89a3b0da335ff1fd0b029730934dc1f58c93dd85
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377096
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
d24398b3e3..a6d4623970
2021-02-28 cnorthrop@google.com Capture/Replay: Support CaptureGetQueryObject
2021-02-28 ynovikov@chromium.org Fix Ozone backend build flags.
2021-02-27 ynovikov@chromium.org Add EGL_WINDOW_BIT to all Ozone configs' EGL_SURFACE_TYPE
2021-02-27 m.maiya@samsung.com Vulkan: Avoid using assign with BitSets
2021-02-26 shrekshao@google.com Reland "Workaround for Mac Intel drawArraysInstanced with first > 0"
2021-02-26 syoussefi@chromium.org Vulkan: Move SPIR-V validation function to common/
2021-02-26 m.maiya@samsung.com Vulkan: Check texture type before calling into feedbackloop check
2021-02-26 m.maiya@samsung.com Vulkan: No need to unmap buffer when adding to mInFlightBuffers
2021-02-26 stha09@googlemail.com GCC: add missing static constexpr member definition
2021-02-26 senorblanco@chromium.org Check that pixel store params are 0 for fastUnpack path on D3D.
2021-02-26 cnorthrop@google.com Capture/Replay: Add CubeMapArray support
2021-02-26 ynovikov@chromium.org Skip 3 SimpleStateChangeTestES31
2021-02-26 lubosz.sarnecki@collabora.com gles_ext_params: Implement CaptureGetTexLevelParameterivANGLE.
2021-02-26 ddavenport@google.com Query revision id for GPU devices
2021-02-26 lubosz.sarnecki@collabora.com gl_angle_ext: Add param groups to glGetTexLevelParameterivANGLE.
2021-02-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 55434360b05d to 3ca55e802f5b (6 revisions)
2021-02-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 22186f076bf3 to 349abccec8f7 (6 revisions)
2021-02-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from b90646417bd3 to 61aec087e2f8 (994 revisions)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC stani@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: stani@google.com
Test: Test: Fortnite MECTest: Test: Recapture Lego Legacy: Heroes Unboxed
Change-Id: I81a1b50b39c40f8247873b92991b31e56d67fe48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377663
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This is a reland of ef7a28e26a
This time, no destructor for the mutex.
Original change's description:
> centralize runtime effect caching
>
> Relative runtimes for creating luma color filter:
>
> - cached SkColorFilter --> 1x
> - cached SkRuntimeEffect --> 12x
> - no caching --> 186x
> - this CL --> 24x
>
> Added insert_or_update() to SkLRUCache because
> I keep falling into this trap using insert()...
>
> Change-Id: Ic3dad32d38fc001701d8e1ad5662ad382503418f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376776
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I4a8612510d8a6961569698ead183b399e0c7c899
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377236
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
The automatic copy and move constructors and such are not appropriate
for this type. It could be refactored to be movable but not copyable,
but as written it's neither.
Change-Id: I398a1f91238530c7a6ae2aaf3e7e8455691655fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377536
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I keep forgetting that insert() breaks if there's
an existing item with that key, so assert there's
not and factor out a safer insert_or_update().
Change-Id: I5d7e3b163d651442d309b7486f8d21e64497a6a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377537
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 202420e014.
Reason for revert: MSVC build failures
Original change's description:
> Reland "Remove GrProgramDesc::KeyHeader structure"
>
> This is a reland of 4bcd58afbf
>
> Original change's description:
> > Remove GrProgramDesc::KeyHeader structure
> >
> > Instead, just fold all of this information into the key, like everything
> > else. The only value that was accessed elsewhere is the initial key
> > length. That doesn't need to be part of the key, so store it separately
> > in the GrProgramDesc.
> >
> > Removing this special case logic is just the first step in revising how
> > we assemble keys.
> >
> > Bug: skia:11372
> > Change-Id: I52eb76812045e1906797cb37e809cfd0b3332ef0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376797
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
>
> Bug: skia:11372
> Change-Id: I2cdb49aee3537e54dad9af1f9b47cf1aed1aca21
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376849
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
Change-Id: I0f4a76fa5d38d516554eed642eb9ab5f3222d9f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11372
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377231
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is a reland of 4bcd58afbf
Original change's description:
> Remove GrProgramDesc::KeyHeader structure
>
> Instead, just fold all of this information into the key, like everything
> else. The only value that was accessed elsewhere is the initial key
> length. That doesn't need to be part of the key, so store it separately
> in the GrProgramDesc.
>
> Removing this special case logic is just the first step in revising how
> we assemble keys.
>
> Bug: skia:11372
> Change-Id: I52eb76812045e1906797cb37e809cfd0b3332ef0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376797
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:11372
Change-Id: I2cdb49aee3537e54dad9af1f9b47cf1aed1aca21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376849
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
* Adds GrMtlPipelineStateBuilder::PrecompileShaders.
* Adds GrMtlPrecompileShaderLibrary.
* Stores metadata with SkSL shaders so we can convert to MSL properly
Change-Id: Id2c23a54cc04ca3b61a639c1cbc7234b697c41ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376856
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
We have no optimizations on postfix-expressions at all so this is a very
straightforward cut-and-paste.
Change-Id: I73b3bc73ad833e668306301e6d6859e44230393a
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376846
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Surprisingly, this actually improved our error detection slightly.
The expression `- -half4(0)` can now be simplified to `half4(0)` at
IR generation time, which allows the constant-folder to detect a
constant zero (and from there, a division by constant zero).
Change-Id: I8c4f6ab522efab5bf98913f9c6a1487b7af39a99
Bug: skia:11342, skia:11343
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376842
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Fundamentally this function wasn't a generic "set the refKind on an
expression" at all; it was intended specifically as "this expression
must be IsAssignable and contain a VariableReference." Also, it needs
nothing at all from the IRGenerator. Moving it out is important because
it will be used by Make functions for things like VariableReference.
Change-Id: I52d613989cd5fb0feb2e98ae454943cdacb9404b
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376841
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 4bcd58afbf.
Reason for revert: Possible issue with copying/assignment
Original change's description:
> Remove GrProgramDesc::KeyHeader structure
>
> Instead, just fold all of this information into the key, like everything
> else. The only value that was accessed elsewhere is the initial key
> length. That doesn't need to be part of the key, so store it separately
> in the GrProgramDesc.
>
> Removing this special case logic is just the first step in revising how
> we assemble keys.
>
> Bug: skia:11372
> Change-Id: I52eb76812045e1906797cb37e809cfd0b3332ef0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376797
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
Change-Id: I58b39a173abc45cd4932fd758fa005d1f727a0d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11372
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376848
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Instead, just fold all of this information into the key, like everything
else. The only value that was accessed elsewhere is the initial key
length. That doesn't need to be part of the key, so store it separately
in the GrProgramDesc.
Removing this special case logic is just the first step in revising how
we assemble keys.
Bug: skia:11372
Change-Id: I52eb76812045e1906797cb37e809cfd0b3332ef0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376797
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Relative runtimes for creating luma color filter:
- cached SkColorFilter --> 1x
- cached SkRuntimeEffect --> 12x
- no caching --> 186x
- this CL --> 24x
Added insert_or_update() to SkLRUCache because
I keep falling into this trap using insert()...
Change-Id: Ic3dad32d38fc001701d8e1ad5662ad382503418f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376776
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Just refactoring code that predates SkColorInfo.
Change-Id: Iba5ffdf91e2e2517bf55ea8c5a36c4fe6583a6b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376760
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
For now, just use this to prevent *any* layout qualifiers from appearing
on functions, or their parameters.
Bug: skia:11301
Change-Id: I05d8118c7121048c6ef49695a54e3714a8f8687e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376796
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This adds Analysis::IsConstantExpression, to determine if an expression
is a constant-expression. It now expands to cover 'const' local and
global variables, because we also enforce that the initializer on those
variables is - in turn - a constant expression.
This fixes 10837 - previously you could initialize a const variable with
a non-constant expression, and we'd emit GLSL that contained that same
pattern, which would fail to compile at the driver level. That should
not be possible any longer.
Bug: skia:10679
Bug: skia:10837
Change-Id: I517820ef4da57fff45768c0b04c55aebc18d3272
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375856
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The expression `~123` was making a PrefixExpression of type $intLiteral.
It should be converted to type `int` when the ~ prefix is applied.
This change also changes the output from oss-fuzz:27614. Both programs
are essentially nonsense expressions with no real behavior, so this is
fine.
Change-Id: I586be149ce95136fabee72fdd3473814d54948cf
Bug: oss-fuzz:31410
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376620
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
We currently don't have any optimizations for do-statements so the
primary benefit is moving code out of IRGenerator.
Change-Id: Ibc4d1ecd87ebef572e742dfdb15821cf4ac0f047
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376179
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
A given object may be unique, but its owner may not be unique
and another thread may ref the object via the owner at any time.
This happens e.g. when sharing SkPictures between threads.
Bug: skia:10286
Change-Id: I51b5239338a81aaa4d67db05f01f2c7c24182096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376619
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
afaik Chrome only tiles in Y which should yield less threaded text blob contention
Change-Id: I9ff484ed2ce66428e2d7ca6188eba79cd99b1547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376608
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
While working on an unrelated fix, I noticed that Ossfuzz28904.sksl has
an expression which generates a constructor of $literal type: `-2 .L1`
This shouldn't ever happen, so the code is now fixed to avoid it. This
doesn't affect any of the output from our existing tests. (In that
oss-fuzz test, that literal constructor is immediately expanded out to
an ivec2 by the swizzle, at which point it loses its $literal status
anyway.)
Change-Id: I34d1b0ad9e7c25987119d3337f4bb9e7b8a5619c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376617
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This can be a useful debugging tool when working on skslc issues.
Change-Id: I838122828a704c9b959b0babda2909c182c66b55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376618
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
After having moved all other filter factory definitions into their
per-filter implementation files, all that remained was the
MatrixTransform factory, which is just moved into the
SkMatrixImageFilter CPP file.
Bug: skia:11230
Change-Id: Ifd7f3eb58ef1d05ed6d0aef0517ca9caa01436d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372121
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This allows for elimination expression-statements with no side effects
when they are first created, rather than later on in the control-flow
optimization pass.
Change-Id: I09ec8421a3af7fa37f98b0405657198c0a24f2ac
Bug: skia:11342, skia:11319
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376136
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
No point holding two copies of our data, an SkBitmap and fStorage array.
The GPU backend wants a bitmap, so make the CPU backend work from that.
Updating the flattened format removed the last use of SkPackBits.
Change-Id: I97f75ebe9324ec5eed37dfe6282e10d0fe08711f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376599
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Don't create the bitmap in a lazy, thread-unsafe way.
Create it in a proactive, thread-safe way.
There's still opportunity to dedup the data between
fStorage and fBitmap that I'll follow up on next.
Change-Id: I1a71fbc560c84ff1e9e6b8c05673e461417a5b58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376598
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>