Commit Graph

61150 Commits

Author SHA1 Message Date
Herb Derby
cdf338247b Update SkSpan docs and check for bad initializer_list
Change-Id: I539ecd32ecb61d4be6b89c52065f55269937aa32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553580
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-27 21:26:45 +00:00
Florin Malita
fe354d0963 Enable inline/datauri image support for SkottieView
Change-Id: Ic22d65bcaf1ac8ef8d9a6dbd64281cdc6b0f0df8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553540
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-27 19:54:24 +00:00
Michael Ludwig
9d10f64104 Manual dawn roll
Change-Id: Id6efc88e2d048ade8aa2c0e7870c0bc73b1afcf5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553537
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
2022-06-27 19:09:52 +00:00
Kevin Lubick
2292a55e38 [bazel] Fix GCS mirror typo
Suffixes already have a . in the beginning. Two dots does not
leave us with a valid URL.

Change-Id: Ia232d1b68a78450da7883e659fa6871b562db20f
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553538
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-27 17:55:34 +00:00
Robert Phillips
36d67f462f [graphite] New Combination API
Bug: skia:13430
Change-Id: I816c57d0ed8694d21911c449d67c035580dd63d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548776
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-06-27 17:30:16 +00:00
Jim Van Verth
45a6f2c986 [graphite] Set up ContextOptions for text
Bug: skia:13118
Change-Id: I90aee8cff625ad822fa9d62f803a8badbe51925e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552676
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-06-27 16:57:43 +00:00
Dominik Röttsches
b17a4843ec Pass SkGraphcis::GetVariableColrV1Enabled() to FreeType
In [1] SkGraphics was changed to receive a flag callback from Blink if
variable COLRv1 is enabled. Pass this flag down to the corresponding
FreeType property in order to be able to continuously land changes in
FreeType for COLRv1 until shipping it.

Roll FreeType to current head, to include property addition to FreeType
in [2].

[1] https://skia-review.googlesource.com/c/skia/+/551637
[2] 4b6f92e6b3

Bug: skia:13448
Change-Id: I296ec5c5b4093cb1af0300de7d1eadcc8e740a36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553436
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Dominik Röttsches <drott@google.com>
2022-06-27 16:26:58 +00:00
Kevin Lubick
86678ed625 [bazel] Add option for SkSVGCanvas (and expat third_party DEP)
Our SVG code depends on our XML code which depends on expat.

See also cl/457481999

Change-Id: I83b61f5d73570d0aa7e851a01ccd019b4b1019e4
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553376
Reviewed-by: Florin Malita <fmalita@google.com>
2022-06-27 15:56:55 +00:00
John Stiles
a10e6c1025 Add SkShaderCodeDictionary::findOrCreateRuntimeEffectSnippet.
`findOrCreateRuntimeEffectSnippet` takes a pointer to the runtime effect
and returns a code-snippet ID associated with the runtime effect, with
matching uniform layout, etc. The SkShaderCodeDictionary will maintain a
persistent map from {sksl-hash, uniform set} to code-snippet ID.

http://go/runtime-effects-in-graphite

Change-Id: I9c51667aad96f850184899f3df00a8206a1fe354
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552686
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-27 15:27:46 +00:00
Herb Derby
3824e1db80 Create StrikeSpecs for measuring transformed masks
Change-Id: I6c6aed7de0747c4fea720fc4aa8b18ae6ad7327e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552685
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-27 14:54:09 +00:00
Herb Derby
740c4fc930 Find a maximum dimension give a list of SkGlyphIDs
In order to simplify buffer and strike handling eventually,
add a routine that will allow finding the maximum dimension of a
list of glyphs. In a future CL, I will use this to simplify
handling calculating the scale factor needed in the drawing of
last resort.

Change-Id: I8ac47328e1dfe59ea80499a83253bb166172a6b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552684
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2022-06-27 14:48:47 +00:00
Herb Derby
0fc023b05f Factor out common digest code for RemoteStrike
Change-Id: I9a27b52bb0d3f96d296d712fe36a727f8ad5ded4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552683
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-27 14:48:41 +00:00
Jim Van Verth
dd8090281a [graphite] Fix up token management for DrawAtlas.
Graphite only needs a single token to manage DrawAtlases, which is
incremented after DrawAtlas uploads are issued.

