Commit Graph

56324 Commits

Author SHA1 Message Date
Brian Osman
0074706b80 Fix SkOpts::hash_fn slightly
We were folding together a string of 4 byte values as 8 byte values,
causing us to CRC in quite a few zeros. This appears to really poison
the algorithm, resulting in frequent hash collisions.

Change-Id: I1e363088d821d2fc0bbc392b78d1e24690fdc70a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432938
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-07-26 18:08:56 +00:00
Ethan Nicholas
2df03e64bf Removed name string field from SkSLType
This field wasn't really necessary, and was just bloating Type and
causing a lot of extra String creation. This one change reduces the
size of a new Compiler by ~2.4KB.

Change-Id: Ie90c565d669d2caaa61056015ea2119fe61c1844
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423298
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-07-26 18:03:12 +00:00
Brian Osman
940517cc1e Only enlarge bounds for color filters that affect transparent black
Change-Id: I695ee063d700bea1956290d12ddfa7e0792ff894
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432258
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-26 17:27:46 +00:00
Ben Wagner
53813ff67c Remove unused ICU include from SkShaper_harfbuzz
SkShaper_harfbuzz should be relying solely on the icu module for
icu like things, and this include is no longer used.

Change-Id: I7b247d9de30646c0002ed8380a96b9a86d84baf7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432998
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2021-07-26 17:24:09 +00:00
Peter Kasting
a3eaeb4fd8 Fix an instance of -Wunused-but-set-variable.
Bug: chromium:1203071
Change-Id: I1cdd65c735dcc30a50cf4cdd4a63b309d3bc5a90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432738
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-07-26 16:53:09 +00:00
Ben Wagner
c4de11b6d7 Don't build hb-icu
Since "Build HarfBuzz without ICU support" e07555f6aa, HarfBuzz in Skia
has not been using ICU. However, hb-icu support files are still being
built. Remove them from the build.

Change-Id: Ib8dcf8a2139255ee1a1019197c38414305ca082e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432997
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-07-26 16:51:44 +00:00
Jorge Betancourt
0b94acc132 [androidkit] initial upload of SkottieView util
Change-Id: I6f83ee6947121bef8a0c5b76b7a96ad85f24bd36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430018
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-07-26 15:47:10 +00:00
John Stiles
6926ba4d3c Fix variable name shadowing issue.
Some runtime effect `onProgram` calls were using the name `dst` both as
the name of the destination color inside the sampleBlender lambda, and
as the name of the SkColorInfo for the destination surface.

The SkColorInfo has been renamed to `colorInfo` to disambiguate the two.

Change-Id: Ia85be8b53cb37eebbf4cbaa2b33ad36e8b6a7856
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432896
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>
2021-07-26 15:39:12 +00:00
Jim Van Verth
6a54042bcd Add GrMtlRenderPipeline.
Creates a wrapper class just for id<MTLRenderPipelineState> so it can
be managed as a command buffer object.

Bug: skia:12253
Change-Id: Ibef833fda25d00e7b3110c17b59c5e760b523473
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431040
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-07-26 15:11:41 +00:00
Robert Phillips
04f22eacaa Feed all top-level GPU accessors through skgpu::BaseDevice (take 2)
This pulls the GPU-specific accessors off of SkCanvas and SkDevice - moving them all to skgpu::BaseDevice and SkCanvasPriv.

This will allow us to more easily change the gpu class hierarchy (esp. changing GrSurfaceDrawContext to skgpu::v1:SurfaceDrawContext) w/o churning the public API.

TBR=brianosman@google.com
Bug: skia:11837
Change-Id: Ib69a3ea27c840fa7758bc3318395a27228c7ae9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431539
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-26 14:56:37 +00:00
Kevin Lubick
4765fd0eb7 [infra] Remove failing InfraTests_Win job
And fix a Python typo

Change-Id: I2e63c16865ec44cf1506ea9392155b2b687042b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432776
Reviewed-by: Eric Boren <borenet@google.com>
2021-07-26 14:49:36 +00:00
Dominik Röttsches
613ca2b916 Fix PaintScale and add testing
Define separate GMs for scaling and gradient repeat modes. Migrate more
test glyphs to script generated test font from [1].

