Commit Graph

59169 Commits

Author SHA1 Message Date
John Stiles
afb651172e Remove string_view + string_view concatenation function.
std::string is less permissive than SkSL::String about concatenation.
This change is a step towards eliminating SkSL::String.
(We couldn't continue using this technique for std::string, as it's
undefined behavior to add our own methods inside namespace std.)

Change-Id: I21e421182be23d3033f827758ea2b2c01fa99d26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503341
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-02-02 21:43:48 +00:00
Greg Daniel
27303250dd Revert "Add SkSurface resolve function."
This reverts commit d921f21fbc.

Reason for revert: New test breaking GL android bots

Original change's description:
> Add SkSurface resolve function.
>
> This will insert a resolve msaa call into the stream of commands for
> the SkSurface. This is mostly useful for cases when a client wraps the
> resolve texture but has Skia draw with MSAA, and the client wants to
> make sure Skia resolves to their wrapped texture.
>
> Bug: chromium:1292418
> Change-Id: I6eddae967136716b9215fcd96e7d77a2457efdf2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503340
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

Bug: chromium:1292418
Change-Id: I86e5f82f0e2a0921906c0caba964929750500965
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503350
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-02 21:26:13 +00:00
Kevin Lubick
de29ec3ac6 [canvaskit] Add 1d and 2d PathEffects to API
Change-Id: I7858d5bb4dd3425557b801782880476f983e1fe2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503416
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-02-02 20:00:20 +00:00
Greg Daniel
d921f21fbc Add SkSurface resolve function.
This will insert a resolve msaa call into the stream of commands for
the SkSurface. This is mostly useful for cases when a client wraps the
resolve texture but has Skia draw with MSAA, and the client wants to
make sure Skia resolves to their wrapped texture.

Bug: chromium:1292418
Change-Id: I6eddae967136716b9215fcd96e7d77a2457efdf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503340
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-02-02 19:55:40 +00:00
John Stiles
a3b11365b4 Update RecursiveComparison tests to run on GPU.
These tests are not guaranteed to pass in ES2 (as ES2 specifically does
not require NaN to be implemented), so they are now run in GPU+ES3 and
on the CPU.

Change-Id: Ica78e15a06b3b00b651c5fabd0decf751853a83f
Bug: skia:12858
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501238
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-02 19:39:00 +00:00
Greg Daniel
55a69d1de0 [graphite] Store ResourceProvider on Recorder instead of Gpu.
By being on Recorder, more calls can directly access the ResourceProvider
without needing the Context or Gpu. A different ResourceProvider is
created for each Recorder. Each ResourceProvider stores a ref to the
GlobalCache so that it can access shared resources. Eventually each
ResourceProvider will also have its own ResourceCache for all non shared
Resources.

A big win of this change is that Context can be removed from Recorder.

Bug: skia:12754
Change-Id: Ib6ac71c617de4d6b6b2ac4956580e65d4d7e6f7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502637
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-02-02 19:34:39 +00:00
Michael Ludwig
aee42fccd0 Reland "Move last join control point storage into PatchWriter"
This reverts commit 35e34d8db2.

Reason for revert: circles were corrupting join point; fix in PS1->PS2

Original change's description:
> Revert "Move last join control point storage into PatchWriter"
>
> This reverts commit 1f1270f8ac.
>
> Reason for revert: unexpected gold diffs crept in after PS2...
>
> Original change's description:
> > Move last join control point storage into PatchWriter
> >
> > Change-Id: I916c23778e04911ea122720b8e48850caab4df64
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501437
> > Reviewed-by: John Stiles <johnstiles@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> Change-Id: I143a6a16e2ecef735f5c67995e92d315ab463121
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502697
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Change-Id: I4bd7479da9d5bcb15a3ce6cef25fdda97aa25d3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502785
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Christopher Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-02 19:33:53 +00:00
Chris Dalton
92c624fe85 Use FillRRectOp in drawStrokedLine for dmsaa
This makes it so we don't trigger msaa in drawStrokedLine anymore.

