Commit Graph

60820 Commits

Author SHA1 Message Date
John Stiles
9f85e0e12d Further reduce the size of DSLType.
DSLType stored an `fPosition` which was only used in one place, when
reporting that a function is not allowed to return a particular type.
Those errors now highlight the type and function name together, which is
not really any worse than before. This allows us to shrink DSLType down
to its minimal form, just a pointer to an SkSL::Type and nothing else.

Change-Id: I4b430cb996472da0ae57bc2ab095cd123d2c3f51
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/546097
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-06-02 14:02:29 +00:00
John Stiles
a98b3a1f0c Reduce the size of DSLType.
This CL removes the TypeConstant member from DSLType. The constructor
which takes a TypeConstant now sets the `fSkSLType` field immediately
instead of saving the value and deferring lookup until `skslType()` is
called.

This caused some ripple-effect issues in type setup code which were
fixable by replacing nullptr with Poison.

Change-Id: I8fa73cdf5f0bcd3de143c9a25ea43392d75c7dec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545780
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-06-02 14:02:23 +00:00
Kevin Lubick
f64f211283 [bazel] Use pre-built taskdriver for faster BazelBuild jobs
With a hot Bazel cache, https://task-scheduler.skia.org/job/4XhwJfG1wR38Hp3dF1pI
took 59 seconds and did not have to wait 1-2 minutes
for TaskScheduler to schedule a prerequisite task
and Swarming to deduplicate said task, which is
the best case scenario for "all hot caches".

Change-Id: Ic86599e0b886ecded836641cceb19b623065a91e
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/546136
Reviewed-by: Eric Boren <borenet@google.com>
2022-06-02 13:46:53 +00:00
Robert Phillips
cb8e5b28f0 Remove MSVC __popcnt intrinsic special casing
MSVC is a very marginal compiler for us (and we don't call SkPopCount that often) so we've deemed it not worth the extra complexity to handle the __popcnt intrinsic.

Change-Id: I1d838727eab503cd99a72d07e9787280d0948b29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545896
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-02 13:43:32 +00:00
Ian Prest
18fdfe83a5 Add SkSurfaceProps parameter to several APIs
In general, SkSurfaceProps is only needed when rendering text.  However,
there are several existing APIs that don't allow SkSurfaceProps to be
passed in by the user.

This change adds new SkSurfaceProps parameters to several public-facing
APIs:
  1. SkRasterHandleAllocator::MakeCanvas
  -- The props are used by the canvas whenever text is rendered.

  2. SkImage::MakeFromPicture and SkImageGenerator::MakeFromPicture
  -- The props are used to render any text in the SkPicture object.

Change-Id: Ic48e8a30bb12b3170415c644de1a007b5eefb818
Bug: skia:13369
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545396
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-06-02 13:12:33 +00:00
Kevin Lubick
455addeff6 [bazel] Add 4 CI jobs, 1 CQ job to test Bazel builds
Needed to fix the Dawn and Harfbuzz Bazel rules.

Change-Id: I21f63c970bdc972b97e42ef85d82d7f478bd45e2
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545721
Reviewed-by: Eric Boren <borenet@google.com>
2022-06-02 12:36:28 +00:00
Kevin Lubick
ee62fad9a4 [bazel] Add "skia_internal" target that exposes private API for tests/tools.
Organization v3.5, if we are keeping track :)

This splits the "srcs" filegroup into "srcs" and "private_hdrs",
and renames "hdrs" to "public_hdrs".

To assist with the split, I created the macro split_srcs_and_hdrs.
Rather than keep two separate lists of header and source files,
I figured it would be easiest, at least for the common case,
to keep one list of files and then have a for loop split them
apart. I've tried to be consistent with having the list
of files be named with a _FILES suffix - maybe we can use this
as a marker to generate .gni files in the future?