Follow-up to [2] and [3].

[1] https://github.com/googlefonts/color-fonts
[2] https://skia-review.googlesource.com/c/skia/+/424096
[3] https://skia-review.googlesource.com/c/skia/+/423396

Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Release-All-Android_NativeFonts
Change-Id: Ie4ac33967333e6218526889c4d762c5cc378e0d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431956
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-07-26 14:38:59 +00:00
John Stiles
d3b232e99b Implement SkBlendModeBlender::asFragmentProcessor.
The GrBlendFragmentProcessor already does everything right here,
including setting the correct optimization flags, so we can just
leverage the existing implementation as-is.

Change-Id: Iac6b2678d49ab0ab4bed44bcf7bb2749d05bd388
Bug: skia:12257, skia:12205
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432796
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-07-26 13:42:50 +00:00
John Stiles
bb2ef92d05 Add private blender type to SkSL built-in types.
This type will hold blender objects, similar to color filters and
shaders. Since the implementation is not yet complete, the type is
currently named `$blender` to indicate that it's private/inaccessible.
The $ will be removed once sampling is functional.

Many places which were conditioned on "is a color filter or shader" are
now conditioned on a helper method instead; if we ever add another
runtime effect type in the future, there should be less hunting for
places that need to be fixed.

Change-Id: I207219abf8764906c3612ce8896492c7a2af6ea1
Bug: skia:12257
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432259
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-07-26 13:10:42 +00:00
skia-autoroll
c665e1ed6b Roll ANGLE from 9f7a86a80874 to a5b7655cb25a (25 revisions)
9f7a86a808..a5b7655cb2

2021-07-24 syoussefi@chromium.org Vulkan: Unsupress fixed test
2021-07-24 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fixes to tessellation builtins
2021-07-24 syoussefi@chromium.org Vulkan: SPIR-V Gen: Add missing DepthReplacing execution mode
2021-07-24 syoussefi@chromium.org Vulkan: SPIR-V Gen: Support OES_sample_variables
2021-07-24 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix switch with default at the end
2021-07-24 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix bugs with texture* builtins
2021-07-24 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix unpack* built-ins
2021-07-24 syoussefi@chromium.org Suppress failing SPIR-V gen tests
2021-07-24 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fixes to scalar->vector promotion
2021-07-24 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix lvalues passed to in/inout parameters
2021-07-23 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix textureProj's coordinate adjustment
2021-07-23 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix conditionals with pruned blocks
2021-07-23 syoussefi@chromium.org Vulkan: Fix bresenham line emulation in shaders with return
2021-07-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 208fab302a17 to 172cae01c41b (609 revisions)
2021-07-23 syoussefi@chromium.org infra: Enable gles2 deqp tests with direct SPIR-V generation
2021-07-23 jmadill@chromium.org dEQP: Suppress two tests with undefined behaviour.
2021-07-23 syoussefi@chromium.org GL: Temporarily disable sync control on all GPUs on Linux
2021-07-23 timvp@google.com roll_aosp.sh: Add dcheck_always_on = false
2021-07-23 jmadill@chromium.org Roll Chromium DEPS manually.
2021-07-23 syoussefi@chromium.org Vulkan: SPIR-V Gen: Support dEQP
2021-07-23 sugoi@google.com Make Display and X11 available in the same build
2021-07-23 jmadill@chromium.org infra: Add perf results processing script.
2021-07-23 jmadill@chromium.org Make the trybot exclusion filter a proper regex.
2021-07-23 jmadill@chromium.org Update angle_assert_always_on condition.
2021-07-23 jmadill@chromium.org Set dcheck_always_on on every ANGLE builder.

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 kjlubick@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: kjlubick@google.com
Test: Test: led launch
Change-Id: I599724abdd8aae8553254ece4028f3ad067d561a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432676
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-26 05:23:42 +00:00
Mike Reed
8933de7bd0 Add test for our behavior in canvas destructor
The sited bug questions what we should do in our destructor...
flush the pending saveLayers, or ignore them?

The current behavior is to flush them (i.e. draw them), so that is
the expected value... for now.

