Commit Graph

59154 Commits

Author SHA1 Message Date
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
Kevin Lubick
aa2579cce0 [canvaskit] Include WebP and JPEG encoding in npm version
Change-Id: I3086129d6fd7e3505a93bf8157b55ad2c5096902
Bug: skia:12853
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500376
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2022-02-01 15:42:37 +00:00
Julia Lavrova
24a8aa9d1f Updating the API description for Flutter
bug: skia:12850
Change-Id: I78148b2d99701a9127c377ddf709c89a885fcfc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502312
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-02-01 15:36:41 +00:00
Kevin Lubick
94303e8dbd [fuzz] Make mock gpu fuzzer compatible with Vulkan
Change-Id: I857da21674db669d7f2766132e9909ccbcdc1c55
Bug: oss-fuzz:44132
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502536
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-02-01 15:09:22 +00:00
John Stiles
07d229c795 Revert "Added SkSL dehydrate / rehydrate test"
This reverts commit ded2548179.

Reason for revert: Windows breakage on tree

Original change's description:
> Added SkSL dehydrate / rehydrate test
>
> Test that we can dehydrate and then rehydrate every program in our test
> corpus without altering them.
>
> Change-Id: I2286fcb691176b3fbbe1d6515279d03867555647
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501436
> Reviewed-by: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

Change-Id: I2dcee0b36e7e316c4ed0889141cf38c2d1508653
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502311
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-01 14:50:07 +00:00
Joe Gregorio
e035f6a071 Add Pixel 6 phones to the tree.
Change-Id: Ic48bc4f7dbf4ea63cc5618663e2437e6ff9cfe9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500439
Auto-Submit: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-02-01 14:38:10 +00:00
Ethan Nicholas
ded2548179 Added SkSL dehydrate / rehydrate test
Test that we can dehydrate and then rehydrate every program in our test
corpus without altering them.

Change-Id: I2286fcb691176b3fbbe1d6515279d03867555647
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501436
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-02-01 14:12:47 +00:00
Kevin Lubick
98d664096d [bazel] Regenerate files and build with c++17
See toolchain/clang_toolchain_config.bzl for the c++17 switch.
Most of the other changes were automatically generated
(with the exception of //third_party).

Change-Id: I8c0f4b29b5967da3f48b17eb298a7e92156277ac
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502407
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-02-01 13:15:22 +00:00
Kevin Lubick
102dbf9c43 [canvaskit] Disable dynamic execution
This required an update to emscripten, due to there being
a few bug fixes regarding the non-dynamic code and the
Closure compiler/minifier.

Change-Id: Icc922bd98cdd52a6923a9367da3747dac2b897b3
Bug: skia:12795
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/492916
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2022-02-01 13:15:22 +00:00
skia-autoroll
1def701690 Roll ANGLE from a4a4fec8b77f to f810e9989932 (8 revisions)
a4a4fec8b7..f810e99899

2022-01-31 jmadill@chromium.org Use a temporary timeout multipler for trace tests.
2022-01-31 ynovikov@chromium.org Remove old spellings for SYNC-HAZARD-WRITE_AFTER_READ skips
2022-01-31 jmadill@chromium.org Refactor shared library load to avoid allocations.
2022-01-31 syoussefi@chromium.org Vulkan: Emulate dithering
2022-01-31 syoussefi@chromium.org Fix ANGLE_rgbx_internal_format's extension file name
2022-01-31 jmadill@chromium.org D3D11: Fix underflow with computing small strides.
2022-01-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 518c5780ac4f to 4db20a80409b (3 revisions)
2022-01-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 4d71de73b37d to 97a33ab1a078 (625 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
Change-Id: I9453486aff0a4b5d1dbe68ae5cf9ec36d37af1f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502470
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-01 05:26:38 +00:00
skia-autoroll
698d979a74 Roll Chromium from 46a6e399e465 to e8274b070400 (449 revisions)
46a6e399e4..e8274b0704

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: Ib7a6b0b25cdfb7a07290a5c04436878d7ad7b8ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502469
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-01 05:07:38 +00:00
skia-autoroll
a69af3bec2 Roll Dawn from abd099c0636c to e663ac2c27af (4 revisions)
https://dawn.googlesource.com/dawn.git/+log/abd099c0636c..e663ac2c27af

2022-01-31 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from b934fad92479 to f810e9989932 (7 revisions)
2022-01-31 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 3e80ae68ee4b to f67b6373a667 (1 revision)
2022-01-31 cwallez@chromium.org Use C++17 message-less static_assert where applicable.
2022-01-31 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 0b39270e01ce to 3e80ae68ee4b (1 revision)

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

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: I2e91b5281db78a432b4affceb31449ea6c84186a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502471
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-01 04:34:14 +00:00
John Stiles
a02452cd41 Reland "Use native std::optional."
This is a reland of 490bb34b29

Original change's description:
> Use native std::optional.
>
> Change-Id: I3bcf7a23eb27e98d24840b492930955125d35bd4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501476
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: If14d35ed78905800b43b656f65bb17fc940e7770
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502298
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-01-31 23:50:45 +00:00
John Stiles
260d925cb3 Optimize SkVM approx_powf for simple cases.
Our SkVM code generator will always convert `pow(x, y)` into an
`approx_powf` call. However, in many cases, `x` or `y` might boil down
to an immediate value, and for some immediates, we can reduce the
operation into something much simpler:

- `pow(1, y)` is always 1
- `pow(2, y)` can be converted to `approx_pow2(y)`
- `pow(x, 0.5)` can be converted into `sqrt(x)`.
- `pow(x, 1)` can be converted to `x`
- `pow(x, 2)` can be converted to `x * x`

We could go further if there is a need, e.g. `pow(x, 4)` can become
`a = x * x; return a * a`, but these seemed like the best places to
start.

Change-Id: I02b9d4d3f5067581ebad5e53b2d1d7befa308300
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502308
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-01-31 23:21:17 +00:00
John Stiles
1d0d1e9f16 Update iOS test apps to require C++17.
Fixes these build breaks: http://screen/5kZxPUFhoSrwpZ8

Change-Id: Ib4c92c0c33c9b0fdd639092e901f475e6f6bc655
Bug: skia:12882
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502307
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-01-31 23:17:15 +00:00
John Stiles
0f6baf469d Update CommaSideEffects test to run on GPU.
Change-Id: Ia218fb2249abd479db9d27527b965fd0b8ad3367
Bug: skia:12858
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501276
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-01-31 21:35:13 +00:00