... to aid in removing special ArithmeticImageFilter.
Can we use something like this to reimpl the ArithmeticImageFilter
--> BlenderImageFilter?
I see some special checking in filterBounds for ArithIF -- is that
required? Is that generalizable for any BlenderImageFilter?
If we can generalize blend[er]imagefilter, let's just move this
logic into Chrome -- no need for Arithmetic to appear in Skia
in any form!
Re: https://skia-review.googlesource.com/c/skia/+/424436
Change-Id: Ifa0ff2fa25de6385f6f60505e73ecc28463a80b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424417
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Change-Id: Id2061ebe7873aa8b9480a2d8b0133c2fb79e79bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424098
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I4066aafc5b6137bfaf38100ff237fd9833023f34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424097
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Most uses can just use kComposeOne because the input colors to the
children are not used. However, SkShaders::Blend() cannot. Lift the
compose-two behavior to a new helper,
GrFragmentProcessor::MakeInputOpaqueAndPostApplyAlpha, and use that
in SkShaders::Blend().
Bug: skia:10457
Change-Id: I8ce8a26db41e6a9d7dc28e236290827233a3d07b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425459
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
If there are no color or texture changes between triangles,
then us SkVM to draw the triangles.
Change-Id: I2b1af743b36c681db23045c9f398c305894ead91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425020
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Most callsites pass a texture effect (which ignores its input) and
nullptr and so work as is with the new interpretation of kComposeOne.
The two callsites that don't are updated to wrap their input FP in
OverrideInput(WHITE).
Bug: skia:10457
Change-Id: Idb7a0a6e9de5a25eb0c2ad1e7ade214efdba9754
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425458
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I28eb4479476a531a7b45fbef0ce9da72a4d29dc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423997
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is a reland of 1b0a95e0ee
Original change's description:
> Omit inner join geometry when possible
>
> There is some relatively cheap math we can do to determine easy cases
> when the inner join geometry can be skipped. This CL is not
> comprehensive in that there may be other cases where we can skip the
> geometry.
>
> Only handling miter joins in this CL - the other join types can likely
> have similar logic, but will require a bit more computation to compute
> the inner (reflected) miter point.
>
> Misc notes:
> - Added SK_LEGACY_INNER_JOINS ifdef in the event that clients depend on
> the old behavior.
> - Modified stroker to track "previous previous" point, which is the
> start point of the previous line segment.
>
> Bug: b/165379671, skia:11964
> Change-Id: I56789e85a2b4627c32f2a30fe60e47d448e9adf3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404717
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>
Bug: b/165379671, skia:11964
Change-Id: If8bf183db9379d0a98a6f88e70f871a559692a60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423821
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Always explicitly pass one of the other behaviors.
Bug: skia:10457
Change-Id: I573161b3de0476a398d71fcaab71e2d68fa13d02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425457
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
b6748d03b4
b6748d0 (tikuta@chromium.org)
isolated: remove archive functions
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
R=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ia045cfc26baa9fa0c4db11ae2fd6b87c705eb0cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425600
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
4c0a3b635a
4c0a3b6 (tikuta@chromium.org)
isolated: remove download function
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
R=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ib27cc8cfe45126fc2c2f87098b577494e38fb72d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425558
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
51937ab386..4964513a25
2021-07-08 gert.wollny@collabora.com ANGLETest: When on WebGL compatibility then use index buffers
2021-07-07 gert.wollny@collabora.com Capture/Replay: Enable passing tests, disable flaky
2021-07-07 gert.wollny@collabora.com Capture/Replay: capture param of glGetQueryiv
2021-07-07 gert.wollny@collabora.com tests: Skip WebGL/EnableProgramBinaryExtension with no formats
2021-07-07 gert.wollny@collabora.com Capture/Replay: don't capture DrawElements with count zero
2021-07-07 vantablack@google.com Fix undefined behavior associated with Runescape Mobile
2021-07-07 geofflang@chromium.org GL: Use glClear for robust init on Android.
2021-07-07 ynovikov@chromium.org Skip SamplerMetadataUpdateOnSetProgram on Mac Metal
2021-07-07 ggabu423@gmail.com D3D11: Fix incorrect bounds checking in Blit11
2021-07-07 sugoi@google.com Fix alpha setting of WebGL contexts with SwANGLE on MacOS
2021-07-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 6f1260556b10 to 3c89f07b349b (5 revisions)
2021-07-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 1d5cc5e25281 to 7c193479c917 (278 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 djsollen@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/main/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: djsollen@google.com
Change-Id: I263c36caa4147ce195c4712a373feb69c34a3ebf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425536
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
recipe_engine:
b02a4ebd42
b02a4eb (iannucci@chromium.org)
Fix debug sleep on non-darwin.
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
R=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I596172c48871343c02abc9706a0bd3aeb2771f17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425500
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Add full compliment of operator*, have them assert in debug,
but not throw in release as per c++ spec.
Add full compliment of value() have them crash if there is
no value as per the c++ spec.
Add value_or.
Add test for value_or.
Change-Id: Ib0d9a01fba367768e66d00fbc61b471397e8582c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425476
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools) into this repository.
depot_tools:
ac6f623a29
ac6f623 (jmadill@chromium.org)
git cl: Ensure update before checking if "full" format.
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
R=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Icd7000b2d3ca921cb4bcc42d3d982acf569c68ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425381
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
... since it mysteriously returns something even if the blender doesn't
map to any enum. Clients should use asBlendMode() or getBlendMode_or().
Change-Id: I5dc5aea51f47f297ef9b2a89535d47ac58aea9bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425177
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This reverts commit 1c467774e5.
Change-Id: Iad409002ddd71f0c26117e5a0814bf021fba8178
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425186
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I7b033c891ee997f1ca022b73d6f78cc501c5cdc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424302
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
... to ease clients into the blender world. Will be used in subsequent
CLs to migrate skia and its clients.
Change-Id: I253b333dca65876b45c3d424f5d0456a09460e6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425356
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Original change's description:
> Metal: Add labels and debug groups to help with GPU Debugging.
>
> * Adds SK_ENABLE_MTL_DEBUG_INFO to enable labels and debug groups,
> dependent on skia_enable_gpu_debug_layers.
>
> Bug: skia:12150
> Change-Id: I5b4538c0f6df6ceed72d7e8e6f1952fd193b7b90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422756
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:12150
Change-Id: I4bc686b7fdb1b929dbfdb2dd12fb5170fc9b36a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425185
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Make it clear that texture data and the paint shader
work in tandem.
Change-Id: Ifdb66632516eb2301c003de52aa678e450c61cc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425018
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I2b6b3ec24e42859b811de0125276f1d33d5f5037
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425181
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Previously kScalar was doing double-duty and standing in for both scalar
and literal types. This breaks it out into a separate enum value.
Change-Id: Ic975eeba87fb430d9fe183e284107f6aaff9b244
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425180
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reland works around Adreno issue with this formulation of sk_Clockwise:
(sk_RTFlip.y < 0.0 ? !gl_FrontFacing : gl_FrontFacing)
and instead adds this to the top of the function:
bool sk_Clockwise = gl_FrontFacing;
if (sk_RTFlip.y < 0.0) {
sk_Clockwise = !sk_Clockwise;
}
Original description:
SkSL language features that are origin sensitive now use a uniform
to conditionally flip their result rather than generating different
code.
Previously we would insert a "rt height" uniform if sk_FragCoord needed
to be flipped. sk_FragCoord,y was implemented as "realFragCoord.y" or
"rtHeight - realFragCoord.y" depending on SkSL::ProgramSettings::fFlipY.
Now we instead use a two component vector rtFlip and sk_FragCoord.y is
always "rtFlip.x + rtFlip.y*realFragCoord.y". We configure rtFlip as
either (0, 1) or (rtHeight, -1). sk_Clockwise and dFdy simiarly use
rtFlip.y to emit code that always works with either origin.
Bug: skia:12037
Change-Id: I3a2ad6f5667eb4dcd823b939abd5698f89b58929
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425178
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is mainly to get GrTextureEffect.h out of this header. Its distribution keeps gumming up efforts to make more classes V1-only.
Bug: skia:11837
Change-Id: I6d5aae20bb20cfe3fb4d93c526efe8cf7e5e0c52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425017
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
3b0fcf6a91..51937ab386
2021-07-06 jmadill@chromium.org Re-land "Add SearchType to OpenSharedLibraryWithExtension."
2021-07-06 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fixes to std430 block definition
2021-07-06 tikuta@chromium.org infra/config: remove unused isolated property
2021-07-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 69deca60e70d to 6f1260556b10 (2 revisions)
2021-07-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 38c67803c283 to 1d5cc5e25281 (194 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 djsollen@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/main/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: djsollen@google.com
Change-Id: I090e0152e2de0ca4d3d966e43a6af05b4284612d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425098
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
There was some idea that we'd substitute the paint color for the missing
input shader. However, the implementation (CPU) would also apply
the paint's alpha after the blend shader, meaning the alpha was used
twice.
If a caller wants to blend a shader against a constant color there are
already at least two ways:
1) SkColorFilters::Blend()
2) SkShaders::Blend() where one input is SkShaders::Color().
Rather than come up with a more rational implementation for CPU and
make GPU follow suit, just make this invalid input and return nullptr.
Change-Id: I99c3415707ec7dc8036709322727b7769ea85f21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425058
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This is the default location for nanobench and viewer to look for
mskp files.
Change-Id: Icd23382dcfa3ca4789b5d15a11aaed02f7d18eb7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425059
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 943108b0b2.
Reason for revert: clockwise GM bad on android.
Original change's description:
> Don't key progams/pipelines on origin.
>
> SkSL language features that are origin sensitive now use a uniform
> to conditionally flip their result rather than generating different
> code.
>
> Previously we would insert a "rt height" uniform if sk_FragCoord needed
> to be flipped. sk_FragCoord,y was implemented as "realFragCoord.y" or
> "rtHeight - realFragCoord.y" depending on SkSL::ProgramSettings::fFlipY.
>
> Now we instead use a two component vector rtFlip and sk_FragCoord.y is
> always "rtFlip.x + rtFlip.y*realFragCoord.y". We configure rtFlip as
> either (0, 1) or (rtHeight, -1). sk_Clockwise and dFdy simiarly use
> rtFlip.y to emit code that always works with either origin.
>
> Bug: skia:12037
>
> Change-Id: I7a09d0caac60a58d72b76645ff31bcabde4086b6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414796
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,ethannicholas@google.com
Change-Id: I91cc0d86be216f6c32e453a231de088c991be4b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12037
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425056
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
SkSL language features that are origin sensitive now use a uniform
to conditionally flip their result rather than generating different
code.
Previously we would insert a "rt height" uniform if sk_FragCoord needed
to be flipped. sk_FragCoord,y was implemented as "realFragCoord.y" or
"rtHeight - realFragCoord.y" depending on SkSL::ProgramSettings::fFlipY.
Now we instead use a two component vector rtFlip and sk_FragCoord.y is
always "rtFlip.x + rtFlip.y*realFragCoord.y". We configure rtFlip as
either (0, 1) or (rtHeight, -1). sk_Clockwise and dFdy simiarly use
rtFlip.y to emit code that always works with either origin.
Bug: skia:12037
Change-Id: I7a09d0caac60a58d72b76645ff31bcabde4086b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414796
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This frees the SkBlenders names for optional effects, and better
reflects the fact that the "core" relies on this Mode() factory.
... and makes this clearer:
https://skia-review.googlesource.com/c/skia/+/424417
Maybe this isn't important. I see SkShaders is in core header, but
SkImageFilters is in effects, so I guess we don't have a consistent
notion for this naming yet. What I do think is semi-important is
that core headers include effects that core uses, so in this case
a Mode() factory does make sense to be in a core header, just have to
decide/bikeshed how to scope it.
Change-Id: I94da47cfaa6c1ea22894bf66a48604d3722b4062
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424416
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>