Bug: skia:12267
Change-Id: I46eaed3efdc953cfe95c3e4c72d51a935c23315f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432616
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-07-25 19:59:42 +00:00
skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com
d5a9701116 Update SKP version
Automatic commit by the RecreateSKPs bot.

Change-Id: I3ecf3f8d212d3a7924342f74ed68b87b48d81bff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432576
Reviewed-by: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2021-07-25 08:51:43 +00:00
skia-autoroll
09d6474496 Roll SK Tool from 2a177d9064b9 to 74c0e4d78b6b
https://skia.googlesource.com/buildbot.git/+log/2a177d9064b9..74c0e4d78b6b

2021-07-25 skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com Update CIPD Packages

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
Please CC lovisolo@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

Tbr: lovisolo@google.com
Change-Id: I4f3b745f91b7f8d0774ba93e6a77d60130af4307
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432420
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-25 06:18:42 +00:00
Ravi Mistry
a4bfa8d77f Test SkCQ
Bug: skia:12242
Change-Id: Ia023bddf4fd52a879dac4d3f6dbd5034f0f2237e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432476
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-07-24 21:07:28 +00:00
Ben Wagner
c9f475784f Document SkMatrix default constructs to identity
SkMatrix has a constexpr default constructor which initializes to
identity. This allows it to be both efficient and always initialized.
However, the pre-C++11 documentation stating that SkMatrix starts off
uninitialized still exists. Update the documentation.

Change-Id: I4f81209ea82f0cef04ca9369ccfdf8e9f448ff71
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432257
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-07-24 16:04:39 +00:00
Brian Osman
9304aa5325 Revert "add op array32 for indirect uniform access"
This reverts commit ac2d053ccf.

Reason for revert: This has somehow impacted a bunch of the CPU SkSL tests: https://gold.skia.org/search?blame=ac2d053ccfe80775b8144c069bf1f8660a5e8f9a&corpus=gm

I didn't notice if the hash and/or instruction comparison functions were updated to accommodate the extra data. Might be relevant?

Original change's description:
> add op array32 for indirect uniform access
>
> Change-Id: I6249594a2348c7b24e4f057cce2f4e8a6a2c4409
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431676
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=herb@google.com,brianosman@google.com

Change-Id: Id5fc865b265d4c61a8d4fc853a6a0ecf7c2fb066
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432376
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-24 15:36:11 +00:00
recipe-roller
feb459a1fb Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools, recipe_engine) into this repository.

depot_tools:
11f53d6949
  11f53d6 (gavinmak@google.com)
      Reland "Add python3 support to bot_update recipe module"

