Commit Graph

61124 Commits

Author SHA1 Message Date
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
Kevin Lubick
530759a6af Manual Dawn Roll
Required https://dawn.googlesource.com/dawn/+/77bf233cef236a094ef845d8f1a31073c2ddd7b9 and
https://dawn.googlesource.com/dawn/+/7223a5e7c9e122179e17f4faab6115e116c7ced3
to land, and for us to update our GN rules appropriately.

Change-Id: I5dad6bbd6e103405de16d7744f0c1c33fae9e0fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551857
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-06-23 12:39:45 +00:00
Kevin Lubick
c4872ce644 [bazel] Add support for Macs to make Linux RBE builds
The big change here is having the C++ toolchain use
Bazel platforms instead of the C++ specific flags/setup.
In Bazel, platforms are a general purpose way to define
things like os, cpu architecture, etc. We were not using
platforms previously, because the best documentation at
the time focused on the old ways.

However, the old ways were clumsy/difficult when trying
to manage cross-compilation, specifically when trying
to have a Mac host trigger a build on our Linux RBE
system targeting a Linux x64 system. Thus, rather than
keep investing in the legacy system, this CL migrates
us to using platforms where possible.

Suggested background reading to better understand this CL:
 - https://bazel.build/concepts/platforms-intro
 - https://bazel.build/docs/platforms
 - https://bazel.build/docs/toolchains#registering-building-toolchains

The hermetic toolchain itself is not changing in this CL
(and likely does not need to), only how we tell Bazel
about it (i.e. registering it) and how Bazel decides
to use it (i.e. resolving toolchains).

Here is my understanding of how platforms and toolchains
interact (supported by some evidence from [1][2])
 - Bazel needs to resolve platforms for the Host, Execution,
   and Target.
   - If not specified via flags, these are the machine from
     which Bazel is invoked, aka "@local_config_platform//:host".
   - With this CL, the Host could be a Mac laptop, the Execution
     platform is our Linux RBE pool, and the Target is "a Linux
     system with a x64 CPU"
 - To specify the Host, that is, describe to Bazel the
   capabilities of the system it is running on, one can
   set --host_platform [3] with a label pointing to a platform()
   containing the appropriate settings. Tip: have this
   platform inherit from @local_config_platform//:host
   so it can add to any of the constraint_settings and
   constraint_values that Bazel deduces automatically.
 - To specify the Target platform(s), that is, the system
   on which a final output resides and can execute, one
   can set the --platforms flag with a label referencing
   a platform().
 - Bazel will then choose an execution platform to fulfill
   that request. Bazel will look through a list of available
   platforms, which can be augmented* with the
   --extra_execution_platforms. Platforms specified by this
   flag will be considered higher than the default platforms!
 - Having selected the appropriate platforms, Bazel now
   needs to select a toolchain to actually run the actions
   of the appropriate type.
 - Bazel looks through the list of available toolchains
   and finds one that "matches" the Execution and the Target
   platform. This means, the toolchain's exec_compatible_with
   is a strict subset of the Execution platform and
   the toolchain's target_compatible_with is a strict subset
   of the Target platform. To register toolchains* (i.e. add
   them to the resolution list), we use --extra_toolchains.
   Once Bazel finds a match, it stops looking.
   Using --toolchain_resolution_debug=".*" makes Bazel log
   how it is resolving these toolchains and what execution
   platform it picked.

* We can also register execution platforms and toolchains in
  WORKSPACE.bazel [4], but the flags come with higher priority
  and that made resolution a bit tricky. Also, when we want
  to conditionally add them (e.g. --config=linux_rbe), we
  cannot remove them conditionally in the WORKSPACE.bazel file.

The above resolution flow directly necessitated the changes
in this CL.

Example usage of the new configs and platforms:

    # Can be run on a x64 Linux host and uses the hermetic toolchain.
    bazel build //:skia_public

    # Can be run on Mac or Linux and uses the Linux RBE system along
    # with the hermetic toolchain to compile a binary for Linux x64.
    bazel build //:skia_public --config=linux_rbe --config=for_linux_x64

    # Shorthand for above
    bazel build //:skia_public --config=for_linux_x64_with_rbe

Notice we don't have to type out --config=clang_linux anymore!
That was due to me reading the Bazel docs more carefully and
realizing we can set options for *all* Bazel build commands.