Suggested review order:
 - //bazel/macros.bzl. Note this needs a corresponding
   G3 change (http://cl/452279799) as well. The exports_files_legacy
   change is the better approach to something I manually
   handled yesterday when fixing the G3 roll.
 - //BUILD.bazel to see the new target skia_internal and
   the previous skia_core renamed to skia_public.
 - //src/core/BUILD.bazel to see a typical usage of
   split_srcs_and_hdrs.
 - //include/... to see the change to public_hdrs and
   private_hdrs
 - //src/... to see many more usages of split_srcs_and_hdrs
 - //tools/... to see changes to skia_internal where
   appropriate.
 - Everything else. Note that //modules/... might also need
   to be built with skia_internal instead of skia_public,
   but we can fix that up later, if necessary.

Change-Id: Ie1cc969455d97b029b2d77faa222c4a9bad70671
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545716
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2022-06-02 11:23:50 +00:00
skia-autoroll
89fea08f6b Roll vulkan-deps from b0ac9f33937d to 7ab4802b330f (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/b0ac9f33937d..7ab4802b330f

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 bungeman@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: bungeman@google.com
Change-Id: I0d855fabaa93cd23073ad95a42125a756f70187a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/546056
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-02 08:20:00 +00:00
skia-autoroll
85c75b7d9c Roll ANGLE from 9800a3cf3f7c to e04314fd8f19 (14 revisions)
9800a3cf3f..e04314fd8f

2022-06-02 syoussefi@chromium.org Vulkan: Include state in pipeline graph dump
2022-06-02 gman@chromium.org Metal:Dynamically choose max draw buffers.
2022-06-02 gman@chromium.org Metal: Upstream clear performance fix
2022-06-02 gman@chromium.org Metal: Update MAX_LOD_BIAS
2022-06-01 ffz@google.com Code Cleanup
2022-06-01 senorblanco@chromium.org D3D11: implement stencil texturing.
2022-06-01 syoussefi@chromium.org Vulkan: Pipeline creation feedback in perf counters
2022-06-01 syoussefi@chromium.org Vulkan: Use 64-bit counters
2022-06-01 syoussefi@chromium.org Vulkan: Fix xfb emulation bug w.r.t array elements
2022-06-01 jmadill@chromium.org Update extension support (June 1, 2022).
2022-06-01 romanl@google.com Revert "Use a temporary timeout multipler for trace tests."
2022-06-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 59aa5963cf64 to 23b710f1a0b3 (6 revisions)
2022-06-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 51c43dc015b7 to 466e443100e6 (2 revisions)
2022-06-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 85bb5555c93e to f6e0343d6b36 (473 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 bungeman@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: bungeman@google.com
Change-Id: I9d73e96f070bd15b1b8583b22699ae595b8c5c58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545937
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-02 05:51:33 +00:00
skia-autoroll
d788590483 Roll SwiftShader from 55dd5e7034ed to 1bf3ae22a00d (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/55dd5e7034ed..1bf3ae22a00d

2022-06-01 sugoi@google.com Fix border comparison with depth 16
2022-06-01 srisser@google.com Make vk_pipeline dependent on Reactor

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 bungeman@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: bungeman@google.com
Change-Id: I43cb14e5ad76d52eb9200d606126c932ee78a1c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545938
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-02 04:49:34 +00:00
skia-autoroll
2b1ed68f03 Roll Dawn from 25b7e98d1100 to 232abaefc35d (26 revisions)
https://dawn.googlesource.com/dawn.git/+log/25b7e98d1100..232abaefc35d

2022-06-02 hogehoge@gachapin.jp Delint for "use after move"
2022-06-02 shrekshao@google.com Fix typo maxOS -> macOS
2022-06-02 jie.a.chen@intel.com Remove stride in ExternalImageDescriptorDmaBuf
2022-06-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 466e443100e6 to 1bf3ae22a00d (1 revision)
2022-06-01 bclayton@google.com tint: Stub intrinsic @const evaluation
2022-06-01 bclayton@google.com tint/writer/spirv: Tweak builtin tests to use 'var's
2022-06-01 bclayton@google.com tools: intrinsic-gen - [[decoration]] -> @attribute
2022-06-01 bclayton@google.com tint/resolver: Enable abstract-numerics
2022-06-01 bclayton@google.com tint: Shuffle builtin test directories
2022-06-01 bclayton@google.com tint: Add tests showing tint:1332 is fixed
2022-06-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 9800a3cf3f7c to b03f278925c6 (4 revisions)
2022-06-01 bclayton@google.com Roll third_party/webgpu-cts/ 70091fdb8..d275c5e1e (3 commits)
2022-06-01 bclayton@google.com tint/transform: Remove FoldConstants
2022-06-01 bclayton@google.com tint/sem: Fix Constant constructor with initializer_list
2022-06-01 bclayton@google.com tint/writer/spirv: Inline constant expressions
2022-06-01 bclayton@google.com tint/sem: Consider sign bit for Constant helpers.
2022-06-01 bclayton@google.com tint/writer/hlsl: Inline constant expressions
2022-06-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from ba231aba2243 to 23b710f1a0b3 (5 revisions)
2022-06-01 cwallez@chromium.org Stop validating ExternalTextureDescriptor::colorSpace prior to removal
2022-06-01 bclayton@google.com cts: Remove use of intel-0x5912 and intel-0x3e9b tags
2022-06-01 zhaoming.jiang@intel.com Tint: num_workgroups use free binding group if not specified
2022-06-01 bclayton@google.com tint/writer/msl: Inline constant expressions
2022-06-01 cwallez@chromium.org Add support for SurfaceDescriptorFromWaylandSurface
2022-06-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 55dd5e7034ed to 466e443100e6 (1 revision)
2022-06-01 enrico.galli@intel.com dawn/native: Add support for feature "indirect-first-instance"
2022-06-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 0b533e64cf61 to 9800a3cf3f7c (9 revisions)

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 lokokung@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: lokokung@google.com
Change-Id: I53abf8cace8c45524d9018510bf4b8ea523a9b47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545939
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-02 04:41:40 +00:00
Ben Wagner
3daf310ed8 Roll HarfBuzz from 8d1b000a to 858570b1 (460 commits)
8d1b000a3e..858570b1d9

Change-Id: I04ae10351707eed0897792a7b0214648f5f80d9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544238
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-06-01 22:10:39 +00:00
Herb Derby
e02ed227f6 Move SubRun alloc estimator to SubRunContainer
Change-Id: I7da5a6757a68e74012958b61fbe7195f9d262776
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545777
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-01 20:43:42 +00:00
skia-autoroll
38847f13db Roll vulkan-deps from 23b710f1a0b3 to b0ac9f33937d (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/23b710f1a0b3..b0ac9f33937d

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 bungeman@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: bungeman@google.com
Change-Id: Ic429ca4b0576d7d5c9bd71bdb2cf137cf11cb127
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545710
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-01 19:39:14 +00:00
Brian Salomon
586e6354aa SkMeshSpecification supports uniforms.
Currently there is no way to specify the data that is bound to them.
That will come in later changes.

Bug: skia:12720
Change-Id: I3301a825486469396a13a4095b66d9e0b81f183b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543716
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-06-01 19:37:35 +00:00
skia-autoroll
479fa1c9ca Roll SK Tool from 7773a2b07a31 to 1b7947e28c99
https://skia.googlesource.com/buildbot.git/+log/7773a2b07a31..1b7947e28c99

2022-06-01 borenet@google.com [bcid] Add skia-infra-corp to kube/clusters/config.json
2022-06-01 borenet@google.com [autoroll] Fix meta-config-generator deleting and recreating files
2022-05-31 rmistry@google.com [gerrit] Add topic to ChangeInfo and add new topic SearchTerm
2022-05-31 rmistry@google.com [CT] Create member variables for each metrics analysis element
2022-05-31 rmistry@google.com [CT] Create member variables for each chromium analysis element

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 kjlubick@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

Tbr: kjlubick@google.com
Change-Id: If2cb6de21011e5fb705a3ca36e5c227694fef5fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545708
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-01 19:16:50 +00:00
Kevin Lubick
61f0ea4f7a [bazel] Move remaining codec build rules to //bazel/external
There are no functional changes to the rules, just a relocation.

Change-Id: I90af5ec792fc54ce2978b0bbb1afd2c932e183b4
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545719
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-06-01 19:12:14 +00:00
Arman Uguray
bd969a089d [sksl] Disallow boolean uniforms
Booleans and structs/interface blocks that transitively contain a
boolean member are no longer allowed to be used as a uniform. This is
because SPIR-V and WGSL currently disallow OpTypeBool in host-shareable
storage classes.

Change-Id: I10315c7f261ff10a07636265968a91d9c421da55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542776
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-06-01 18:07:08 +00:00
Kevin Lubick
3aed21ce0e [bazel] Fix Dawn rules (new generated files)
Corresponding Dawn change: https://dawn-review.googlesource.com/c/dawn/+/90962

Change-Id: Ib9d2163c7874b7fb9fb5ab88de6d96a133c4ecbd
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545718
Reviewed-by: Arman Uguray <armansito@google.com>
2022-06-01 18:02:30 +00:00
Robert Phillips
1d27124c48 Add SkPopCount
Change-Id: Ic750608c2053eb1253e6cb21109b0ad5ac32a55a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545362
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-01 17:55:22 +00:00
John Stiles
5723585ba3 Disable the CFI sanitizer only when casting pointers.
The cast of newly-allocated memory to T* is the only thing that triggers
a CFI error; we can let CFI instrument the rest of the code normally.

Change-Id: I0e6ab76dbddf031967bee34f5a05986ff58e6714
Bug: skia:13339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545676
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-06-01 15:10:35 +00:00
Kevin Lubick
bebf8e34c3 [bazel] Fix typo
Change-Id: I6f091e5ef99cfa8a26a033d37415391b2ee63e55
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545369
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-06-01 13:44:40 +00:00
Florin Malita
1da7be7a85 Cleanup SkText warnings
Some unused var and pessimizing move warnings, e.g.

../../experimental/sktext/src/Text.cpp:316:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
    return std::move(shapedText);
           ^
../../experimental/sktext/src/Text.cpp:316:12: note: remove std::move call here
    return std::move(shapedText);
           ^~~~~~~~~~

Change-Id: Id5c220b7a850b2013e2bf065a87d4a296bd0369c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542522
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
2022-06-01 13:03:05 +00:00
Kevin Lubick
97caefd055 [bazel] Move zlib and libpng out of //third_party/BUILD.bazel
I had to copy some config_settings out of //bazel/common_config_settings
because these are now treated as separate entities and cannot
see that file.

For libpng, note that we use a genrule to create the
pnglibconf.h instead of pointing to one somewhere else.
This ended up being easier than other things I tried.

Another approach would be to not depend on the version
in third_party/externals, but to clone it via
new_git_repository [1] and apply a patch that creates
the configuration file.

[1] https://bazel.build/rules/lib/repo/git#new_git_repository

Bug: skia:12541
Change-Id: I9a284775dc0f2bdabb145518d5f0803c74fb99fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545368
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-06-01 12:19:01 +00:00
skia-autoroll
b217400869 Roll vulkan-deps from ba231aba2243 to 23b710f1a0b3 (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/ba231aba2243..23b710f1a0b3

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers from 5a121866927a to b2a156e1c043
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 130a05d2e3e5 to b930e734ea19

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 bungeman@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: bungeman@google.com
Change-Id: I00adf5f736be51459ab338f941bd569bd88623ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545529
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-01 06:51:02 +00:00
skia-autoroll
48cb5bc138 Roll ANGLE from 0b533e64cf61 to 9800a3cf3f7c (9 revisions)
0b533e64cf..9800a3cf3f

2022-06-01 chris@rive.app Add a test for imageLoad after glClear to the texture
2022-05-31 jmadill@chromium.org Vulkan: Switch resource tracking.
2022-05-31 jmadill@chromium.org Vulkan: Track used command buffers in ResourceUse.
2022-05-31 senorblanco@chromium.org D3D11: minor cleanup to getSRVLevel().
2022-05-31 geofflang@google.com GL: Temporarily enable validation for all GL calls.
2022-05-31 ggabu423@gmail.com Fix to invalidate cache when binding Transform Feedback.
2022-05-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from d070309f7d15 to 51c43dc015b7 (1 revision)
2022-05-31 geofflang@chromium.org Revert "Initialize buffer contents separately from BufferImpl::setData"
2022-05-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 312583ebe76f to 85bb5555c93e (843 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 bungeman@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: bungeman@google.com
Change-Id: If199df15478cd75a2e449b7438dc6e7aab7ff60c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545523
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-01 05:51:07 +00:00
skia-autoroll
f19abf4c3a Roll SwiftShader from 51c43dc015b7 to 55dd5e7034ed (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/51c43dc015b7..55dd5e7034ed

2022-05-31 capn@google.com Optimize SPIR-V matrix operations using FMA

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 bungeman@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: bungeman@google.com
Change-Id: I28d09121392fc11aef4de9cff6566768519701d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545524
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-01 04:52:41 +00:00
skia-autoroll
2c1259e699 Roll Dawn from f45180a428d2 to 25b7e98d1100 (61 revisions)
https://dawn.googlesource.com/dawn.git/+log/f45180a428d2..25b7e98d1100

2022-06-01 bclayton@google.com tint/writer/glsl: Inline constant expressions
2022-06-01 jie.a.chen@intel.com Explicit vkImage create to wrap video frame
2022-06-01 jrprice@google.com tint/spirv: Fix atomicCompareExchangeWeak
2022-05-31 amaiorano@google.com tint: update origin-trial-changes.md for atomicCompareExchangeWeak changes
2022-05-31 bclayton@google.com tint/resolver: Implement candidate overload resolution
2022-05-31 bclayton@google.com tint: Remove use of inf / nans from e2e tests
2022-05-31 bclayton@google.com tint/sem: Add more helpers to Constant
2022-05-31 enga@chromium.org Return an error surface if surface creation fails
2022-05-31 bclayton@google.com tint/writer/wgsl: Emit 'f' suffix on FloatLiteralExpressions
2022-05-31 bclayton@google.com tint/resolver: Materialize RHS of non-phony assignments
2022-05-31 enga@chromium.org Fix typo in OWNERS file
2022-05-31 enga@chromium.org Remove custom serialization of device properties
2022-05-31 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 59aa5963cf64 to ba231aba2243 (1 revision)
2022-05-31 bclayton@google.com tint/resolver: Materialize array size expression
2022-05-31 enga@chromium.org Ensure the Vulkan fuzzer uses SwiftShader
2022-05-31 hogehoge@gachapin.jp Change wgpu::VertexStepMode::VertexBufferNotUsed enum value
2022-05-31 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 51c43dc015b7 to 55dd5e7034ed (1 revision)
2022-05-31 bclayton@google.com tint/resolver: Materialize array index expression
2022-05-31 amaiorano@google.com Implement atomicCompareExchangeWeak returning struct instead of vec2
2022-05-31 bclayton@google.com tint: Add Checked[Add|Mul|Madd]()
2022-05-31 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 33b254fe85e3 to 0b533e64cf61 (3 revisions)
2022-05-30 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from d070309f7d15 to 51c43dc015b7 (1 revision)
2022-05-30 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from a2fe4445dce5 to 33b254fe85e3 (4 revisions)
2022-05-30 dsinclair@chromium.org Update some forward declarations.
2022-05-30 bclayton@google.com tint: Lex abstract integers
2022-05-30 bclayton@google.com tools: Add colored icons to the CTS roll msgs
2022-05-30 bclayton@google.com Roll third_party/webgpu-cts/ 5f05d6d5e..70091fdb8 (2 commits)
2022-05-30 dsinclair@chromium.org Update clang-tidy configuration.
2022-05-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 9ea3967d3e8b to a2fe4445dce5 (1 revision)
2022-05-28 bclayton@google.com tint/resolver: Materialize arguments to @workgroup_size
2022-05-28 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from e46647cbc883 to 59aa5963cf64 (5 revisions)
2022-05-28 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from b267c009d4d6 to 9ea3967d3e8b (4 revisions)
2022-05-28 bclayton@google.com tint/resolver: Materialize argument to bitcast
2022-05-28 bclayton@google.com tint/resolver: Add tests for implicit type materialization
2022-05-28 enga@chromium.org Update Dawn tests and fuzzers to create adapters/devices on the wire
2022-05-27 senorblanco@chromium.org ANGLE/D3D11: reenable now-passing bind groups tests.
2022-05-27 bclayton@google.com tint/resolver: Rename test field names, update comments
2022-05-27 bclayton@google.com tint/resolver: Make Materialize() handle nullptr expressions
2022-05-27 bclayton@google.com tint: Remove ConversionFailure::kTooSmall
2022-05-27 bclayton@google.com tint/resolver: Ensure that validation is done before CollectTextureSamplerPairs()
2022-05-27 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from aa2201725270 to b267c009d4d6 (4 revisions)
2022-05-27 bclayton@google.com tools: Automatically generate resource_files.txt
2022-05-27 bclayton@google.com tint/reader/wgsl: Error if a hex float is not exactly representable
2022-05-27 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 090d24c0ff24 to e46647cbc883 (4 revisions)
2022-05-27 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 5ca5b0ae5a7d to d070309f7d15 (5 revisions)
2022-05-27 jiawei.shao@intel.com Vulkan: Remove deprecated VK_MAKE_VERSION
2022-05-27 jiawei.shao@intel.com Fix a Kokoro build error and a presubmit warning
2022-05-27 bclayton@google.com dawn: Add missing #include
2022-05-27 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 54e08a5af1f7 to aa2201725270 (4 revisions)
2022-05-27 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c1e419261c41 to 090d24c0ff24 (9 revisions)
2022-05-27 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from b29b3ba75888 to 5ca5b0ae5a7d (3 revisions)
2022-05-27 enga@chromium.org Workaround UBSAN errors re incorrect function pointer types
2022-05-27 jiawei.shao@intel.com Vulkan: Support feature chromium_experimental_dp4a
2022-05-26 bajones@chromium.org Begin auto generating GPUInfo utilities
2022-05-26 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 891dd5b3d8eb to 54e08a5af1f7 (4 revisions)
2022-05-26 kainino@chromium.org Remove TextureView test suppressions for Mac AMD
2022-05-26 senorblanco@chromium.org ANGLE/D3D11: remove suppression for now-passing test.
2022-05-26 enga@chromium.org Reduce fuzzer log spam
2022-05-26 bclayton@google.com tint/reader/wgsl: Lex abstract floats
2022-05-26 bclayton@google.com tint/reader/wgsl: Use C++17 hex floats for tests
2022-05-26 bclayton@google.com tint/reader/wgsl: Lex abstract hex floats

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 lokokung@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: lokokung@google.com
Test: Test: dawn_end2end_tests
Change-Id: I9f202489233a336f396adacc4fc7dcc73a794b0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545522
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-01 04:41:09 +00:00
John Stiles
817dd601f8 Reland "Disable Control-Flow Integrity in SkTArray when casting buffer to T*."
This reverts commit ef7c45a0fa.

Reason for revert: avoiding perf regression

Original change's description:
> Revert "Disable Control-Flow Integrity in SkTArray when casting buffer to T*."
>
> This reverts commit 0b1384de5a.
>
> Reason for revert: visible impact on performance: http://screen/4N7DNCQNSgtzzBo http://go/crb/1330618
>
> Original change's description:
> > Disable Control-Flow Integrity in SkTArray when casting buffer to T*.
> >
> > We disable Control-Flow Integrity sanitization (go/cfi) when updating
> > the item-array buffer. CFI flags this code as dangerous because we are
> > casting `buffer` to a T* while the buffer's contents might still be
> > uninitialized memory. When T has a vtable, this is especially risky
> > because we could hypothetically access a virtual method on fItemArray
> > and jump to an unpredictable location in memory. Of course, SkTArray
> > won't actually use fItemArray in this way, and we don't want to
> > construct a T before the user requests one. There's no real risk here,
> > so disable CFI when doing these casts.
> >
> > Change-Id: I5708053339f4a600b12c841fcd38880f9932f7d6
> > Bug: skia:13339
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542643
> > Commit-Queue: Ben Wagner <bungeman@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Ben Wagner <bungeman@google.com>
>
> Bug: skia:13339
> Change-Id: I9f39100fc4a03359fa7712b0a8d8cbe3bc7de625
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545365
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

Bug: skia:13339
Change-Id: I7629cb9045e0c7a804785f8c0ad569610e1c67e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545366
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-31 20:50:05 +00:00
Herb Derby
b018bcf5d5 Introduce SubRunContainer - common SubRun code from Blobs and Slugs
Factor out the common code for handling SubRuns from Blobs and
Slugs. SubRunContainer will be moved to its own file in the
next CL to reduce the size of TextBlob.cpp.

Change-Id: I185336c5fa7a70841ef7b706fa194aa01649dacc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544248
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-05-31 20:32:16 +00:00
skia-autoroll
6c8ee260d5 Roll SK Tool from 42e81270f532 to 7488f1b9caa8
https://skia.googlesource.com/buildbot.git/+log/42e81270f532..7488f1b9caa8

2022-05-31 borenet@google.com [gerrit] Fix Auto-Submit label

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 kjlubick@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

Tbr: kjlubick@google.com
Change-Id: Ie96b0ef0805999006c2e3801ab955952574b6a26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545381
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-31 20:17:42 +00:00
Kevin Lubick
8d69d04579 [bazel] Add fixes for G3
Mostly, this adds placeholder BUILD.bazel files corresponding to files
used in public.bzl

The exception is src/ports/BUILD.bazel, which adds an explicit
link command for dl, needed for dlopen etc.

Bug: skia:12541
Change-Id: Id3801a4c718cec37bc2aa3920a8d810f8a80a373
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545359
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-05-31 19:50:47 +00:00
Julia Lavrova
d1e84595fb Returning back offsets for glyphs
(to fix non-monotonic glyph placement)
With Google3 test failure in Samples
showing that it's not SkParagraph fault but
rather a result of this fix.

Change-Id: I72e025cdaf806bae0e8a8337074f75af5af428b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544336
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-05-31 18:58:52 +00:00
John Stiles
ef7c45a0fa Revert "Disable Control-Flow Integrity in SkTArray when casting buffer to T*."
This reverts commit 0b1384de5a.

Reason for revert: visible impact on performance: http://screen/4N7DNCQNSgtzzBo http://go/crb/1330618

Original change's description:
> Disable Control-Flow Integrity in SkTArray when casting buffer to T*.
>
> We disable Control-Flow Integrity sanitization (go/cfi) when updating
> the item-array buffer. CFI flags this code as dangerous because we are
> casting `buffer` to a T* while the buffer's contents might still be
> uninitialized memory. When T has a vtable, this is especially risky
> because we could hypothetically access a virtual method on fItemArray
> and jump to an unpredictable location in memory. Of course, SkTArray
> won't actually use fItemArray in this way, and we don't want to
> construct a T before the user requests one. There's no real risk here,
> so disable CFI when doing these casts.
>
> Change-Id: I5708053339f4a600b12c841fcd38880f9932f7d6
> Bug: skia:13339
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542643
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

Bug: skia:13339
Change-Id: I9f39100fc4a03359fa7712b0a8d8cbe3bc7de625
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545365
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-05-31 18:50:22 +00:00
Brian Salomon
9c9ef3845d GrResourceProvider::createBuffer: group data ptr with size in overload.
Bug: skia:12720
Change-Id: I9e065e61e904c6f54f601b021db3dcd7fbf3de86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544247
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-05-31 18:35:40 +00:00
skia-autoroll
8272b06ed8 Roll vulkan-deps from 59aa5963cf64 to ba231aba2243 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/59aa5963cf64..ba231aba2243

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 82d91083cb56 to 130a05d2e3e5

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 bungeman@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: bungeman@google.com
Change-Id: I4a4547d409a667b2c5dd09ac9f85e9921ac2ac8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545229
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-31 18:11:09 +00:00
Brian Salomon
9676ef7302 Constify the uniform value SkDatas in runtime effects
Bug: skia:12720
Change-Id: I7f74b4f88456bf5ddef1a648d2231d28034ed246
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544237
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-05-31 16:59:10 +00:00
Jason Simmons
153bd188e6 Clear the hard line break flag when resetting the TextWrapper
See https://github.com/flutter/flutter/issues/104208

Change-Id: I963fc77931014ed3c312a3e2667dc3e8cb31fe2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544116
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2022-05-31 16:15:17 +00:00
John Stiles
e78db5d632 Remove pending-error support from the ErrorReporter.
Pending errors were used to associate C++ file and line numbers with
C++ DSL code. (We would detect errors in expressions before they had
been associated with a Position, and needed to defer saving the error
until a valid Position had been found.)

We no longer try to assign a position to C++ DSL code, so pending
errors do not do anything useful.

Change-Id: I272a73f64e63269120a6f76f4a0153c11d98fb47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543018
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-05-31 15:46:10 +00:00
John Stiles
981b140e2f Eliminate DSLPossibleStatement.
Unlike DSLPossibleExpression, this was only used in a few rare places,
so it was much easier to remove.

Change-Id: I483dc061691f89d3e808d5bbc23c500bc57b680a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542662
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-31 15:35:12 +00:00
John Stiles
8f7abc5eee Remove CFI workaround from parser.
DSLParameter no longer has a vtable, and SkTArray no longer triggers CFI
on objects with vtables, so the vector<> workaround is no longer needed.

Change-Id: I035cce23af072623943a2ca751d8c2b3a4ea1750
Bug: skia:13339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545237
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-05-31 14:36:57 +00:00
John Stiles
c6218799a6 Reland "Eliminate DSLPossibleExpression."
This reverts commit 193c16380f.

Reason for revert: fixed google3 warning

Original change's description:
> Revert "Eliminate DSLPossibleExpression."
>
> This reverts commit f2d000328f.
>
> Reason for revert: breaking google3 roll
>
> Original change's description:
> > Eliminate DSLPossibleExpression.
> >
> > The Possible(Expression|Statement) classes were added at
> > http://review.skia.org/375069. These classes were responsible for
> > capturing `__builtin_FILE()` and `__builtin_LINE()` when an
> > expression or statement was added to a hand-authored DSL program. This
> > allowed errors to be reported on the C++ file/line where they were
> > encountered. This was a good feature to have, when the plan was to
> > author the majority of SkSL code via DSL.
> >
> > Later, IRNode positions were converted from an integer line number to
> > SkSL Positions at http://review.skia.org/518137. This gave us range
> > tracking, but at a high memory cost (16 bytes per IRNode, versus four
> > bytes when we tracked line numbers only).
> >
> > Positions were reduced to 8 bytes at http://review.skia.org/521005 by
> > removing the filename, which was only used for hand-authored DSL. (The
> > size was pared all the way back to 4 bytes at
> > http://review.skia.org/533699 by packing the data more efficiently.)
> >
> > __builtin_FILE/LINE capturing was removed entirely at
> > http://review.skia.org/528366; the filename was discarded anyway and
> > the line number didn't have a range and wasn't very meaningful without
> > a filename. Also, it didn't matter very much since we no longer intended
> > to hand-craft our programs in DSL.
> >
> > At this stage, DSLPossibleExpression stopped adding value and simply
> > served to move Expressions around.
> >
> > Change-Id: I29ac33e08dcc1804cc0619c1e8856ba28ebcc51d
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542145
> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
>
> Change-Id: I33badbdcce8760200246bf50e4932d42721ea952
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543078
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Owners-Override: Kevin Lubick <kjlubick@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>

Change-Id: I71f248b2343806f85cad5f0661470c95334bbe22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545236
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-05-31 14:32:16 +00:00
Kevin Lubick
c123b5a93d [bazel] Add rules for CanvasKit and dependent modules
This may look like a lot, but //modules/canvaskit/BUILD.bazel
is nearly identical to how it was with gazelle:
162dfca340/modules/canvaskit/BUILD.bazel

I removed the "wasm_gm_tests" targets from it, because they
had bitrotted slightly and fixing them is its own task.

CanvasKit depends on Skottie and Particles, which depend on
the SkParagraph, SkShaper, SkUnicode, and SkResources modules.

I've structured the BUILD.bazel files in the //modules directory
in a similar fashion as the "hierarchical filegroup"
introduced in https://skia-review.googlesource.com/c/skia/+/543977

Suggested Review Order
 - //modules/skottie/...
 - //modules/skparagraph/...
 - all other modules.
 - Note that modules/canvaskit/go/gold_test_env/BUILD.bazel is
   generated from gazelle, because we like how gazelle handles
   golang files and deps.
 - All other files in any order.

Change-Id: I0aa9e6f81dba2c00f15cae7b19fe49a2027dcf1d
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544676
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2022-05-31 14:14:54 +00:00
Kevin Lubick
5810c7ad0b [bazel] Add new rules for various tools
This adds or fixes rules to build three binaries that previously
had Bazel support.

How we build skslc with Bazel differs from GN in a large way:
GN has a small set of C++ files [1] it compiles in, but with
Bazel that was too hard/clumsy to pipe through (and get the
headers to work well). So, I just had skslc depend on
//:skia_core for simplicity. skslc did need to include something
in //src, so I made a special filegroup for it. For more
complex executables that need more headers from //src, we
should probably make a "src_hdrs" filegroup or something
to expose those. That or a skia_for_tests cc_library that
has all headers as "public".

[1] https://github.com/google/skia/blob/main/gn/sksl.gni#L235
Change-Id: Ie1382e982228059369886f4bfef4947f686b11b5
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544637
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-05-31 14:14:54 +00:00
Kevin Lubick
956704b387 [bazel] Get GPU examples working
This adds targets which test our Dawn, GL, and Vulkan backends.

It follows the hierarchical filegroup pattern, as
outlined in https://skia-review.googlesource.com/c/skia/+/543977

Suggested Review order:
 - tools/sk_app/BUILD.bazel. For many things in tools, I anticipate
   they will depend on //:skia_core and other //tools targets.
   sk_app shows this off, as well how to make the target
   specific to a given platform and pull in the proper native code.
   I'm trying out setting test_only = True, to see if we can
   partition Skia's tests and helpers from the actual Skia library.
 - other changes to //tools/, especially looking at sk_app's
   dependencies.
 - //example/BUILD.bazel. This uses the cc_binary_with_flags which
   existed previously [1] to make it so people don't have to
   specify all the flags for a given binary and can build it as is.
   These targets nows how up in //bazel/Makefile
 - //include/... and //src/..., where some typos from previous
   CLs were fixed and rules expanded.
 - Misc changes to .cpp files to remove unnecessary includes
   that were assuming the GL backend was being compiled in.
 - All other changes

[1] 162dfca340/bazel/cc_binary_with_flags.bzl
Change-Id: Ieacec464d44368cad0da0890c7dc85a6c0b900c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544317
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2022-05-31 14:14:54 +00:00
Kevin Lubick
2c65579aad [bazel] Add in hierarchical filegroup Bazel rules.
The primary goal of this organization structure is to keep
our top level BUILD.bazel file short, with as little logic
as feasible. The logic required to control which files to
include, which third_party deps are needed, what system libraries
should be linked again, etc, should be in the BUILD.bazel
file best should be as close to the affected files as feasible.

In essence, we use filegroup() rules to bubble up the files
needed to build Skia (all as one big cc_library call) and
cc_library rules to bubble up the other components needed to build.

For example, //src/ports/SkFontHost_FreeType.cpp needs FreeType,
but only if we are compiling Skia with that type of font
support. With the new organization structure in this CL,
//src/ports/BUILD.bazel should have the logic that determines
if the cpp file should be included in the build of Skia and
if it is, that the Skia build should depend on //third_party:freetype2

Another example is //src/gpu/ganesh/BUILD.bazel, which
chooses which of the dawn, gl, vulkan, etc backend sources,
and the associated dependencies to include in the build.
It does not specify what those are, but delegates to the
BUILD.bazel files in the subdirectories housing the
backend-specific code.

The structure guidelines for BUILD.bazel files are as follows:
 - Have a filegroup() called "hdrs" (for public headers) or
   "srcs" (for private headers and all .cpp files) that is
   visible to the parent directory. This should list the
   files from the containing directory to include in the
   build.
   See //include/core/BUILD.bazel and //src/effects/BUILD.bazel
   as examples.
 - filegroup() rules can list a child directory's "hdrs"
   or "srcs" in their "srcs" attributes, but should not contain
   select statements pertaining to child directory files.
   See //include/gpu/BUILD.bazel and //src/gpu/ganesh/BUILD.bazel
   as examples.
 - May have a cc_library() called "deps". This can specify
   dependencies, cc_opts, and linkopts, but not srcs or hdrs. [1]
   See //src/codec/BUILD.bazel as an example. These should
   be visible to the parent directory.
 - "hdrs", "srcs", and "deps" for the primary Skia build
   (currently called "skia_core") should bubble up through
   //include/BUILD.bazel and //src/BUILD.bazel, one directory
   at a time.

This CL demonstrates a very basic build of Skia with many features
turned off (CPU only, no fonts, no codecs). Follow-on CLs will
add to these rules as more targets are supported. See bazel/Makefile
for the builds that work with just this CL.

Suggested Review Order:
 - //BUILD.bazel to see the very small skia_core rule which
   delegates all the logic down stack. Note that it has a
   dependency on //bazel:defines_from_flags which will set
   all the defines listed there when compiling all the
   .cpp and .h files in skia_core *and* anything that depends
   on skia_core, but *not* //src:deps.
 - //include/BUILD.bazel and other BUILD.bazel files in the
   subdirectories of that folder. Note that the filegroups in
   //include/private/... are called "srcs" to be similar to
   how Bazel wants "private headers" to be in the "srcs" of
   cc_library, cc_binary, etc. and only public headers are
   to be in "hdrs" [2].
 - //src/BUILD.bazel and other BUILD.bazel files in the
   subdirectories of that folder. //src/gpu/ganesh/...
   will be filled in for dawn, vulkan, and GL in the next CL.
 - //PRESUBMIT.py, which adds a check that runs buildifier [3]
   on modified BUILD.bazel files to make sure they stay
   consistently formatted.
 - //bazel/... to see the new option I added to make sksl
   opt-in or opt-out, so one could build Skia with sksl,
   but not with a gpu backend.
 - Misc .h and .cpp files, whose includes were removed if
   unnecessary or #ifdef'd out to make the minimal build
   work without GPU or SkSL includes.
 - //bazel/Makefile to see the builds that work with this CL.

[1] Setting srcs or hdrs is error-prone at best, because those
   files will be compiled with a different set of defines than
   the rest of skia_core, because they wouldn't depend on
   //bazel:defines_from_flags.
[2] https://bazel.build/reference/be/c-cpp#cc_library.hdrs
[3] https://github.com/bazelbuild/buildtools/releases
Change-Id: I5e0e3ae01ad42d672506d5aad1239f2512188191
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543977
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-05-31 14:14:54 +00:00
Kevin Lubick
4511c7b7fb [bazel] Delete gazelle-based BUILD.bazel files
gazelle ended up being more liability than asset for our C++ rules.

It required devs to manually run the command frequently (and was
easy to forget until the CQ failed). The fact that we still had to
edit the source files (e.g. the "srcs" cc_libraries) meant that
the mixture between generated and hand-written caused some
tension (see include/third_party/vulkan for a good example).

The combination of gazelle and our IWYU enforcement added several
bits of churn without any real benefit. The generated rules
also didn't help identify cases where we were not keeping tight
boundaries (e.g. non-gpu code and gpu code).

Identifying third_party deps automatically ended up being trickier
than anticipated (see the deleted //third_party/file_map_for_bazel.json)

Using the "maximum set of dependencies" worked ok, but ended up
increasing build time unnecessarily. For example, compiling
CanvasKit for WebGL always needed to compile Dawn because
SkSLCompiler.cpp sometimes needs to include tint/tint.h.

Follow-up CLs will rebuild the BUILD.bazel rules without gazelle.

Note to Reviewers:
 - The only file worth manually reviewing here is bazel/Makefile.

Change-Id: I36d6fc3747487fabaf699690780c95f1f6765770
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543976
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-05-31 14:14:54 +00:00
Brian Salomon
790e8cc4e3 Don't take initial buffer data in GrGpu::createBuffer.
Bug: skia: 12720
Change-Id: I1d025689e4c977fe487989f8c7a3200b3c9c9e1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544245
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-05-31 14:10:16 +00:00
John Stiles
0b1384de5a Disable Control-Flow Integrity in SkTArray when casting buffer to T*.
We disable Control-Flow Integrity sanitization (go/cfi) when updating
the item-array buffer. CFI flags this code as dangerous because we are
casting `buffer` to a T* while the buffer's contents might still be
uninitialized memory. When T has a vtable, this is especially risky
because we could hypothetically access a virtual method on fItemArray
and jump to an unpredictable location in memory. Of course, SkTArray
won't actually use fItemArray in this way, and we don't want to
construct a T before the user requests one. There's no real risk here,
so disable CFI when doing these casts.

Change-Id: I5708053339f4a600b12c841fcd38880f9932f7d6
Bug: skia:13339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542643
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-05-31 13:42:02 +00:00
Kevin Lubick
0582a9e619 [bazel] Document need for --cc_output_directory_tag
Change-Id: Ia47d3a3e9c23b63b1651dc1f638d917b3c302911
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544636
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
2022-05-31 12:56:26 +00:00