recipe_engine:
c80e36cb1f~..7caff240ba2cdb9ec5b4fb01b6e966ff6df4af86
  c80e36c (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from af829a9aede7 to 9555d5a16a0b
  a3a7358 (yiwzhang@google.com)
      py3: upgrade parameterized to 0.8.1 and use new naming feature
  af0b32c (yiwzhang@google.com)
      py3: make run command py3 compatible and enable simple unittest...
  7caff24 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 2be056d01d3f to d5819a48e767

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: Ia8ae15f99f928bb16113686752b7b1d5a61fd580
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432100
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>
2021-07-24 00:22:29 +00:00
skia-autoroll
c06c7f951e Roll SK Tool from dd15582d666b to aa67e619f153
https://skia.googlesource.com/buildbot.git/+log/dd15582d666b..aa67e619f153

2021-07-23 borenet@google.com [task scheduler] chmod before deleting TempCheckout

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
Please CC lovisolo@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

Tbr: lovisolo@google.com
Change-Id: I1ea9104aca450c9049ed3764853154ed6474958d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432116
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-24 00:16:08 +00:00
Ravi Mistry
c53a73a09e Add SkCQ config for main branch
Bug: skia:12242
Change-Id: I0122a93c7e2df3aa308f696827fb1a48a047fa22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432021
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-07-24 00:03:28 +00:00
Brian Osman
7da0657fda Explicitly detect static recursion in SkSL
This relaxes our rules to allow calls to declared (but not yet defined)
functions. With that rule change, we have to specifically detect static
recursion and produce an error.

Bug: skia:12137
Change-Id: I39cc281fcd73fb30014bc7b43043552623727e03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431537
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-24 00:01:15 +00:00
Brian Osman
d32ff90135 Fix bug with order-of-matrices in updatable drawVertices path
Change-Id: I2bfadbc281682d83ff1169767ef2693ee1fc1005
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432158
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-23 23:59:38 +00:00
Mike Reed
40bc6576d4 If we have no textures, suppress the shader
This lets us measure just the colors code-path, since the drawing code
will still respect the shader with no tex-coords, but that isn't really
and interesting case for timing.

Change-Id: If6b7d1465d625a3c311639aa8fdf731f46ade0ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432157
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-07-23 23:59:08 +00:00
Chris Dalton
c3176002bc Lift the tessellation atlas into its own path renderer
Creates a new path renderer, GrAtlasPathRenderer, that handles all the
atlasing. Managing the atlas in its own path renderer gives us more
control over when atlasing happens in the chain, will allow us to more
easily use the atlas in kCoverage mode, and makes the clipping code
cleaner.

Bug: skia:12258
Change-Id: Ie0b669974936c23895c8ab794e2d97206ed140f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431896
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-07-23 23:02:58 +00:00
John Stiles
2955c26908 Add new SampleBlender callback to SkVMCodeGenerator.
This CL doesn't actually allow the callbacks to be invoked from SkSL
yet, but the callbacks now exist and are now threaded through the
various callsites which will need them.

Change-Id: I00f43ff94de9da8d93daf2e59885eea6f87c2e3e
Bug: skia:12257
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431696
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-07-23 21:05:10 +00:00
John Stiles
d9a56b9227 Remove color argument from sampleShader.
Passing a color to a shader isn't supported in SkSL anymore.

Change-Id: Ic2743e519b69fa8add4c010166032b4dab2152a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431938
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-07-23 21:04:08 +00:00
John Stiles
8050a4b3ce Separate PipelineStage's sampleChild into two callbacks.
We now have `sampleShader` and `sampleColorFilter`. This CL prepares us
for the addition of a third sampleable type, SkBlender, with a unique
signature (two colors, no coordinates).

Change-Id: I77ba9ba94a1c447d0ef10f5acb5ffe9b9395cfe1
Bug: skia:12257
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431697
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-07-23 20:55:16 +00:00
Jim Van Verth
bef411b6db Metal: track GrSurfaces on command buffer.
* Adds tracking array and tracks specific uses
* Also tweaks resolve interface to allow for tracking.


Bug: skia:12253
Change-Id: I49f99fee8d939e47de2c054e031df4c848319f01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431456
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-07-23 20:33:42 +00:00
John Stiles
137482fc22 Separate SkVM's SampleChild into two callbacks.
Previously, one callback was used and the caller needed to infer from
the passed-in index what type of effect to invoke, and which arguments
were valid.

Now, each type of effect has a separate callback with a unique
signature. (In particular, SkColorFilters lack coordinates entirely.)
In a later CL, SkBlenders will also be supported, and those will have
a different signature again, as they take two colors and no coords.

Change-Id: Ibcb39c91c35256c5339e4d2790ed0c36e434f191
Bug: skia:12257
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431656
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-23 19:05:46 +00:00
Michael Ludwig
cfd204a785 Rename/simplify SkCanvas::resetClip() and make recordable
AndroidFramework uses both their own custom display list (which could
handle resetClip with android-side changes) AND conventional picture
recording. In order for replace op emulation to work when they have
been recorded into a picture, we need to make it virtual and supported
in SkPicture.

This also renames the API to ResetClip() from ReplaceClip() and does not
have any additional arguments. Based on AF's usage pattern, it only n
needs to reset the clip to the surface bounds or the device clip
restriction, it seems best to reduce the API as much as possible before
it's adopted.

Bug: skia:10209
Change-Id: I37adb097c84a642f4254b8c0f9d4c7fea8d9abdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430897
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-07-23 19:05:42 +00:00
Robert Phillips
cc6e50f041 Prevent CircleOp from being tested with MSAA
Change-Id: I307322f2d5e66ef103bdeb791066d6bba11b70ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431636
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-23 19:05:40 +00:00
Herb Derby
ac2d053ccf add op array32 for indirect uniform access
Change-Id: I6249594a2348c7b24e4f057cce2f4e8a6a2c4409
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431676
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-07-23 19:05:38 +00:00
skia-autoroll
4345e1ef42 Roll ANGLE from 0e1c90cf4f17 to 9f7a86a80874 (14 revisions)
0e1c90cf4f..9f7a86a808

2021-07-23 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix bugs with matrix ops
2021-07-23 syoussefi@chromium.org Vulkan: SPIR-V Gen: Support scalar constructors
2021-07-23 syoussefi@chromium.org Vulkan: SPIR-V Gen: Support tessellation shaders
2021-07-23 syoussefi@chromium.org Vulkan: SPIR-V Gen: Support geometry shaders
2021-07-22 timvp@google.com Cleanup license_text to remove missing license files
2021-07-22 timvp@google.com List all license files in Android.bp
2021-07-22 jmadill@chromium.org Add Chromium perf result processing script.
2021-07-22 sugoi@google.com Enable SwANGLE on all ozone platforms.
2021-07-22 cnorthrop@google.com Capture/Replay: Add textures to resource tracking
2021-07-22 jmadill@chromium.org Revert "EGL: GLES: Implement GL_EXT_protected_textures"
2021-07-22 jmadill@chromium.org Revert "Vulkan: Suppress VVL errors triggered by external formats"
2021-07-22 jmadill@chromium.org Test Runner: Remove extra quotes from histograms.
2021-07-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 436e27578f75 to d85297cbd31b (10 revisions)
2021-07-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from f8ef6fcfb849 to 208fab302a17 (1307 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 ethannicholas@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: ethannicholas@google.com
Test: Test: PUBG Mobile MEC
Test: Test: git clean -f -x -d -f ; m ANGLE -j50
Change-Id: I43f0f88e4c3265922c4b86eb1db2060b659070ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431836
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-23 19:05:28 +00:00
Mike Reed
6417cfc71e Add _bilerp variant to vertices bench
... only affects when textures are also present

Change-Id: I82847c68380b6274583a48a96aef87ec1b353ada
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432156
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-07-23 19:00:19 +00:00
Brian Osman
64565aed51 Skip more flaky tests in the mtltestprecompile config
Change-Id: I24f6e6570339cb071cb1a4faf916bd549835ec8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431936
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-23 18:21:15 +00:00
Mike Reed
d068e4154c Pass separate texs so we don't cheat in drawVerts
Cheat == take a faster path that is not normally used by real clients.
This way the bench is more representative.

Change-Id: I37644ae5d05a00f217773dddba290eac9a2a846f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431939
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-07-23 17:27:46 +00:00
Mike Reed
0e2fb66a50 Add flag to force high-precision RP
Change-Id: I9388458ae186f7b2a8b8534859147b9a1035276f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432016
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-07-23 16:22:23 +00:00
Chris Dalton
8854829351 Reland "Prefer the NV_framebuffer_blit extension over ANGLE"
This is a reland of 202ce887ec

Original change's description:
> Prefer the NV_framebuffer_blit extension over ANGLE
>
> The ANGLE/CHROMIUM glBlitFramebuffer requires full size blits, which
> is really bad for DMSAA. The NV extension does allow blits of
> sub-rectangles, so we prefer that one if it's available.
>
> Bug: skia:12176
> Bug: skia:12177
> Bug: skia:12234
> Bug: skia:12235
> Change-Id: I463ac631fff64ad564f294cf2f26be7410e8c356
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430576
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Bug: skia:12176
Bug: skia:12177
Bug: skia:12234
Bug: skia:12235
Change-Id: I41d062f9894f5a81c78a37de27a288bc17812643
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431817
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-07-23 16:20:36 +00:00
Kevin Lubick
747c321922 [infra] Update cmake docker image to be Debian 10
Bug: skia:12256
Change-Id: Ic5cad6d6e5e7155f0adc26fca9f1172f33ce3b3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431260
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-07-23 11:21:31 +00:00
Joe Gregorio
6940cff9c3 Revert "Roll recipe dependencies (nontrivial)."
This reverts commit 14037fff49.

Reason for revert: Is possibly killing Android bots.

Original change's description:
> Roll recipe dependencies (nontrivial).
>
> This is an automated CL created by the recipe roller. This CL rolls
> recipe changes from upstream projects (depot_tools) into this repository.
>
> Please review the expectation changes, and LGTM+CQ.
>
> depot_tools:
> 11f53d6949
>   11f53d6 (gavinmak@google.com)
>       Reland "Add python3 support to bot_update recipe module"
>
> More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
>
> R=​rmistry@google.com
>
> Recipe-Tryjob-Bypass-Reason: Autoroller
> Bugdroid-Send-Email: False
> Change-Id: Ia84a87aa1905e59b1618fe79a8abc1e61fc4cc30
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430957
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>

TBR=borenet@google.com,rmistry@google.com,recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com

Change-Id: I14e915b104a87bf3580fe2276b0bb8c124510564
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431699
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-07-23 00:09:40 +00:00
Joe Gregorio
795b5f133d Revert "Roll recipe dependencies (trivial)."
This reverts commit 7059704767.

Reason for revert: Is possibly killing Android bots.

Original change's description:
> Roll recipe dependencies (trivial).
>
> 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:
> c80e36cb1f~..af0b32cd5e64a71d3357047ba149a3e3c00445e1
>   c80e36c (chromium-autoroll@skia-public.iam.gserviceaccount.com)
>       Roll CAS Client from af829a9aede7 to 9555d5a16a0b
>   a3a7358 (yiwzhang@google.com)
>       py3: upgrade parameterized to 0.8.1 and use new naming feature
>   af0b32c (yiwzhang@google.com)
>       py3: make run command py3 compatible and enable simple unittest...
>
> 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: Ia07af3941712bd422fc6d99b0dda42d55ec12d64
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431258
> 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>

TBR=borenet@google.com,recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com

Change-Id: I7409a231510cbb3e10cacc0460bb6a269e80037f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431698
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-07-23 00:09:08 +00:00
John Stiles
8a166f3bc7 Factor out shared code for SkVM uniform setup.
Change-Id: If885973683191048bc93e62b9e64a021f330cb4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431497
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>
2021-07-22 19:26:30 +00:00
Robert Phillips
d91d2341b9 Revert "Feed all top-level GPU accessors through skgpu::BaseDevice"
This reverts commit 5de8b19504.

Reason for revert: blocking Android roll

Original change's description:
> Feed all top-level GPU accessors through skgpu::BaseDevice
>
> This pulls the GPU-specific accessors off of SkCanvas and SkDevice - moving them all to skgpu::BaseDevice and SkCanvasPriv.
>
> This will allow us to more easily change the gpu class hierarchy (esp. changing GrSurfaceDrawContext to skgpu::v1:SurfaceDrawContext) w/o churning the public API.
>
> Bug: skia:11837
> Change-Id: I4e205255706680ac58ffe40f714884c2ee7ac799
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431036
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,brianosman@google.com,michaelludwig@google.com

Change-Id: I8a015be4edbe21d63db09d5593af13cc89df4217
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431538
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-22 18:56:51 +00:00
Kevin Lubick
ad858e76e3 [canvaskit] Fix gm compilation
This removes some files that were deleted in early July 2021

Change-Id: I3a79a0d58eea16b4e14a548261f1279497860275
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431259
Reviewed-by: Brian Osman <brianosman@google.com>
2021-07-22 16:57:32 +00:00
Robert Phillips
5de8b19504 Feed all top-level GPU accessors through skgpu::BaseDevice
This pulls the GPU-specific accessors off of SkCanvas and SkDevice - moving them all to skgpu::BaseDevice and SkCanvasPriv.

This will allow us to more easily change the gpu class hierarchy (esp. changing GrSurfaceDrawContext to skgpu::v1:SurfaceDrawContext) w/o churning the public API.

Bug: skia:11837
Change-Id: I4e205255706680ac58ffe40f714884c2ee7ac799
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431036
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-22 16:47:30 +00:00
Kevin Lubick
391429f78b [canvaskit] Expose AsWinding
Bug: skia:11858
Change-Id: Iedbc2333779f2fac5029779bae44da48d8dd7b8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430956
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-07-22 16:36:33 +00:00