Bug: skia:skia:12872
Change-Id: Id68b55ba9e3989f2a775affe9a1b20bf3186123c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502816
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Christopher Dalton <csmartdalton@google.com>
2022-02-02 19:07:39 +00:00
Jim Van Verth
3a52187f62 DrawPoints: Don't render NaN/infinite point data.
Bug: oss-fuzz:43679
Change-Id: Iff85dc7ee802672ddf31bd09884aa9f36fd2870f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503157
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-02-02 19:04:46 +00:00
John Stiles
a2018c274c Simplify string handling for invokeChild.
GrFragmentProcessor::invokeChild now takes a string_view for the coords
instead of a String. This reduces copying while still allowing a String
to be passed in without casts/conversions.

Change-Id: I311eedda0ae2de8258c7b3a28420c152626401b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503337
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-02 18:00:28 +00:00
Brian Osman
73262111f5 Revert "Reland "Remove skstd::optional entirely.""
This reverts commit d161e2f6ec.

Reason for revert: Need to wait for Flutter fix to roll into Google3.

Original change's description:
> Reland "Remove skstd::optional entirely."
>
> This reverts commit 98e51006b9.
>
> Flutter fix: https://github.com/flutter/engine/pull/31193
>
> Original change's description:
> > Revert "Remove skstd::optional entirely."
> >
> > This reverts commit 17d0fc087c.
> >
> > Reason for revert: flutter still uses the skstd class
> >
> > Original change's description:
> > > Remove skstd::optional entirely.
> > >
> > > Skia now uses C++17's std::optional.
> > >
> > > Change-Id: I387069589baaefadd25e25bcec3f4cc6ee6fd090
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501477
> > > Reviewed-by: Ben Wagner <bungeman@google.com>
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> > > Commit-Queue: John Stiles <johnstiles@google.com>
> > > Auto-Submit: John Stiles <johnstiles@google.com>
> >
> > Change-Id: I2c001588007640ac7b8c9f0760038b46c220a07e
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502702
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
>
> Change-Id: Ia0cd41eda845b02f518c501a23293d344756a4eb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502703
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: I8f89412292ba5dfe955c3f44c403c3c232cdad2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503336
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-02 16:49:05 +00:00
John Stiles
aebd6c0064 Remove skstd::conjunction.
Change-Id: I82be2c8a825a070024748f8a1c6449ce508efdc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503156
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-02 16:14:10 +00:00
Kevin Lubick
dba5d2c97c [ck] Expose ParagraphBuilderImpl::Reset to CanvasKit
See also https://skia-review.googlesource.com/c/skia/+/499236

Bug: https://github.com/flutter/flutter/issues/97182
Change-Id: Ib905b0e2dc62b8eae6d24d116ed4e1f5bf6614e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499877
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2022-02-02 15:54:21 +00:00
Kevin Lubick
805acda3f3 [fuzzer] Remove GL from (now-Vulkan) build
The fuzzer runs against the Vulkan version of Swiftshader.
There are no libGL.so (etc) on the fuzz runtime, so we
want to avoid linking against those.

The GL code that is #ifdef'd out is still necessary to
avoid timeouts on TSAN with our NVIDIA jobs.
https://skia-review.googlesource.com/c/skia/+/502638

Procedure for testing this locally (and iterating):
  1. In oss-fuzz checkout, run
     `python infra/helper.py shell skia`
     to pull up local interactive version of Docker
     fuzzer build image.
  2. Run `compile` in fuzzer shell. Stop after
     the swiftshader compiles and is copied into /out
     with Ctrl + C.
  3. Comment out the swiftshader compilation part [1]
     (no need to re-do this when modifying Skia code).
     `apt-get install nano -y`
     `nano ../build.sh`
  4. Make change to Skia repo using normal methods.
  5. Run the following in the Skia repo
     `git diff origin main > foo.patch`
     Copy the patch into the Docker shell using Ctrl+C
     and nano.
  6. Apply the patch inside the Docker shell
     `git apply foo.patch`
     and re-compile (which should skip right to
     building the fuzzer libs)
     `compile`
  7. Repeat 4-7 or make small changes directly in
     the Docker shell via nano.
  8. When compilation and link succeeds, run
     `ldd /out/api_mock_gpu_canvas`
     to verify GL and friends were not dynamically linked.

[1] https://github.com/google/oss-fuzz/pull/7214/files#diff-76f13875e33875cdd372f1f0933206be599cd87952f1bd1eaa57ca928ee9e3e1R49-R53

