Commit Graph

60521 Commits

Author SHA1 Message Date
Brian Osman
2537af901d Replace SPIRV generator's intrinsic map with a simple switch
On a Linux x64 build, this saves ~17 KB of code size.
It also reliably makes all sksl_spirv_ benchmarks faster.

Change-Id: If4a0f7cc320eb73017791d2e09127f96addec629
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538044
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-06 19:27:10 +00:00
Herb Derby
9f44b7fa84 Have processGlyphRun take a glyphRunList, and rename function
Rename processGlyphRun to categorizeGlyphRunList. Change processing
a single glyph run to processing the entire list. By taking
an SkGlyphRunList the code will have access to the buffers it needs
for processing when I move the buffers to the builder.

Clean up - remove some unneeded includes.

Change-Id: I2ce66292b7e63b9cbc63610ba9653b255417d7c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538037
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-05-06 19:25:47 +00:00
James Godfrey-Kittle
5d553ed398 Fix presubmits for Python 3
Calls to "python" won't work on vanilla MacOS installs (nor many
distributions of Linux), and AFAICT we're assuming it refers to python3
anyways.

xreadlines was removed in Python 3, and the suggested equivalent is to
use the file directly as an iterator:
https://docs.python.org/2.7/library/stdtypes.html#file.xreadlines

Change-Id: Iae51e3923e38ea63f857a17b9ff80e79871efee5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537982
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
2022-05-06 18:48:47 +00:00
Robert Phillips
b346e421a7 Add FailFlushTimeCallbacks jobs
Bug: 1320964
Change-Id: I5f05ea469b824b1382f64c1eb3fb9be0498cf329
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537517
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-05-06 18:37:51 +00:00
Herb Derby
0dcb88b44c Encapsulate a pointer to the Builder in the GlyphRunList
The canvas contains the builder. By passing a pointer to the
builder with the GlyphRunList, we can add the machinety for
building SubRuns in future CLs.

Currently, all the buffers needed for building SubRuns are
maintained in the Device for CPU and the SurfaceDrawContext
for GPU. Because of the Layer mechanism in the API this means
we can have multiple sets of buffers. By moving the buffers to
the builder, there will be only one set, and the memory will
be hotter.

Change-Id: I47223b0dcfbab7d9b383d8410bb8d8e897706dd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537776
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-05-06 18:17:48 +00:00
Kevin Lubick
3413ca474b [infra] Add BazelBuild task to build CanvasKit on the CI with Bazel
For additional context, see "Codifying Certain Build Options"
and "Building on the CI" in the design doc go/skia-bazel

Suggested review order:
 - builder_name_schema.json to see the three required and
   one optional part of BazelBuild jobs.
 - jobs.json to see one new BazelBuild job added. In an
   ideal world, this job would have been named
   BazelBuild-//modules/canvaskit:canvaskit_wasm-debug-linux_x64
   but Buildbucket (?) requires jobs match the regex
   ^[a-zA-Z0-9\\-_.\\(\\) ]{1,128}$
   so we use spaces instead of slashes or colons.
 - gen_tasks_logic.go; noting the makeBazelLabel function
   expands most of the spaces to / and the last one to a
   colon to make a single-target label. If there are three
   dots, then it is a multi-target label, and we do not
   need to add a colon.
 - bazel_build.go; This is a very simple task driver, and
   I do not anticipate getting too much more complex.
   The place where we decide which args to augment
   a build with depend on the host platform and thus
   should be set in gen_tasks_logic.go.
 - bazel/buildrc to see some initial configurations set,
   one of which, "debug", is used by the new job.
   The "release" version of CanvasKit probably works on
   3.1.10 which had a bugfix, but we are still on
   3.1.9
 - .bazelrc to see a rename of the linux-rbe config to
   linux_rbe (our configs should have no dashes if
   we want to specify them verbatim in our Job names).
   It also imports the Skia-specified build configs
   from //bazel/buildrc and supports the user-specified
   //bazel/user/buildrc file if it exists.
 - All other files in any order.

Change-Id: Ib954dd6045100eadcbbf4ffee0888f6fbce65fa7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537797
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-05-06 17:54:08 +00:00
Robert Phillips
4ff975ccd2 Make the old-skp job's output match the size of the DDL jobs' output (take 2)
Bug: skia:13278
Change-Id: I06d0551a2f2b50e584e6bb547c22bf6e76a9ea2c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537800
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-05-06 16:31:45 +00:00
Kevin Lubick
2f576263e4 Reland "[infra] Use Python3 for our Presubmits"
This is a reland of commit 094bcdb9e5