Bug: skia:13118
Change-Id: I0adbee2870bb30f65ac98adc43e17ff191bf224f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552681
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-06-27 14:39:08 +00:00
Jim Van Verth
a0ca6ed48f [graphite] Hook up SubRun::draw through Device.
Also removes usage of SkMatrixProvider.

Bug: skia:13118
Change-Id: I3f8a90b3de2d3adc5742c72095f33acf2e9080ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544246
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-06-27 14:25:47 +00:00
Kevin Lubick
cc91f7d709 [bazel] Fix toolchains on M1 Mac
These changes are necessary to use the toolchain on both the
M1 Mac and Intel Macs.

This adds a way to detect the host platform and choose different
compile options in the toolchain.

We cannot statically link in libc++.a from the clang zip because
it appears to be x64 only.

Finally, this fixes copts not being passed to objective c libraries.

Known issue:
 - Intel Mac building has an error about the default CC toolchain.

Change-Id: Ie8e5e83dc41513563ac684e70a8a6947b36df445
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552472
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-27 14:02:49 +00:00
skia-autoroll
1899c034f3 Roll vulkan-deps from 3da2aaf1f8a5 to 4e6188c82519 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/3da2aaf1f8a5..4e6188c82519

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC borenet@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: borenet@google.com
Change-Id: I50f73f1d28e4ad76afe9be6219235a225cca6c3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553277
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-27 13:50:45 +00:00
Kevin Lubick
aded74171a [bazel] Add placeholders in skcms
See also http://cl/457044136

Change-Id: I8d6fba210a86da95bb9d39d2d03ed80b2b0f120c
Bug: b/237076898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553017
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-06-27 13:05:12 +00:00
skia-autoroll
17c186a7b0 Roll ANGLE from 919763526922 to 89e38b5799cc (10 revisions)
9197635269..89e38b5799

2022-06-27 eddiehatfield@google.com Refactor to use ANGLETest vs ANGLETestWithParam
2022-06-25 djg@apple.com Metal: Maintain BufferPool freelist constraint
2022-06-24 eddiehatfield@google.com Miscellaneous C++17 refactoring
2022-06-24 m.maiya@samsung.com Vulkan: Support EGL_ANDROID_front_buffer_auto_refresh
2022-06-24 eddiehatfield@google.com Refactor builtin symbol generation for C++17
2022-06-24 yuxinhu@google.com Do not defer clear if FBO attachment is AHB image
2022-06-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1765af41ecf5 to 11ad77222bfe (3 revisions)
2022-06-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 19706bf6c7d2 to 7f32e27c6969 (707 revisions)
2022-06-24 syoussefi@chromium.org Translator: Fix validation of struct with same-name struct field
2022-06-24 syoussefi@chromium.org Vulkan: Don't close render pass on framebuffer fetch

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 borenet@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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: borenet@google.com
Change-Id: I5ae721ee2e40b860937aac1a0a8f8b9754f160c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553237
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-27 05:53:45 +00:00
skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com
3f9d5dc80a Update SKP version
Automatic commit by the RecreateSKPs bot.