Current Limitations:
 - Targets which require a py_binary (e.g. Dawn's genrules)
   will not work on RBE when cross compiling because the
   python runtime we download is for the host machine, not
   the executor. This means //example:hello_world_dawn does
   not work on Mac when cross-compiling via linux_rbe.
 - Mac M1 linking not quite working with SkOpts settings.
   Probably need to set -target [5]

Suggested Review order:
 - toolchain/BUILD.bazel Notice how we do away with
   cc_toolchain_suite for toolchain. These have the same
   role: giving Bazel the information about where a toolchain
   can run. The platforms one is more expressive (IMO), allowing
   us to say both where to run the toolchain and what it can
   make. In order to more easily force the use of our hermetic
   toolchain, but also allow the hermetic toolchain to be used
   on RBE, we specify "use_hermetic_toolchain" only on the target,
   because the RBE image does not have the hermetic toolchain
   on it by default (but can certainly run it).
 - bazel/platform/BUILD.bazel to see the custom constraint_setting
   and corresponding constraint_value. The names for both of these
   are completely arbitrary - they do not need to have any deeper
   meaning or relation to any file or Docker image or system or
   any other constraints. Think of the constraint_setting as
   an Enum and the constraint_value being the one and only member.
   We need to pass around a constant value, not a type, so we
   need to provide the constraint_value (e.g. in toolchain/BUILD.bazel)
   but not a constraint_setting. However we need a
   constraint_setting declared so we can make a constraint_value
   of that "type".
   Notice the platform declared here - it allows us to force
   Bazel to use the hermetic toolchain because of the extra
   constraint_value.
 - .bazelrc I set a few flags that will be on for all
   bazel build commands. Importantly, this causes the C++
   build logic to use platforms and not the old, bespoke way.
   I also found a way to avoid using the local toolchain on
   the host, which will hopefully lead to clearer errors
   if platforms are mis-specified instead of odd compile
   errors because the host toolchain is too old or something.
   There are also a few RBE settings tweaked to be a bit
   more modern, as well the new shorthands for specifying
   target platforms (e.g. for_linux_x64).
 - bazel/buildrc where we have to turn off the platforms
   logic for emscripten https://github.com/emscripten-core/emsdk/issues/984
 - bazel/rbe/BUILD.bazel for a fix in the platform description
   that makes it work on Mac.
 - Notice that _m1 has been removed from the mac-related toolchain
   files because the same toolchain should work on both
   architectures.
 - All other changes in any order.

[1] https://bazel.build/docs/toolchains#debugging-toolchains
[2] https://bazel.build/docs/toolchains#toolchain-resolution
[3] https://bazel.build/reference/command-line-reference
[4] https://bazel.build/docs/toolchains#registering-building-toolchains
[5] 17dc3f16fc/gn/skia/BUILD.gn (L258-L271)
Change-Id: I515c114099d659639a808f74e47d489a68b7af62
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549737
Reviewed-by: Erik Rose <erikrose@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-23 12:00:43 +00:00
skia-autoroll
170c99a4e7 Roll vulkan-deps from 87af9564b246 to 470172656108 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/87af9564b246..470172656108

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: I2a073988f7cdb82b6b80ec77f640b60ca546f1f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552476
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 07:03:13 +00:00
skia-autoroll
68f066c335 Roll ANGLE from d55e06557bc7 to 6d3c637052ef (11 revisions)
d55e06557b..6d3c637052

2022-06-22 syoussefi@chromium.org Vulkan: Fix 180 and 270 degree rotated resolve
2022-06-22 lubosz.sarnecki@collabora.com ANGLEPerfTest: Add option to disable GL debug callbacks.
2022-06-22 lubosz.sarnecki@collabora.com Tests: Add Animal Crossing trace.
2022-06-22 chris@rive.app Ensure pls results are secure even without barriers
2022-06-22 ynovikov@chromium.org Suppress 3 pointcoord tests on Mac Intel Metal
2022-06-22 syoussefi@chromium.org Vulkan: Enable prerotation on multisample tests
2022-06-22 ynovikov@chromium.org Switch Mac experimental testing to Intel
2022-06-22 lubosz.sarnecki@collabora.com Context: Limit max samples to 4 during capture.
2022-06-22 ynovikov@chromium.org Run trace_tests on DEPS changes
2022-06-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ff5356238d86 to 5cb6a639d494 (2 revisions)
2022-06-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from de4095cef87e to 19706bf6c7d2 (495 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: angle_perftests --gtest_filter="*animal_crossing*"
Change-Id: I9451779da71f0bbdd9180e1029841bc7762b7216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552152
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 05:52:45 +00:00
skia-autoroll
74097ef5d1 Roll SwiftShader from 5cb6a639d494 to 05b368b8e74a (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/5cb6a639d494..05b368b8e74a

2022-06-22 swiftshader.regress@gmail.com Regres: Update test lists @ 5cb6a639

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: If6cde5794c049167114640d98437d3133533474c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552153
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-23 04:51:41 +00:00
Jim Van Verth
79e12af879 [graphite] Fix assert in Viewer when displaying anisomips GM.
The anisomips GM appears to snap an image from a surface and samples it.
Because we haven't implemented that yet, validation of that texture
fails, which in turns means we don't insert a Recording into the
Context, and hence that Context has no CommandBuffer.

Added a message when we fail to validate TextureInfo, and pushed the
CommandBuffer submit in GraphiteMetalWindowContext inside the block
that checks to see if we have a Recording.

Change-Id: I74d8886a56ff703f7550bde321a4c3efbac66f30
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550708
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-06-22 21:39:29 +00:00
Florin Malita
de2c13dedd [skottie_tool] GPU backend support
Refactor the implementation to decouple frame generators
(FrameGenerator: cpu, gpu, picture) from frame consumers (FrameSink:
png, skp, mp4, null).

Add a GPU frame generator using async readbacks.  Unlike other
generators, which execute on a thread pool, selecting the GPU generator
forces single-thread execution.

Also add a couple of backend-specific build targets (skottie_tool_cpu,
skottie_tool_gpu) to facilitate binary size experiments.

Change-Id: Id59e230b3861afe5bf9b7ecfc710d672f38eeaaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551237
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2022-06-22 20:17:13 +00:00
skia-autoroll
17dc3f16fc Roll vulkan-deps from 20ef3c4c476b to 87af9564b246 (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/20ef3c4c476b..87af9564b246

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: Ie27ae7950daaf9d6030c58dfbd865cda4dcbcb58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552145
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-22 18:24:47 +00:00
Brian Salomon
57a5326e20 Implement GrGpu::transferFromBufferToBuffer on GL
Bug: skia:13427
Bug: skia:12720
Change-Id: Ic2cdebd86a814bed3bf22848218bbf355724a0e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550712
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-06-22 14:19:17 +00:00
William Candillon
b0dcda6583 Fix minor issues in the Typescript declaration
Change-Id: I90b4bc906377f6816677b4418227828f1b5ef5f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549936
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-06-22 14:12:34 +00:00
Herb Derby
73e6a66146 Replace SK_ARRAY_COUNT with std::size() for skia/samplecode
Change-Id: Ibfa2c0efa3e4addf21aa400e3d323675ac0185ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551886
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-22 14:02:56 +00:00
Brian Salomon
a9163fca2e Make Vulkan vertex and index buffers support transfer dst
Bug: skia:12720

Change-Id: I34865b966a84a329960c87b5d862186fe5e1af55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551839
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-06-22 13:11:11 +00:00
skia-autoroll
39888036d1 Roll ANGLE from 21c89c14831c to d55e06557bc7 (6 revisions)
21c89c1483..d55e06557b

2022-06-21 chris@rive.app Add pls tests for fragment reject utilities
2022-06-21 ffz@google.com Implement GL_EXT_base_instance
2022-06-21 gert.wollny@collabora.com Capture/Replay: Fix which sync object is deleted
2022-06-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 45c701a7067d to 1765af41ecf5 (6 revisions)
2022-06-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from f833544ff898 to ff5356238d86 (5 revisions)
2022-06-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 36bd948bdb66 to de4095cef87e (273 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
Change-Id: I73641dc619982d924e5c75d8a3e5c142d1867aba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551659
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-22 05:51:41 +00:00
skia-autoroll
084e9d9e34 Roll vulkan-deps from a3a7851860ea to 20ef3c4c476b (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/a3a7851860ea..20ef3c4c476b

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

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: I71e7f1a4f3428e9d7b835e89db81cef86d09b2fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551663
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-22 05:40:41 +00:00
skia-autoroll
ff4e443638 Roll SwiftShader from ff5356238d86 to 5cb6a639d494 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/ff5356238d86..5cb6a639d494

2022-06-21 srisser@google.com Add StorageTexelBufferArrayDynamicIndexing
2022-06-21 swiftshader.regress@gmail.com Regres: Update test lists @ ff535623

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: Id44654d97c73a8d2670ee7ce010f188e3f3941e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551660
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-22 04:51:49 +00:00
John Stiles
a99593bfa9 Add support for int-typed data payloads.
If we are going to create a new snippet ID every time a runtime effect
is painted, we will overflow a byte very rapidly.

Change-Id: Ic094af2a81e590488bf90b60492b004e9135d4a2
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551843
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-06-22 03:06:16 +00:00
Herb Derby
e956ae74ea Use ASAN poisoning in SkArenaAlloc
Change-Id: Ie2166fefe6ffa431b17590c53bf22a8725376938
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551885
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-21 21:35:45 +00:00
Kevin Lubick
1c15b9fe30 [Bazel] Fix sksl defines
Without this define, I was seeing a compile error in SkKeyHelpers.cpp

Change-Id: I4d4a804f11fdd67e69bac4c7a6d0d686bebd8922
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552076
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-06-21 20:54:11 +00:00
Brian Salomon
915cad6282 GrGLInterface requires glCopyBufferSubData if supported by context
Supporting Chrome change landed here:
https://chromium-review.googlesource.com/c/chromium/src/+/3710691

Bug: skia:13427
Bug: skia:12720
Change-Id: I87f5ac27723287945b4f7b0df82c7188733a4fb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550711
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-21 19:32:01 +00:00
Jorge Betancourt
c327d1054a reland "set up GL sample app to build through Bazel Mac toolchain"
https://skia-review.googlesource.com/c/skia/+/549897

G3 error fixed with:
https://critique.corp.google.com/cl/456234733

Introduces tracking bug:
https://bugs.chromium.org/p/skia/issues/detail?id=13452

Suggested review order.
1) tools/sk_app/* and src/gpu/ganesh/*
sets up the actual target to be built by the toolchain
2) toolchain/* and .bazelrc
changes to the mac hermetic toolchain, including support for framework dependencies, objc compilation, and dynamic lib dependency resolution

Change-Id: Id31e0adb134d385cbb4af6818f2c25c4fdae9598
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551881
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-06-21 19:22:16 +00:00
Herb Derby
3bd3b5dfae Don't zero memory blocks used by SkArenaAlloc
SkArenaAlloc uses new char[allocSize] to obtain new memory blocks.
Changes this to sk_malloc_throw which does not zero allocated
memory.

I don't think anything relies on the memory being zeroed. If
this CL makes it through all the *SANs I think this CL will
be ok in the field.

Change-Id: Ia564313a501dd7c5b34ac6a9bde71fab1d76be76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551880
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-21 19:12:03 +00:00
Michael Ludwig
93dadaf3ce [graphite] Device and ClipStack use Geometry instead of Shape
Replaces Device::recordDraw() with a static ChooseRenderer() function
that is closer to the final destination for renderer selection, and
provides a helper function drawClipShape() for ClipStack to use instead
of having it append to the DrawContext directly.

The renderer choosing now happens earlier in Device::drawGeometry()
so that it is available to modify bounds/draw-order calculations if
it requires coverage AA.

Bug: skia:12787
Change-Id: Ia12db71bcd3ab6fbecfc72c79f06a2597388eafd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550699
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Nicolette Prevost <nicolettep@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2022-06-21 19:10:28 +00:00
Kevin Lubick
2e99fcb021 Reland "[bazel] Update to v5.2.0"
This is a reland of commit fb13c18ddf

Bazel 5.2.0 was fine, it was the fact that our toolchain
was not erroring when clang failed that was an issue.
We were always returning error code 0, but Bazel 5.2.0
was correctly identifying that we hadn't produced the
promised build artifacts.

Original change's description:
> [bazel] Update to v5.2.0
>
> The primary change we are looking for is
> "Add support for .ar archives (and .deb files)
> https://github.com/bazelbuild/bazel/pull/15218"
>
> https://blog.bazel.build/2022/06/08/bazel-5.2.html
>
> In theory, we should be able to trigger Linux RBE
> compilations (e.g. IWYU) from Mac with this change.
>
> Change-Id: I217406d21fd55507e090c4bb5f79c796230717e6
> Bug: skia:12541
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549659
> Reviewed-by: Joe Gregorio <jcgregorio@google.com>

Bug: skia:12541
Change-Id: I160b5802adc232d5cf7f7d05b20d5eabbb3d5102
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551841
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-06-21 18:49:10 +00:00
Herb Derby
c37b386886 Replace SK_ARRAY_COUNT with std::size() for skia/gm
Note: in variedtext.cpp:66 changed static_assert to SkASSERT.

Change-Id: I853a2e5563c90c9dde5d6ba5443cc73b664b493d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551876
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-21 18:09:30 +00:00
Herb Derby
f9329d7b87 Deprecate SK_ARRAY_COUNT and docuemnt the old and new methods
Change-Id: Id58bf93098fa62f621614937a2d1524790f73f58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551708
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-21 18:01:49 +00:00
skia-autoroll
3c9ab38091 Roll vulkan-deps from 1765af41ecf5 to a3a7851860ea (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/1765af41ecf5..a3a7851860ea

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross from 99b59b35288c to ba3e6ffe037e
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 2eff41e70709 to 4f321f862af9

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: I328fca4d500fffa5440b28444da387f94173d8fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551937
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-21 16:59:11 +00:00