Original change's description:
> [infra] Use Python3 for our Presubmits
>
> https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_support.py;l=319;drc=443d9135cc33f3156d5fe25ebec33f9adffbab65
>
> This also makes any errors from `make train -C infra/bots`
> look well formatted because check_output returns a bytestring
> in Python3 and when that is printed, the newlines et al are not
> rendered correctly. Thus we want the output of check_output
> to be encoded to UTF-8.
>
> Without setting the USE_PYTHON3 = True in PRESUBMIT.py,
> it appears that `git cl upload` would try to run our
> infra_tests.py in Python2 mode, which does not have
> the encoding argument for check_output.
>
> Apparently cipd_bin_packages/vpython3 does not have the
> "six" package installed (but cipd_bin_packages/vpython does)
> so I replaced the six.StringIO with io.StringIO, which
> is where that is located in Python3.
>
> Change-Id: Ic8f61bf943531583ba3d110a85260d69bdbf5eb2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537677
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>

Change-Id: Ia7fb2f3b6d8b70ca95cf10763782d4a0122053e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537978
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-05-06 14:01:35 +00:00
Robert Phillips
2f60656f83 Remove unused renderTask ID span parameter to pre- and post-Flush callbacks
I don't know if we ever actually used this feature. Removing it removes
and needless loop over all the render tasks.