Change-Id: Idf569820527c1304b0e5a68fd36295be89dfa2a0
Bug: oss-fuzz:44132
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503016
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-02 15:43:47 +00:00
Robert Phillips
80428f7c2e [graphite] Pass SkUniforms around as an SkSpan
Bug: skia:12701
Change-Id: Iee63650517a739029f81121cabd45dfcc2e8fa38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502698
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-02 15:31:13 +00:00
John Stiles
e572d5b672 Convert SkSL::to_string to skstd::to_string.
Other than the `float`/`double` overloads, the only value-add of these
methods is to cast the result of `std::to_string` to `SkSL::String`.
When `SkSL::String` is removed, these no-op calls can be replaced with
direct calls to `std::to_string` instead. (The float overloads can
continue to live in `skstd` since their output isn't the same.)

Change-Id: I4df841403114b401ad58017f0264a246fef341af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502786
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-02 15:26:17 +00:00
Evgenii Kliuchnikov
0dae2e870d Add MVP implementation of JPEGXL decoder.
Change-Id: I90140348eeb87c849a857a12008c201efc9e328d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482596
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-02 15:17:14 +00:00
John Stiles
d161e2f6ec Reland "Remove skstd::optional entirely."
This reverts commit 98e51006b9.

Flutter fix: https://github.com/flutter/engine/pull/31193

Original change's description:
> Revert "Remove skstd::optional entirely."
>
> This reverts commit 17d0fc087c.
>
> Reason for revert: flutter still uses the skstd class
>
> Original change's description:
> > Remove skstd::optional entirely.
> >
> > Skia now uses C++17's std::optional.
> >
> > Change-Id: I387069589baaefadd25e25bcec3f4cc6ee6fd090
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501477
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
>
> Change-Id: I2c001588007640ac7b8c9f0760038b46c220a07e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502702
> Auto-Submit: John Stiles <johnstiles@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Change-Id: Ia0cd41eda845b02f518c501a23293d344756a4eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502703
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-02 14:59:45 +00:00
Robert Phillips
3998cdea26 [graphite] Expand GradientData to include everything needed for uniform generation
Bug: skia:12701
Change-Id: Ib081e07731d30d5da19fef9191958ee3ee3a23a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502777
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-02 14:34:17 +00:00
John Stiles
f34afe8725 Convert appendf and vappendf to static methods.
This will make it easier to migrate from SkSL::String to std::string.
These methods can then continue to exist as free functions.

Change-Id: I9f6799788aaf42f4a95c6df03d01f9e123ae52c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502783
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-02 14:18:24 +00:00
John Stiles
127d22edc3 Remove starts_with and ends_with from SkSL::String.
std::string::starts_with will be available in C++20. In the interim,
prefer using a free function in skstd. This puts us a small step closer
towards removing SkSL::String.

Change-Id: I8c6b33d94c51a643d8cb99ac4c4b1c0556cb9170
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502782
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-02 14:14:49 +00:00
Herb Derby
904d26fab4 use SDFTSubRun for Slugs; remove SDFTSubRunSlug
Change-Id: Ie4b64393df378821d55f0eb96f52aff26734911c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502781
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-02 13:52:16 +00:00
skia-autoroll
eccf8a03ad Roll ANGLE from f810e9989932 to fe56532f503c (15 revisions)
f810e99899..fe56532f50

2022-02-02 syoussefi@chromium.org Vulkan: Enable ANGLE_texture_multisample
2022-02-02 cclao@google.com Vulkan: Add a dedicated suballocation garbage list
2022-02-01 jmadill@chromium.org Vulkan: Initialize exectuable with invalid uniform serial.
2022-02-01 syoussefi@chromium.org Vulkan: Fix vkCmdResolveImage extents
2022-02-01 cclao@google.com Vulkan: Cache commonly used 6 ushorts stream index array data
2022-02-01 b.schade@samsung.com Vulkan: Add support for OES_primitive_bounding_box
2022-02-01 b.schade@samsung.com Translator: Emit warning when identifier has double underscores
2022-02-01 jmadill@chromium.org Vulkan: Fix off-by-one in DynamicBuffer.
2022-02-01 wez@chromium.org [fuchsia] Don't try to use calling executable path to load .so's
2022-02-01 jmadill@chromium.org Vulkan: Fix image base/max level respecification case.
2022-02-01 b.schade@samsung.com Vulkan: Fix incorrect gl_SamplePosition on ES3.2
2022-02-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 4db20a80409b to 4998c7b3a2b8 (1 revision)
2022-02-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 69f4b9c09e48 to 9ee740d2e9ef (3 revisions)
2022-02-01 sergeyu@google.com Allow GL_RGBX8_ANGLE for texture copy destination
2022-02-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 97a33ab1a078 to a210f891a450 (477 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 borenet@google.com on the revert to ensure that a human
is aware of the problem.

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: borenet@google.com
Test: Test: dEQP-GLES31.functional.primitive_bounding_box.*
Test: Test: dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.at_sample_position.default_framebuffer --deqp-gl-config-name=rgba8888d24s8ms4
Test: Test: dEQP-GLES31.functional.shaders.sample_variables.sample_pos.correctness.default_framebuffer --deqp-gl-config-name=rgba8888d24s8ms4
Change-Id: I9645a1845bc632411f0f58b9c15f431fe1f19a79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502927
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-02 05:25:39 +00:00
skia-autoroll
8ba9cb8409 Roll SwiftShader from 4db20a80409b to 4998c7b3a2b8 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/4db20a80409b..4998c7b3a2b8

2022-02-01 kjlubick@google.com Add explicit copy assignment operators

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 borenet@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: borenet@google.com
Change-Id: I8eb7c404d717b4f8e22fed32cac237c9618eaced
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502929
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-02 04:56:13 +00:00
skia-autoroll
aa303e6609 Roll Chromium from e8274b070400 to a480a7d5f4b9 (528 revisions)
e8274b0704..a480a7d5f4

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

To file a bug in Chromium: https://bugs.chromium.org/p/chromium/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:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: borenet@google.com
Change-Id: Ic67eef4ce7cdb4ca440f74fda76834a7c209d204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502926
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-02 04:53:15 +00:00
skia-autoroll
809c30246c Roll Dawn from e663ac2c27af to 38f2ff52dd9e (10 revisions)
https://dawn.googlesource.com/dawn.git/+log/e663ac2c27af..38f2ff52dd9e

2022-02-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 3c727e44e9b4 to bc3be5a83f7e (12 revisions)
2022-02-01 bclayton@google.com dawn_native/metal: Round workgroup memory size to 16 bytes
2022-02-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 5416d9ba2ab5 to e3d4197822b1 (1 revision)
2022-02-01 bclayton@google.com Move src/fuzzers to src/fuzzers/dawn
2022-02-01 cwallez@chromium.org Support 1D texture copies.
2022-02-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 4db20a80409b to 4998c7b3a2b8 (1 revision)
2022-02-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from f810e9989932 to 3c727e44e9b4 (2 revisions)
2022-02-01 cwallez@chromium.org QueryHelper: improve the precision of the tick->ns conversion.
2022-02-01 cwallez@chromium.org D3D12: Unify both buffer<->texture copy paths.
2022-02-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from f67b6373a667 to 5416d9ba2ab5 (1 revision)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from f67b6373a667 to e3d4197822b1

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 cwallez@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: cwallez@google.com
Change-Id: If335400bfcb031ccc8d736cff2af5231ce5fd183
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502928
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-02 04:46:12 +00:00
Greg Daniel
bc1e97ee5f [graphite] Add GlobalCache class to hold objects that can be accesed by all Recorders.
This class will be used to provide thread safe access to various shared
resources in Graphite. Currently the only thing moved onto here is
the SkShaderCodeDictionary. Eventually it will have things like the
pipeline cache on it as well.

The plan is that users will not access this class directly but instead
via a ResourceProvider (see follow on change).

Bug: skia:12754
Change-Id: I2ae2c4bf7025945de850a618055e59ccd403aaaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502315
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-02-01 21:55:14 +00:00
John Stiles
3d25a39b35 Replace skstd::monostate with std::monostate.
Change-Id: Ia3a2b65ba00468d79e37b0dced613423ca5b81cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502779
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-01 21:51:26 +00:00
John Stiles
78d380e56b Remove String::consumeSuffix.
An API like this was never adopted in std::string. (The concept was
borrowed from absl::ConsumeSuffix.)

This is a step towards removing SkSL::String entirely, since we no
longer have a pressing need for it now that std::string_view and
std::string are compatible.

Change-Id: I661e5f374aaf317c3d4bdb5dcf4ac1081d178e80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502309
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-01 21:47:41 +00:00
Herb Derby
eb50c2e30c prepare to combine SDFTSubRun with SDFTSubRunSlug
* use GrTextReferenceFrame instead of blob
* use TransformedMaskVertexFiller
* remove mask field - this was always A8

Change-Id: I645a68658c4f873301db51987739e9138f8d4822
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502780
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-01 21:46:19 +00:00
John Stiles
074a016b89 Remove skstd::string_view entirely.
We now use std::string_view throughout. SkStringView.h has been moved to
include/private/ and is only used for our C++20/23 compatibility methods
(starts_with/ends_with/contains).

Change-Id: I961842c6778256a03868e7602d48add34f420763
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502306
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-01 21:16:41 +00:00
Justin Novosad
7255993970 Fix saveLayer/restore not invalidating raster canvas gen ID.
When restoring a saveLayer, SkBitmapDevice::drawSpecial is used
to composite layer contents onto the parent layer.  The parent layer's
backing pixmap was not being notified that its content was modified.
In some circumstances Chromium's 2D canvas implementation uses a
saveLayer internally for applying certain compositing operations.
Because the draw op was not causing a bump in gen ID, we were getting
key collisions inside cc::PaintOpBuffer's image cache. This was causing
the wrong version of the content of a canvas to be used in a
canavas-to-canvas drawImage calls where the source canvas is software
rendered and the destination canvas uses gpu-accelerated or
out-of-process rasterization.

BUG=chromium:1281185

Change-Id: I3aacae27e3cc1c68d130b782aa99517ffee890a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501237
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Justin Novosad <junov@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-01 20:53:34 +00:00
Brian Osman
cdeb0ec10f Various minor optimizations to SkVMBlitter
It's not free to construct an skvm::Program. This makes the programs
owned by the blitter be SkTLazy, so they're only constructed (allocated)
when necessary. Then, it splits out the blitter's program pointer to be
separate from the (optional, lazy) instance. With that in place, we can
avoid *removing* things from the cache on a hit. That, in turn, lets us
skip putting things back into the cache, unless we actually constructed
a new program with this blitter.

Change-Id: I53d7b53207cf5f65f8f0e4f53456c9f4ffa24498
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501685
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-01 20:33:39 +00:00
Herb Derby
1e0b3b7973 codify SDFT matrix range
Since the introduction of canReuse on a per-run basis, we have
not revisited how SDFT reuse is handled. Abandon the less precise
per GrTextBlob calculation for handling matrix range calculations on
the SubRun.

Change-Id: Ib943b97b2184da1abedbe6851200e6487908bad0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502696
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-01 20:31:40 +00:00
Kevin Lubick
53acf74030 [canvaskit] Fix GM tests
Change-Id: Ia6301f14af6acb875e7d17b4e0fec52dd79572db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502776
Reviewed-by: John Stiles <johnstiles@google.com>
2022-02-01 19:57:53 +00:00
Brian Osman
0769d45c68 Implement SkTLazy using std::optional
Change-Id: I3d3f175892d23ff5db2c14600c5168273fca8efb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501840
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-01 19:51:21 +00:00
Dichen Zhang
1844e99f53 HEIF decode: add support for 10-bit color format
Reworked https://skia-review.googlesource.com/c/skia/+/501159

Bug: b/201083499
Test: android.graphics.cts.AImageDecoderTest
      android.graphics.cts.BitmapFactoryTest
Change-Id: I44fe6b9c36a177e36dac6fe8d58e5feb48381422
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502208
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Dichen Zhang <dichenzhang@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2022-02-01 19:49:39 +00:00
Dominik Röttsches
7646dffe58 Determine weight, width and slant from variable axes
Let variable axes override existing or determine style information
with priority over FreeType face flags or information
from the OS/2 table.

Add test case for matching a variable fonts through SkFontMgr_FCI to
ensure the weight determination from variable axes is exercise.
The test does not exercise width or slant.

Add a small (~8.5k) subsetted Noto Sans CJK collection as a test font
(made using [1]), and ensure that matching, reported font style and axis
configuration are correct after matching.

[1] https://github.com/drott/noto-cjk/blob/subsetVFttv/subsetvf.py

Bug: skia:12864, skia:12881
Change-Id: I1fb05d88f68eda308b8864d32d98400c68e46834
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500516
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Dominik Röttsches <drott@google.com>
2022-02-01 19:34:50 +00:00
Chris Dalton
ea161cde89 Optimize single lines in Device::drawPoints
Draw the lines as rectangles instead of going through path rendering.
Only do this when calling through drawPoints(). (We don't do this
optimization for drawPath() because it can undermine batching.)

NOTE: Lines will still trigger DMSAA after this CL. We need to update
FillRRect to use a local matrix first, in order to have a non-MSAA
renderer capable of drawing these strokes.

Change-Id: I20aa10cd82fa171ade430a3da44ece5688c12417
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497296
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Christopher Dalton <csmartdalton@google.com>
2022-02-01 19:16:56 +00:00
Brian Osman
71a34c302d Improve nanobench CSV output
- Write correct column headers (with comma separators)
- Omit the "timer overhead" message

Change-Id: Id0139370a4d39c4a1a7d9bb41e018e98c37da0ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502701
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-01 19:12:45 +00:00
Robert Phillips
6e1ff7154d [graphite] Plumb SkUniformData/SkUniformBlock everywhere
An SkUniformData represents the uniforms from a single code snippet
The SkUniformBlock collects the set of SkUniformDatas needed by a whole program

Bug: skia:12701
Change-Id: Ic0596e2fb02ea00bec882af493644def9ebb2468
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497743
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-01 18:50:21 +00:00
John Stiles
98e51006b9 Revert "Remove skstd::optional entirely."
This reverts commit 17d0fc087c.

Reason for revert: flutter still uses the skstd class

Original change's description:
> Remove skstd::optional entirely.
>
> Skia now uses C++17's std::optional.
>
> Change-Id: I387069589baaefadd25e25bcec3f4cc6ee6fd090
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501477
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

Change-Id: I2c001588007640ac7b8c9f0760038b46c220a07e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502702
Auto-Submit: John Stiles <johnstiles@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-01 18:47:44 +00:00
John Stiles
2c764e1eac Reland "Use native std::string_view."
This is a reland of 64c971350e

Original change's description:
> Use native std::string_view.
>
> We also used some string_view functionality from C++20/23. These have
> been replaced with free functions with the same name.
>
> Change-Id: I3bf40f99aeb500495f344fd8c6872619267d42be
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500897
> Reviewed-by: Herb Derby <herb@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: I4ff237381c16179f716ecde1929154fdd4ad3442
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501480
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-01 18:43:47 +00:00
John Stiles
17d0fc087c Remove skstd::optional entirely.
Skia now uses C++17's std::optional.

Change-Id: I387069589baaefadd25e25bcec3f4cc6ee6fd090
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501477
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-01 18:30:39 +00:00
Chris Dalton
4dc8a39a5f Update FillRRectOp to support rotation in local coords
This will make it flexible enough to draw single-line strokes as round
rects.

Bug: skia:12872
Change-Id: Ib15a714d21c8cee520eadb2ce8c6bf6b1c549ed4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499876
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Christopher Dalton <csmartdalton@google.com>
2022-02-01 18:23:09 +00:00
Michael Ludwig
35e34d8db2 Revert "Move last join control point storage into PatchWriter"
This reverts commit 1f1270f8ac.

Reason for revert: unexpected gold diffs crept in after PS2...

Original change's description:
> Move last join control point storage into PatchWriter
>
> Change-Id: I916c23778e04911ea122720b8e48850caab4df64
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501437
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

Change-Id: I143a6a16e2ecef735f5c67995e92d315ab463121
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502697
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-01 17:20:10 +00:00
Michael Ludwig
1f1270f8ac Move last join control point storage into PatchWriter
Change-Id: I916c23778e04911ea122720b8e48850caab4df64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501437
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-01 16:42:47 +00:00
Ethan Nicholas
ff94e373a3 Re-land "Added SkSL dehydrate / rehydrate test"
This reverts commit 07d229c795.

Change-Id: I403020f05f2ca17b94b35dcaa6cc35514f7a0cdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502313
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-02-01 16:31:09 +00:00
Kevin Lubick
d31c6a9db1 [canvaskit] Change contexts when making surfaces from GrContext
Suggested by jason-simmons
https://github.com/flutter/flutter/issues/95259#issuecomment-1026390189

Change-Id: Id523648dc4d8db261577f2cf4b46d52cc3335451
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502310
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2022-02-01 15:56:04 +00:00
Kevin Lubick
06acd1d194 [canvaskit] Fix MakeRenderTarget
Change-Id: I86c296ff2dad8f915e75dd71301cf43f36ce6e00
Bug: skia:12862
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500438
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2022-02-01 15:42:37 +00:00