Change-Id: I3b1154f8bf000571d908c5cc3942a6419f6057d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553176
Bot-Commit: 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>
2022-06-26 08:31:42 +00:00
skia-autoroll
d3d4f9c161 Roll vulkan-deps from 23c617d371cb to 3da2aaf1f8a5 (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/23c617d371cb..3da2aaf1f8a5

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools from 25b838f3a201 to 4643f73ec79d

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC ethannicholas@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: ethannicholas@google.com
Change-Id: Iccdd201dbfb7f31ca225979b7dd5318f291116c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553156
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-25 09:46:12 +00:00
skia-autoroll
57ce997fcc Roll vulkan-deps from 54dba77e8a94 to 23c617d371cb (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/54dba77e8a94..23c617d371cb

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from c4ed5157dc36 to 37d2396cabe5
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools from 6f57b1fa230f to 25b838f3a201

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC ethannicholas@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: ethannicholas@google.com
Change-Id: Ic95ddfd60ba83c45752bc5a528efaeb297e3e600
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552904
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-24 21:07:08 +00:00
John Stiles
7844cacdc7 Replace unordered_map with SkTHashMap.
unordered_map is much slower than SkTHashMap in practice, and it is
pretty straightforward in this case to replace.

Change-Id: I6d6bea6fa8c5c1ae6d23dfde05552db651975173
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553016
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-06-24 20:38:50 +00:00
Kevin Lubick
12e0869106 Pin canvaskit used in demos
The particles version is used only when we want to demo brand-new
APIs. These demos should be using stuff that has baked in
for a while.

No-Try: true
Change-Id: I3a6cb9d4f384fe43c4acaae32416820f47adb440
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553018
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Chris Mumford <cmumford@google.com>
Commit-Queue: Chris Mumford <cmumford@google.com>
2022-06-24 19:59:24 +00:00
John Stiles
76f32c939f Remove pointer sidecar data in PaintParamsKey.
Pointer data is obliterated when we assemble draw passes, so this
feature didn't work for its intended purpose.

Change-Id: I85331aa7b6212c55fe16081937465c2f38e5a103
Bug: skia:13428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552718
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-06-24 19:49:55 +00:00
Brian Salomon
b5ea90187c Add basic GrGpuBufferUpdateDataTest to test current functionality
Bug: skia:13427
Change-Id: I49b879dfd6f25a591144bd950cf00e15fa71dc01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551887
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-06-24 17:42:46 +00:00
Ethan Nicholas
a3983b64c3 Revert "Add removeUserDefinedSnippet method to ShaderCodeDictionary."
This reverts commit fc51827b56.

Reason for revert: Appears to have broken Mac (https://logs.chromium.org/logs/skia/5baefe22efa21e11/+/steps/dm/0/stdout)

Original change's description:
> Add removeUserDefinedSnippet method to ShaderCodeDictionary.
>
> We need to purge out user snippets when they are no longer needed, to
> avoid unbounded memory usage.
>
> Change-Id: Ib33909ec8c94cd6272f1a28e52a7ab92b27dfb0d
> Bug: skia:13405
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552577
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

Bug: skia:13405
Change-Id: I914eca4f017697fc4c82316b805ebaaa8c72e162
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552679
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-06-24 17:18:09 +00:00
Kevin Lubick
0222b540c5 [bazel] Make modules depend on //:skia_internal
Many of these happen to include private headers.

Change-Id: If416de1f30639d797406727dd18f350a85c744bb
Bug: skia:12541, b/237076898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552937
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-06-24 17:01:56 +00:00
Chris Mumford
27c8076a9e Reduce canvas size for sampling_types demo.
The default canvas size was so tall that the instructions to
drag an image on the canvas were easily missed because they
are likely scrolled off the bottom of the page. This change
does the following:

1. Reduce canvas size to minimum for the hard-coded image
   renderings.
2. Add a dashed gray border so that the user can more easily
   identify where to drag the image. If not dragged to the
   canvas then a new tab is opened (we don't want this).
3. Tweaked image drag instructions to reference "rectangle"
   (the canvas) instead of the page.

Bug: skia:13456
Change-Id: I4f5aeb2653702e1daa80fe30f6c037b98eb585e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551766
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Mumford <cmumford@google.com>
2022-06-24 16:30:50 +00:00
Chris Mumford
cdda3902be Fix up_scaling and image_sampling demos.
Bump CanvasKit version to latest (0.34.1) to fix incompatibilities with
current version of these demos.

The first code incompatibility with the previous CanvasKit (0.25.0)
was introduced in Change-Id I8cf958acf9214d0de903a4097647afd74f2a659e.

Bug: skia:13456
Change-Id: Idc8c9935698743b4478ff61b8c10d8385093527c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551762
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Mumford <cmumford@google.com>
2022-06-24 16:25:24 +00:00
Chris Mumford
62b0049ddb Fix demo texture file path.
The demo pages are deployed to https://demos.skia.org/demo (singular),
but locally live in a "demos" directory. The absolute path to the
test image worked, when run locally, but not when deployed.
Switching to a relative path fixes this.

Bug: skia:13456
Change-Id: Ia6b6d0bedacaade4ba6b96f702179910825e871e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551765
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Mumford <cmumford@google.com>
2022-06-24 15:31:06 +00:00
Kevin Lubick
2856e221ff Fix glyph tracing logging.
Change-Id: I8eabd165f490a5f069ec1bee797bfdd3d78d8168
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552936
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-06-24 15:23:44 +00:00
John Stiles
c623b7b6f1 Allow addUserDefinedSnippet to control the entire SkShaderSnippet.
This is needed so that runtime effects can control the uniforms,
callback function, etc.

Change-Id: I6f0876246d3eabf64b39422db07ca3df9bcd32bc
Bug: skia:13443
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551764
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-24 15:08:01 +00:00
John Stiles
1fc4f91220 Store the code-snippet ID as four bytes.
If we are going to create a new snippet ID every time a runtime effect
is created, we will need the code-snippet ID to support values larger
than a byte.

Change-Id: I49304a0bdaaba51fcf997968fb9c2840c5fb68ef
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551761
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-24 15:07:19 +00:00
Julia Lavrova
4341f6d1b8 Substituting \t with space if requested
Change-Id: I69c7ac2e600e3eaa05d5077720cefcaa5d434307
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551842
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-06-24 14:40:25 +00:00
John Stiles
fc51827b56 Add removeUserDefinedSnippet method to ShaderCodeDictionary.
We need to purge out user snippets when they are no longer needed, to
avoid unbounded memory usage.

Change-Id: Ib33909ec8c94cd6272f1a28e52a7ab92b27dfb0d
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552577
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-06-24 14:12:26 +00:00
Brian Salomon
84c8612f58 Actually enable buffer->buffer transfer cap on D3D
Functionality was added here:
https://skia-review.googlesource.com/c/skia/+/550707

Bug: skia:13427
Bug: skia:12720
Change-Id: I23af4df9a5ecce01a46192f013cd733869085757
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552677
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-06-24 14:05:55 +00:00
Brian Salomon
9cb93bf3f2 Stub out GrDawnGpu::onTransferFromBufferToBuffer
Bug: skia:13278
Bug: skia:12720
Change-Id: Ib17491b6dd8a232a2f62360953230daaebf0b08d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552678
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-06-24 13:51:50 +00:00
skia-autoroll
9e3ab88198 Roll vulkan-deps from 407b39af8477 to 54dba77e8a94 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/407b39af8477..54dba77e8a94

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 76fe352190d6 to c4ed5157dc36

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC ethannicholas@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: ethannicholas@google.com
Change-Id: Ie4075a92d977361411fb5fd9b4145cc01c69798e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552802
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-24 08:27:13 +00:00
skia-autoroll
b50fd9a7fd Roll ANGLE from 6d3c637052ef to 919763526922 (7 revisions)
6d3c637052..9197635269

2022-06-24 eddiehatfield@google.com Use C++17 attributes instead of custom macros
2022-06-23 cclao@google.com Vulkan: Destroy DescriptorSet cache when it becomes invalid
2022-06-23 b.schade@samsung.com Fix validation checks in glCompressedTexSubImage3D
2022-06-23 kbr@chromium.org Set pixel unpack state in GL backend's CompressedTexImage3D.
2022-06-23 fwang@igalia.com Fix compilation errors with deprecated sprintf function
2022-06-23 lehoangquyen@chromium.org Metal: Fix invalid iosurface texture after base/max lvl changed
2022-06-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 5cb6a639d494 to ec31f547750c (3 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 file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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: *CompressedTexture*Test*
Test: Test: *ETC2RGB8_CubeMapValidation*
Test: Test: KHR-GLES32.core.compressed_format.api.invalid_format_array
Test: Test: KHR-GLES32.core.compressed_format.api.invalid_offset_or_size
Change-Id: Ia4e016bceccbcaa2aa9921f53ff3f8d1260db03d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552797
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-24 05:52:49 +00:00
skia-autoroll
a6a270f0f5 Roll SwiftShader from 05b368b8e74a to ec31f547750c (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/05b368b8e74a..ec31f547750c

2022-06-23 sugoi@google.com Fix stale SPIRV_SHADER_DBG statements
2022-06-23 sugoi@google.com Fix warning on Linux

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC ethannicholas@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: ethannicholas@google.com
Change-Id: I161a1ee71b13d9e3ce05fae62409fc64a29b7919
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552798
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-24 04:52:46 +00:00
skia-autoroll
4345a2ea73 Roll Dawn from 606abfbeae83 to 6241cf9632b1 (5 revisions)
https://dawn.googlesource.com/dawn.git/+log/606abfbeae83..6241cf9632b1

2022-06-23 enga@chromium.org Change base directory for CTS runner, part 1
2022-06-23 enga@chromium.org Suppress running dawn_end2end_tests on Windows Intel Vulkan
2022-06-23 bclayton@google.com tint/resolver: Evaluate constant index accessors
2022-06-23 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 72f69e847033 to 6c8bb1f31ed4 (3 revisions)
2022-06-23 amaiorano@google.com tint: spir-v reader: fix atomicCompareExchangeWeak with var comparator

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC bajones@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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-Debug-Dawn
Bug: None
Tbr: bajones@google.com
Change-Id: If853d9a11a3e98dc8430b687684018c826412257
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552796
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-24 04:39:13 +00:00
skia-autoroll
bdd0205ae4 Roll vulkan-deps from 470172656108 to 407b39af8477 (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/470172656108..407b39af8477

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross from ba3e6ffe037e to e6925974d1ff

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC ethannicholas@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: ethannicholas@google.com
Change-Id: I5cc2d87ae0ef1d4acc4300cf90a9496bab0a4815
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552620
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-23 19:46:32 +00:00
Brian Salomon
9cf194f981 Implement GrGpu::transferFromBufferToBuffer on Vulkan
Bug: skia:13427
Bug: skia:12720
Change-Id: I91c2707bda1c3ed6a850627f9187cfc5b4b81517
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550706
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-06-23 19:26:16 +00:00
Kevin Lubick
e2d686d96d Add doc link for installing Xcode
Change-Id: Ib1973d57fab3c7a509955451c3d65bf1828991e1
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551889
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-06-23 17:02:00 +00:00
Zhou Shuangshuang
551f6185c9 Fall back dmsaa to default path on d3d11 backend
Currently fMSAAResolvesAutomatically would be enabled when the
system supports 'GL_EXT_multisampled_render_to_texture'. While
for d3d11 backend, this path with automatically resolving still
has some bugs[1] need to be fixed. We could make this path fall
back to the default path before that still uses two different
fbos. By doing this, we  could guarantee this dmsaa path is usable
for d3d11 backend in the functionality. Besides, some graphics
workloads could be benefited by the dmsaa fast path.

[1] https://bugs.chromium.org/p/angleproject/issues/detail?id=6030

Change-Id: I949024e7c3546f05af4eea45ef7959e9f1078b52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545616
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-06-23 15:20:38 +00:00
Brian Salomon
0fd7d8de83 Disable buffer to buffer transfers on WebGL.
Our implementation currently requires GrGLCaps::fTransferBufferType to
be set to something other than kNone for this to work. We haven't
enabled transfer surface/buffer transfers yet and so are not
setting this value. To do so we'd have to more thoroughly understand
the additional buffer restrictions in WebGL compared to GLES and it
isn't currently a priority.

Bug: skia:13461
Change-Id: I033b9d2c7a3116bdc95bcdbae1e4ac86c9f1b2c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551894
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-06-23 15:17:19 +00:00
Herb Derby
45313d1ce3 Replace SK_ARRAY_COUNT with std::size() for skia/modules
* Changed one static_assert to SkASSERT in RangeSelector.cpp:42

Change-Id: I12815a8817816261bb30f5412432109ed46826fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551892
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-23 15:15:21 +00:00
Herb Derby
9d5ba0ea41 Use std::nullopt instead of {} in SubRunContainer
Change-Id: I31ffecf0634b4f31751671f50e04ee7b2af5dbdb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551893
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-23 14:38:29 +00:00
Herb Derby
202c506873 Use SkStrike and SkStrikeForGPU in GlyphVector
Currently, the SkRemoteGlyphCache can't convert an SkTextBlob
to a Slug because it holds minimal glyph information.

For GlyphVector the remote cache has enough information to
serialize the GlyphVector, but not enough to draw it. In this
first step allow GlyphVector to work with either an SkStrike or
a RemoteStrike.

Change-Id: I8c261d84b40a6a69ac0077aaaeed9d318ae72c23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551890
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-23 14:17:44 +00:00
Aditya Kushwah
fe1bc0ae3d Label intermediate Gradient texture.
Label temprory offscreen textures for draws. In this CL, we will
label texture for gradient from GrGradientShader which will help
labeling parts of SkImages too.

Bug: chromium:1164111
Change-Id: Iea49598f7632bb2edfaef21a0956771af5833cc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550736
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-06-23 13:51:21 +00:00