Change-Id: Ife8014c45a34fdec743227dea09e440e0d1d9ea3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537516
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-05-06 13:57:51 +00:00
skia-autoroll
d77f5acbcd Roll vulkan-deps from 46b00d7bf03f to 65a0abb71586 (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/46b00d7bf03f..65a0abb71586

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 jlavrova@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: jlavrova@google.com
Change-Id: I66743dc776ba20a52161a80d294f3b911dacd648
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/538056
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-06 10:55:47 +00:00
skia-autoroll
080fe3d744 Roll ANGLE from 9865ed8b8117 to 1d5d09e4191a (14 revisions)
9865ed8b81..1d5d09e419

2022-05-06 syoussefi@chromium.org Vulkan: Prefer MAILBOX over IMMEDIATE present mode
2022-05-05 cclao@google.com Vulkan: Reduce kMaxBufferToImageCopySize to 64M
2022-05-05 cclao@google.com Vulkan: Limit the total bytes of suballocation garbages in flight
2022-05-05 lubosz.sarnecki@collabora.com FramebufferTest: Add FramebufferChangeTest test.
2022-05-05 cnorthrop@google.com Scripts: Strip prebuilt debug APK from AOSP roll
2022-05-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 1c301e690de1 to 7a60295b6324 (184 revisions)
2022-05-05 cclao@google.com Vulkan: Force prune when there are lots of suballocations destroyed
2022-05-05 boliu@google.com Remove limit_max_texture_size_to_4096 workaround
2022-05-05 cclao@google.com Vulkan: Use heuristic to decide how many empty buffers to keep
2022-05-05 lubosz.sarnecki@collabora.com Tests: Add Alto's Odyssey trace.
2022-05-05 pkasting@chromium.org Fixes for C++20 support.
2022-05-05 abdolrashidi@google.com Vulkan: Set timeout for MultiContextDrawWithSwap*
2022-05-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 6db3a94387ed to 1c301e690de1 (550 revisions)
2022-05-05 ynovikov@chromium.org Decommission win7-x86-amd and win7-x64-nvidia

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 jlavrova@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: jlavrova@google.com
Test: Test: ./scripts/roll_aosp.sh and inspect //build
Test: Test: angle_end2end_tests --gtest_filter="FramebufferTest_ES3.FramebufferChangeTest/*"
Test: Test: angle_perftests --gtest_filter="*altos_odyssey*"
Change-Id: I9fb3e027c895be626e0385dcc533a8e56f71c582
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537900
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-06 05:55:46 +00:00
skia-autoroll
39872b74be Roll SwiftShader from 2e793ae08002 to 2400435e05b1 (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/2e793ae08002..2400435e05b1

2022-05-05 amaiorano@google.com Update SPIR-V Headers to b765c355f
2022-05-05 amaiorano@google.com Update SPIR-V Tools to 7014be600
2022-05-05 amaiorano@google.com update-spirvheaders: run Gerrit hook on generated CLs
2022-05-05 amaiorano@google.com update-sprivtools: run Gerrit hook on generated CLs

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 jlavrova@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: jlavrova@google.com
Change-Id: I35d3a6ac4a1cd59029e574b12bcac2c5dc77bce9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537899
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-06 04:45:47 +00:00
Brian Salomon
4cf577899c Add support for GPU-backed buffers to SkCustomMesh.
The client passes a GrDirectContext* when creating a vertex or index
buffer. The data is copied to a GPU accessible buffer object
and the client gets a Skia object that may only be used with the GrDirectContext. The GPU backend draws directly from the buffer, thereby
avoiding the per-draw copy cost.

The underlying Ganesh object is freed in a thread-safe manner using an
existing message bus to perform a delayed unref in GrResourceCache.

Bug: skia:12720
Change-Id: If2578fbbf094874967a294a095b3bc5d7616d73a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527918
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-05-06 00:13:57 +00:00
Michael Ludwig
e706ba895c Move Ganesh tessellation helpers to src/gpu/ganesh/tessellate
Change-Id: I2374fd376f3038e59c82f57c68ac13557058de8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534663
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-06 00:08:59 +00:00
skia-autoroll
0fe311ac02 Roll vulkan-deps from 7727106601af to 46b00d7bf03f (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/7727106601af..46b00d7bf03f

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 2c7fb9707b98 to 7014be600c7a

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 jlavrova@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: jlavrova@google.com
Change-Id: I923968d23f445a07601da141264d3c6d1d250c3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537642
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-05 22:10:46 +00:00
Ravi Mistry
18ac3ef222 Revert "[infra] Use Python3 for our Presubmits"
This reverts commit 094bcdb9e5.

Reason for revert: Breaking Housekeeper-PerCommit-InfraTests_Linux. The bot will have to be updated as part of this change.

Original change's description:
> [infra] Use Python3 for our Presubmits
>
> https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_support.py;l=319;drc=443d9135cc33f3156d5fe25ebec33f9adffbab65
>
> This also makes any errors from `make train -C infra/bots`
> look well formatted because check_output returns a bytestring
> in Python3 and when that is printed, the newlines et al are not
> rendered correctly. Thus we want the output of check_output
> to be encoded to UTF-8.
>
> Without setting the USE_PYTHON3 = True in PRESUBMIT.py,
> it appears that `git cl upload` would try to run our
> infra_tests.py in Python2 mode, which does not have
> the encoding argument for check_output.
>
> Apparently cipd_bin_packages/vpython3 does not have the
> "six" package installed (but cipd_bin_packages/vpython does)
> so I replaced the six.StringIO with io.StringIO, which
> is where that is located in Python3.
>
> Change-Id: Ic8f61bf943531583ba3d110a85260d69bdbf5eb2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537677
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>

Change-Id: I0becb25d155ce0b0281c25d83662f1b01aee8033
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537777
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Ravi Mistry <rmistry@google.com>
2022-05-05 20:54:07 +00:00
Robert Phillips
5a56530bf4 Handle allocation failure in the flush-time preFlush callback
In general, we drop the entire flush when we detect an allocation
failure. This CL makes an allocation failure in the flush-time preFlush
call also drop the entire flush.

Bug: 1320964
Change-Id: Idd2e24fbf5d2083c4fec8de7ccd028897a239b33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536837
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-05-05 20:30:59 +00:00
Michael Ludwig
a6d2bbfd3d Move writePatch() to private now that PatchWriter isn't subclassed
The HW stroke tessellator had subclassed PatchWriter and called
writePatch() directly. Now the fixed-count variants all just use
the trait templates to configure PatchWriter directly.

Bug: skia:13263, skia:13056
Change-Id: I51c674968fe46974b217069909d71446a0d829c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534568
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-05 20:22:54 +00:00
Michael Ludwig
842383b985 Use constants for max parametric segments everywhere
There had been plumbing for variable amounts of segments throughout
the patch writers and shaders because HW tessellation had to limit it
based on what the GPU could handle in its tessellation pipeline.

Now that everything just uses the fixed count approach, we can keep it
all as constants. I considered letting it remain parameterized in the
event we wanted ganesh and graphite to diverge, but figured it was
better to have consistent handling of paths.

Bug: skia:13263, skia:13056
Change-Id: I351d5d762bdab47e4091b18efbd857ac1e500be4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534567
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-05-05 20:04:11 +00:00
Kevin Lubick
094bcdb9e5 [infra] Use Python3 for our Presubmits
https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_support.py;l=319;drc=443d9135cc33f3156d5fe25ebec33f9adffbab65

This also makes any errors from `make train -C infra/bots`
look well formatted because check_output returns a bytestring
in Python3 and when that is printed, the newlines et al are not
rendered correctly. Thus we want the output of check_output
to be encoded to UTF-8.

Without setting the USE_PYTHON3 = True in PRESUBMIT.py,
it appears that `git cl upload` would try to run our
infra_tests.py in Python2 mode, which does not have
the encoding argument for check_output.

Apparently cipd_bin_packages/vpython3 does not have the
"six" package installed (but cipd_bin_packages/vpython does)
so I replaced the six.StringIO with io.StringIO, which
is where that is located in Python3.

Change-Id: Ic8f61bf943531583ba3d110a85260d69bdbf5eb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537677
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2022-05-05 20:01:29 +00:00
Kevin Lubick
a683fe6c00 [canvaskit] Deploy 0.34.0
Change-Id: I0afd3eae5bfdc3b64158771fe1d6100552d99c07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537676
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-05-05 19:35:46 +00:00
Jim Van Verth
a924d7293a Move BulkUseUpdater to AtlasTypes.
This, combined with moving the def for GlyphVector::regenerateAtlas to
a Ganesh-only cpp file, allows us to move GlyphVector into the shared
gpu GN group.

Bug: skia:13118
Change-Id: I59b91f8406ac31f105f10fcddf6d0076d35c5bd9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537459
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-05-05 19:21:17 +00:00
Ben Wagner
f7daa168cb Allow use of ASAN with msvc.
Starting with Visual Studio 2019 version 16.9 (msvc++ 14.28,
__MSC_VER 1928) has support for it's own version of AddressSanitizer.

Change-Id: I106b7e765ac80e4fc6eabd5b88500cbec5e38714
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537461
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-05-05 19:04:23 +00:00
Ben Wagner
e3f2cfc2a4 FreeType configuration in public_defines.
Any settings in the FreeType build which may modify the public FreeType
headers must be public_defines. Otherwise FreeType may be built one way
and the dependents on this target may be built with what are essentially
different headers.

This fixes the Skia build with built-in FreeType on Windows.

Change-Id: I6b317fbe491dd6fdd135928b6f50436102a1e281
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537460
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-05-05 18:40:49 +00:00
Herb Derby
2008355f1e Remove default ctor for SkGlyphRunList
In preparation for making GlyphRunList handle the drawing buffers.
When handling the drawing buffers, there will no longer be
an empty glyph run list.

Change-Id: I7b3ff1bffc5e684515daabfa7601df0e107082f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537458
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-05-05 18:40:19 +00:00
Robert Phillips
e533c9bfd5 Make the old-skp job's output match the size of the DDL jobs' output
This CL could, arguably, confuse the issue wrt why these images are
being generated but making the sizes match will make the images easier
to triage.

Bug: skia:13278
Change-Id: Ifb0b82eaaa4351fb589118d3b28673da9dd32e20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537576
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-05-05 18:35:38 +00:00
Brian Salomon
437cd4d857 Make unref messages to GrResourceCache work with all resource types.
Previously we made them texture-only to fix an upcast that occurred
through a virtual inheritance link on a pointer to a deleted object.

This change changes the mechanism such that the sender of the message
maintains a ref that is moved into the sent message. The upcast happens
during creation of the message and thus before the resource is deleted.

The motivation is to use this for SkCustomMesh vertex/index buffers.

Bug: skia:13036
Change-Id: I0990eaed0d736257e1b19e9819e0dac8a9af8c18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537084
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-05-05 18:35:07 +00:00
Jim Van Verth
35e1ca4b3b Move more GPU text classes to sktext::gpu namespace.
Moves GlyphVector, TextStrike, StrikeCache, and SubRunAllocator.

Bug: skia:13118
Change-Id: Ifa4957b5cff280f44606dc62bfd30f6a03063c07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536102
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-05-05 16:10:24 +00:00
Kevin Lubick
8d2fb64247 [canvaskit] Always serialize Typeface data into SKPs
Before: http://screen/4gnRTnRGyBuEsA9
After: http://screen/5jdoRcED7X3Taf7

There's a few misc fixes related to Bazel rules and tests too.

Change-Id: I2ac272fe5312c2a825944259f2f9031fff9887e0
Bug: skia:13247
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535477
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-05-05 15:43:32 +00:00
Aditya Kushwah
1fb7b3d701 Plumb label through createTextureCommon.
In this CL, the labels will be plumbed through createTextureCommon,
into onCreateTexture, and then passed to the various Gr*Textures
constructors.

Bug: chromium:1164111

Plumb label from GrGpu's createTexture function.

In this CL, GrResourceProvider's functions, like createTexture etc,
get label string passed to it which are called from GrGpu which then
passes the label to setLabel method of GrGpuResource by making use of
intermediate GrGpuResourcePriv class.

Bug: chromium:1164111
Change-Id: I068a4b4bf3db8efa099bf742efce592f73a3008a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536879
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-05-05 15:21:23 +00:00
Michael Ludwig
9a393dd52b Move fixed-count constants into Tessellation.h
With HW tessellation removed, fixed-count is the only version of this
approach, so the fixed-count-only constants can be part of
Tessellation.h, leaving FixedCountBufferUtils.h purely for creating the
vertex/index buffers.

Bug: skia:13056, skia:13263
Change-Id: I413a9ebe19fe4427e1ebacee7484d57377abf44e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534563
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-05-05 13:18:42 +00:00
skia-autoroll
d7ddbe668d Roll vulkan-deps from 40f4358a2a69 to 7727106601af (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/40f4358a2a69..7727106601af

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 jlavrova@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: jlavrova@google.com
Change-Id: Ic0bc50be956a434ee300bf83ae5c70c35d3391f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537376
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-05 09:29:47 +00:00
skia-autoroll
f19b77ef14 Roll ANGLE from edd331ebeef5 to 9865ed8b8117 (7 revisions)
edd331ebee..9865ed8b81

2022-05-04 doughorn@google.com Check in //build files needed.
2022-05-04 antonio.caggiano@collabora.com Vulkan: Wayland dmabuf extensions
2022-05-04 jmadill@chromium.org Re-land: "Vulkan: Cache ImageView serials on texture changes."
2022-05-04 amaiorano@google.com Fix build flags not in declare_args when angle_has_build is true
2022-05-04 syoussefi@chromium.org Presubmit: Verify comment before new tests
2022-05-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from cdf43bd816d7 to 643179694ec7 (4 revisions)
2022-05-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 55c89a3a09ac to 6db3a94387ed (508 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 jlavrova@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: jlavrova@google.com
Test: Test: ./scripts/roll_aosp.sh
Change-Id: Ifc877e4a834192b5ac7ef39b064b8084879a6e48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537224
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-05 05:59:46 +00:00
skia-autoroll
33cedc38f2 Roll SwiftShader from ae17ef6d12d8 to 2e793ae08002 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/ae17ef6d12d8..2e793ae08002

2022-05-04 pkasting@chromium.org Remove use of std::iterator, which is gone in C++20.
2022-05-04 capn@google.com Always enable MemorySanitizer instrumentation for compute routines

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 jlavrova@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: jlavrova@google.com
Change-Id: I5dd6d50cf096603c886900360f1dcff36225689d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537223
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-05 04:49:21 +00:00
Peter Kasting
5d969e3dd9 Fix to allow building in -std=c++20 mode.
Various kinds of math with enums are deprecated, so switch to
constexprs.

Bug: chromium:1284275
Change-Id: I7ec0aa493b170538170f2a9f3262e7bed870c568
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536886
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-05-04 20:58:16 +00:00
skia-autoroll
20d0b4301a Roll vulkan-deps from 1ebd98d952fa to 40f4358a2a69 (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/1ebd98d952fa..40f4358a2a69

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 58dc37ea6af7 to 2c7fb9707b98

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 jlavrova@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: jlavrova@google.com
Change-Id: I41ef8cab2893e34c95602adeefb8ca12fc93c43a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537220
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-04 20:52:26 +00:00
Michael Ludwig
de436b3d92 Remove HW tessellation related caps
Bug: skia:12198
Change-Id: I6f69ba61fc15ce21963875e7b8ad0fac9d8d9430
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533701
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-05-04 20:51:27 +00:00
Michael Ludwig
e8968dce7a Remove HW tess info from GrProgramInfo and related types
Bug: skia:13263
Change-Id: I2289895e49d32664653165b8c1e29968edd3e0a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/533700
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-04 20:26:12 +00:00
Brian Osman
38d4fdebbb Remove all CommandBuffer support code
Bug: skia:13040
Change-Id: I1749f21162ea400a8b8fb00ed52e6024eb658d52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537082
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-04 20:19:17 +00:00
Michael Ludwig
7ace65de40 Remove tessellation backdoor in GrGeometryProcessor
Bug: skia:13263, skia:12198
Change-Id: I70988b765dc21e7c8728ea614c0974f9696eac33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534203
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-05-04 19:17:06 +00:00
Brian Osman
2e1cc9a946 Remove recipes code for RecreateSKPs bot, as well as chromium DEPS entry
Change-Id: I1ca07f97757f70debc0589648a57ba10b1729636
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537081
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2022-05-04 18:16:26 +00:00
Jorge Betancourt
b894c69abb set up tools for building Skia on Mac semi hermetically
Reviewer notes:
PS1 and PS2 handle everything up to the linking stage of the build
PS6 and PS7 are trivial renamings and rebases, diff between Base->PS5 for a cleaner review

No-Try: true
Change-Id: Ib21ce2e8839ecd4b4dd57280e82f56a98194e476
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532765
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-05-04 16:56:46 +00:00
Ravi Mistry
ec6cc1f422 Use the correct SKP asset number in OldestSupportedSkpVersion bot
Bug: skia:13278
Change-Id: Iefa842284b757f2908c4d5de6490033c68c9206a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536640
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2022-05-04 16:44:41 +00:00
Brian Salomon
60f2da5d15 Add buffer API to SkCustomMesh.
SkCustomMesh is a class with factory functions. Vertex and index
data are stored in buffer objects rather than raw pointers. User can
provide offsets into the buffers.

Currently the buffers are always CPU backend and are uploaded to the
GPU on each draw. However, buffer the creation API takes a
GrDirectContext which in the future will be used to create a GPU-backed
buffer specific to the passed context.

Bug: skia:12720
Change-Id: If1bb8110f0f2f219b030f9682ab844f1f2207d9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527917
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-05-04 16:29:27 +00:00
Brian Osman
4bec8d8ea2 Remove CommandBuffer bots and supporting code from infra scripts
Bug: skia:13040
Bug: skia:9235
Bug: skia:10412
Bug: skia:12437
Change-Id: Ia96f8332b5372ecf65cb20ffb9549bc0dc8f931b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537080
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-04 16:11:31 +00:00
Michael Ludwig
05a78241e5 Remove branch in robust_normalize_diff function
This removes one branch, one normalize, one max, and switches to
dividing by the magnitude once, instead of doing it twice; invMag may
not be exact but it's accuracy should be similar to doing the divide
directly.

I changed the magnitude scaling to happen after subtracting the two
points, since this was a better balance between dealing with points
that had really large coordinates, and points that differed by epsilon
(where upon dividing the original coordinate value would lose that
precision, but doing it after the subtraction preserved the
direction).

At the very least, this does not cause the accuracy failures for large
coordinates that I was seeing before robust_normalize_diff was first
added, and it avoids issues with epsilon sized stroke rectangles that I
ran into when evaluating other optimization variants of this function.

Bug: skia:13275
Change-Id: I07862b80b67ef905fce2aeeeabed3e907a63796a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535438
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-05-04 15:56:20 +00:00
Brian Osman
6e517a9d7f Add dylib flag to DM
Change-Id: Ib81dc1f0c77a8300b20105612b7310d69027ea29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537077
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-05-04 15:17:54 +00:00
Kevin Lubick
269e687f4f [bazel] Make PRESUBMIT ignore deleted BUILD.bazel files
Change-Id: Ia1d43e4814eb23fc111df0c1800425272337936c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536639
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-05-04 15:12:21 +00:00
Florin Malita
722d1c0679 SkM44::LookAt: handle zero-length vectors gracefully
Zero-length vectors cannot be normalized.

Bug: oss-fuzz:38738
Change-Id: I6c5f4114f70a8a9f03afc1cd70c871e6b6b520ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536637
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-05-04 15:05:35 +00:00
Brian Osman
efb1290cdf Add Mac ANGLE test bots
Bug: skia:13272
Bug: skia:13289
Bug: skia:13290
Bug: angleproject:7145
Bug: angleproject:7245
Change-Id: I2d56408126bcd40f0aba66b14020cb8e04624c2c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536497
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-05-04 14:55:27 +00:00