Commit Graph

61258 Commits

Author SHA1 Message Date
Ben Wagner
2bc5447527 Let PDF know when TrueType isn't TrueType.
FreeType reports that the type of a font is TrueType when the font is
logically TrueType. However, the underlying data may not be TrueType and
may be encoded in woff or woff2. The raw woff or woff2 data should not
be embedded in the PDF. If the tables are accessed individually it is
possible to subset them into a TrueType font. However, the subsetters
are not currently capable of handling a font as tables so fall back to
Type3 for now.

Change-Id: I5235ad02fd73fd88759dc30adfcf80aa0e4d2feb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/543921
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-07-06 16:44:59 +00:00
Robert Phillips
48cfc92ec8 Revert "[ganesh][dawn] Use GrRingBuffer for uniform buffer allocation"
This reverts commit 9da66d2a57.

Reason for revert: Seeing if this is blocking the G3 roll

Original change's description:
> [ganesh][dawn] Use GrRingBuffer for uniform buffer allocation
>
> The Dawn backend used its own GrDawnRingBuffer type to manage uniform
> buffer slices which always made new wgpu::Buffer allocations on-demand.
> It now uses the GrRingBuffer type for this purpose.
>
> While the Dawn backend does not use mapped buffers for uniform data
> uploads and buffers are ref-counted and freed by Dawn automatically
> after use, using GrRingBuffer allows it to share the same
> GrResourceProvider infrastructure as the other backends.
>
> Change-Id: Id2697f306f9ce3d5c6c85745b135585b092b6fb0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553525
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Arman Uguray <armansito@google.com>

Change-Id: Id9960b0b2bdf9ecab5889ef2050425e422e86090
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556079
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-07-06 15:54:26 +00:00
Herb Derby
7f8303d25a Guard against divide-by-zero in drawing of last resort
Exit early if there will be a divide by zero or if no pixels are
to be drawn. Report that some glyphs have been excluded.

Bug: oss-fuzz:48695
Bug: oss-fuzz:48690
Change-Id: Ifdb0fad656ffc27bac7253035c7cd05ee96c274c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556018
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-07-06 15:30:22 +00:00
John Stiles
41a1d5f495 Remove redundant argument-list description code.
While reading through this code, I realized we implemented the same
function-argument stringizing loop three times. (A fourth version in
`description()` is similar, but prints the expressions, not types.)

Change-Id: I78610cdf6412b2d08984ac701e6421c356f25a83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556076
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-07-06 15:22:20 +00:00
Kevin Lubick
68d6ff9222 [includes] Reduce IWYU exports from SkTypes.h
SkTypes.h was found exporting <stddef.h> and <stdint.h>.
Thus if a Skia file includes SkTypes.h, it did not need
to include either of those files to use things like
size_t or uint8_t respectively. [1]

This also resulted in strange IWYU warnings like:
warning: size_t is defined in "include/core/SkTypes.h", which isn't directly #included.

Thus, this CL removes those additional exports, and as a result,
adds many more includes of <cstddef> and <cstdint>.

The second change this CL is to not use the default IWYU
mappings which are hard-coded into IWYU [2]. These defaults
are valid, but make suggestions for the C version of
headers and not the C++ ones (i.e. <stddef.h> over <cstddef>).

To make these recommendations align better with our preferred
style (the C++ ones), we use IWYU with --no_default_mappings
and then have to expand our existing mappings to better deal
with how IWYU would resolve some of these headers.

[1] https://codereview.chromium.org/1207893002/#msg49
[2] 4c0f396159/iwyu_include_picker.cc (L1221-L1234)

Change-Id: Iafebe190f8f3e86f252147b9f538c182bcc34af4
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555516
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-07-06 14:52:55 +00:00
John Stiles
48b27317b4 Fix fuzzer-discovered error with range checks.
The fuzzer managed to create a NaN using a carefully-crafted mix of
intrinsics and constant folding. (`cosh(421)` is a very large double,
which becomes +Inf when cast to float, which is then multiplied by 0;
zero times infinity is NaN.)

Our code which checked to see if a value is in range of an int did not
consider NaNs and their always-false behavior, so it incorrectly
decided that NaN was in range. This CL reverses the check so that a NaN
will not pass, but all other values will behave the same.

Followup CLs should probably also tighten up the folding/optimizer
behavior so that NaNs/Infs are not created at all.

Change-Id: Idd2b0447ebe115e00bdba63ca7ff655f6c902fc6
Bug: oss-fuzz:48592
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555009
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-07-06 14:24:59 +00:00
skia-autoroll
bc15c6a548 Roll ANGLE from 86c735bfe650 to 9070e279a887 (5 revisions)
86c735bfe6..9070e279a8

2022-07-05 m.maiya@samsung.com Vulkan: Handle platforms that have imprecise float division issues
2022-07-05 ynovikov@chromium.org Roll chromium_revision b1ab0fbd60..532c25a8e2 (1020158:1020841)
2022-07-05 syoussefi@chromium.org Vulkan: Fix round-after-dither logic
2022-07-05 ukai@google.com angle: set $build/goma["use_luci_auth"] = True
2022-07-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 8e3184380881 to 24ed8b7a6bd7 (2 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 robertphillips@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: robertphillips@google.com
Change-Id: I17642ea9356742cef44aca9566821c7b86cf6996
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555957
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-06 05:54:24 +00:00
skia-autoroll
046d0ce374 Roll SwiftShader from d1116fa9e9dc to 7987bda077c8 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/d1116fa9e9dc..7987bda077c8

2022-07-05 nicolas.capens@gmail.com Compute vertex clip flags using scalable SIMD

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 robertphillips@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: robertphillips@google.com
Change-Id: I61913c9a41b4d81b6d429a5b207cd0c185b86876
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555958
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-06 04:55:02 +00:00
skia-autoroll
019f67c30a Roll Dawn from b9ab0240030d to 871c213d1b23 (6 revisions)
https://dawn.googlesource.com/dawn.git/+log/b9ab0240030d..871c213d1b23

2022-07-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 1154cc46d44d to 9070e279a887 (2 revisions)
2022-07-06 dneto@google.com Delete tests with invalid SPIR-V inputs
2022-07-05 dsinclair@chromium.org Roll third_party/webgpu-cts/ 7334f06d2..6c0f3bab4 (11 commits)
2022-07-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from d1116fa9e9dc to 7987bda077c8 (1 revision)
2022-07-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 24ed8b7a6bd7 to 5d976018641e (1 revision)
2022-07-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 44d8bf7602e2 to 1154cc46d44d (4 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC dsinclair@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: dsinclair@google.com
Change-Id: I9064033641a23b82c19afee6c3877be42594bf65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555956
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-06 04:42:56 +00:00
skia-autoroll
83c4cebc1e Roll ANGLE from da984303fda1 to 86c735bfe650 (4 revisions)
da984303fd..86c735bfe6

2022-07-05 chris@rive.app pls: Rename GL_DISABLED_ANGLE -> GL_DISABLE_ANGLE
2022-07-04 antonio.caggiano@collabora.com Vulkan: Support EGL_EXT_platform_wayland
2022-07-04 antonio.caggiano@collabora.com Vulkan: Support DRM_FORMAT_MOD_LINEAR
2022-07-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from cf47f3e49a61 to 8e3184380881 (2 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 robertphillips@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: robertphillips@google.com
Change-Id: I2fb4a4886dd669e2f7612c86f658687d3b4448f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555816
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-05 05:53:12 +00:00
skia-autoroll
022cad13a1 Roll Dawn from c4f0232de2dc to b9ab0240030d (6 revisions)
https://dawn.googlesource.com/dawn.git/+log/c4f0232de2dc..b9ab0240030d

2022-07-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 2117cffa2620 to 24ed8b7a6bd7 (1 revision)
2022-07-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 2a941833c838 to 44d8bf7602e2 (2 revisions)
2022-07-04 dsinclair@chromium.org tint: Remove semicolon as struct member delimeter
2022-07-04 dsinclair@chromium.org tint: Disallow write-only storage buffers
2022-07-04 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 8e3184380881 to 2117cffa2620 (1 revision)
2022-07-04 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from da984303fda1 to 2a941833c838 (1 revision)

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 dsinclair@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: dsinclair@google.com
Change-Id: I869587b1ac3d08ed6fdedd16d6317d97bab9bf70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555817
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-05 04:41:12 +00:00
skia-autoroll
79b146dbf1 Roll ANGLE from defd99dc4cd5 to da984303fda1 (8 revisions)
defd99dc4c..da984303fd

2022-07-01 chris@rive.app Add a pls test for in-shader coherency
2022-07-01 chris@rive.app Add a pls test for load-only storage
2022-07-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from e22ec5fc4cbf to 867b77cee987 (1 revision)
2022-07-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 8bf3474ad33a to b1ab0fbd602a (1173 revisions)
2022-07-01 cclao@google.com Reland "Reland "Vulkan: Destroy DescriptorSet cache when it becomes invalid""
2022-07-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 863435cf0898 to cf47f3e49a61 (19 revisions)
2022-07-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 90fdde382489 to d1116fa9e9dc (13 revisions)
2022-07-01 lexa.knyazev@gmail.com BlitGL: Fix LUMAWorkaround for half-float copies

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 robertphillips@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: robertphillips@google.com
Change-Id: I1ee548fa47b8f599a8bbbd298a0fe4ff2f5dffd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555737
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-04 05:52:47 +00:00
skia-autoroll
bb8406655f Roll Dawn from 24239fcc4786 to c4f0232de2dc (7 revisions)
https://dawn.googlesource.com/dawn.git/+log/24239fcc4786..c4f0232de2dc

2022-07-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from ad005b700de1 to 8e3184380881 (1 revision)
2022-07-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 4a5fe6fb56e5 to da984303fda1 (6 revisions)
2022-07-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from cf47f3e49a61 to ad005b700de1 (1 revision)
2022-07-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 76c2f42ea652 to cf47f3e49a61 (8 revisions)
2022-07-01 zhaoming.jiang@intel.com CTS: Update expectation for non-ASCII entry point name
2022-07-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 4b745c2bfa6b to 4a5fe6fb56e5 (3 revisions)
2022-07-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 43183d8b4d0c to d1116fa9e9dc (7 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC shrekshao@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: shrekshao@google.com
Change-Id: Ie73cb7d7ef89d0a3019ad20fd9418c6a5f21335e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555738
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-04 04:42:12 +00:00
skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com
526c7435eb Update SKP version
Automatic commit by the RecreateSKPs bot.

Change-Id: I4132f2a51da9e5c3da3002faef964b0a720b3965
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555736
Commit-Queue: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Bot-Commit: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2022-07-03 08:24:12 +00:00
John Stiles
d1578cfe9b Add padding to properly align mixed-size uniforms.
The UniformManager would previously assert if it detected an alignment
error, but did not actually have any mechanism for automatically adding
padding between misaligned elements. If a user specifies a uniform
layout like `uniform float a; uniform float4 b;`, we now insert padding
between `a` and `b` so that `b` will be properly aligned. (This reuses
the logic that was originally used to trigger the alignment assertion.)

This CL fixes the bug and adds a test. The test is only active for
elements of matching size; mixed half- and full-precision elements
will need improved test logic.

Change-Id: I8c04eb6350fa73bdbcd1a08e1a45b17fee0d4194
Bug: skia:13478
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555440
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-07-02 20:19:12 +00:00
Brian Salomon
b2e4416a6b Update SkMesh buffer API to take const void* instead of SkData
Also expose a size() function on the public IB and VB types.

Bug: skia:12720
Change-Id: Ibeccf6d2d6ba411e9e77be582d0cb1622bc76ccd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555005
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-07-01 20:07:57 +00:00
Arman Uguray
9da66d2a57 [ganesh][dawn] Use GrRingBuffer for uniform buffer allocation
The Dawn backend used its own GrDawnRingBuffer type to manage uniform
buffer slices which always made new wgpu::Buffer allocations on-demand.
It now uses the GrRingBuffer type for this purpose.

While the Dawn backend does not use mapped buffers for uniform data
uploads and buffers are ref-counted and freed by Dawn automatically
after use, using GrRingBuffer allows it to share the same
GrResourceProvider infrastructure as the other backends.

Change-Id: Id2697f306f9ce3d5c6c85745b135585b092b6fb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553525
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-07-01 20:01:47 +00:00
Robert Phillips
79a71e7fd2 Remove special case arena-based allocation of Compose and Color shaders
This is set up to eliminate SkComposeShader.h and SkColorShader.h

Bug: skia:13438
Change-Id: I16d3ea233220061559f5499fb0824dba1e3e699d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555160
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-07-01 18:36:02 +00:00
Kevin Lubick
72ae8ebf5f Remove extra file
No-Try: true
Change-Id: I98ca99508f25dde7dc6c63b5cb38b0f7382bd762
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555517
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-07-01 16:55:23 +00:00
Michael Ludwig
d289afdd6c [graphite] Use new Transform concat functions in text code
Uses Transform::Identity() and preTranslate() in places to simplify code
and reduce matrix copying/multiplications.

Reworks DirectMaskSubRun's boundsAndTransform() function to use
preTranslate() and concatInverse() to similarly reduce matrix copies
and multiplications. It keeps fInitialPositionMatrix as an SkMatrix as
long as possible, and similarly does not copy localToDevice until its
determined that concatInverse() and preTranslate() need to be used
(vs. the integer-only translation).

Change-Id: Ia2ba266f952d3c71fb3afc30f3ba0b904bb4bede
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555002
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-07-01 16:36:26 +00:00
Herb Derby
afe25662ee Reland "Replace SK_ARRAY_COUNT with std::size() all the rest"
This is a reland of commit f838f6f62f

Original change's description:
> Replace SK_ARRAY_COUNT with std::size() all the rest
>
> Added changes to IWYU_mapping.imp to allow std::size. This
> requires multiple entries because std::size can be defined from
> any number of files. Please see the following for reference:
> https://en.cppreference.com/w/cpp/iterator/size
>
> Please check that I got all the includes from the documented list.
>
> Change-Id: I8346834ea7f37128f2dc50f238af0665a1fcfd8d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550696
> Reviewed-by: John Stiles <johnstiles@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Change-Id: I4c50340ac2a970de479da57d7d1b55bbf267b617
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555004
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-07-01 16:20:51 +00:00
Brian Salomon
b8c26f8bfe Reland "Add option to GrGpuBuffer::updateData to *not* discard non-updated area."
This is a reland of commit a9b52ca52a

Original change's description:
> Add option to GrGpuBuffer::updateData to *not* discard non-updated area.
>
> Also support minimal map region in Dawn implementation when onUpdateBuffer uses mapping.
>
> Bug: skia:13427
> Change-Id: I5c8a2872b520e04f8a55085c86430e635da2f43f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553585
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13427
Change-Id: I04e8a4cba5dd3d77e457a4df2d8c20397c2ae760
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554997
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2022-07-01 15:45:07 +00:00
Herb Derby
cc01efda73 Revert "Replace SK_ARRAY_COUNT with std::size() all the rest"
This reverts commit f838f6f62f.

Reason for revert: Breaks G3 Roll and MSVC compiler

Original change's description:
> Replace SK_ARRAY_COUNT with std::size() all the rest
>
> Added changes to IWYU_mapping.imp to allow std::size. This
> requires multiple entries because std::size can be defined from
> any number of files. Please see the following for reference:
> https://en.cppreference.com/w/cpp/iterator/size
>
> Please check that I got all the includes from the documented list.
>
> Change-Id: I8346834ea7f37128f2dc50f238af0665a1fcfd8d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550696
> Reviewed-by: John Stiles <johnstiles@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Change-Id: I6282aeac9dacb31f753acb57d196a88447bce761
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555003
Auto-Submit: Herb Derby <herb@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-07-01 15:30:06 +00:00
Jim Van Verth
1f9173a477 [graphite] Fill in shader and vertex buffer for DirectMask subruns.
Doesn't handle the transformed case, for the moment.

Bug: skia:13118
Change-Id: I8f792713b224f2b153903f1e65cbb1707e36ca31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554343
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-07-01 15:16:45 +00:00
Michael Ludwig
9d82f9e4b8 [graphite] Add more utility and SkM44/SkMatrix interop to Transform class
Change-Id: I028bd133778d14edcb22ccef0c35c5a8e3d7d552
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554516
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-07-01 15:00:22 +00:00
John Stiles
987901fa3f Fix uniform manager handling of mat2 types.
The Stride() function in the UniformManager, when given a matrix type,
was intended to return the stride of a single matrix column. However, it
accidentally called `Stride(1)` instead of `Stride(kNonArray)`, which
meant that it was returning the stride for a `vec2[1]` (four floats)
instead of the stride of a `vec2` (two floats). Interestingly, this
still returned the correct answer for mat3 and mat4, because `vec3`,
`vec4`, `vec3[1]` and `vec4[1]` all have the same stride--four floats.

This CL fixes the bug and adds a test.

Change-Id: I9c06b7da7253a86c1d9545c7e177bc916b49c9b9
Bug: skia:13478
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555161
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-07-01 13:47:31 +00:00
Herb Derby
f838f6f62f Replace SK_ARRAY_COUNT with std::size() all the rest
Added changes to IWYU_mapping.imp to allow std::size. This
requires multiple entries because std::size can be defined from
any number of files. Please see the following for reference:
https://en.cppreference.com/w/cpp/iterator/size

Please check that I got all the includes from the documented list.

Change-Id: I8346834ea7f37128f2dc50f238af0665a1fcfd8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550696
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-07-01 13:39:17 +00:00
Kevin Lubick
e3d341ce20 Add --keep_going to IWYU enforcement
Change-Id: I7108e82d0cabb54964f97e81bebe7aedb97e0a54
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555416
Reviewed-by: John Stiles <johnstiles@google.com>
2022-07-01 13:03:51 +00:00
Peng Huang
1b075ff14e Add StrikePinner::assertValid() to diagnose cache missing problem
Bug: chromium:1316352
Change-Id: I54e50592fe5fc97a83e1ed7e40c92b98834bf331
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554337
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-07-01 13:01:21 +00:00
skia-autoroll
86a9562a59 Roll ANGLE from 4884e9de1da9 to defd99dc4cd5 (10 revisions)
4884e9de1d..defd99dc4c

2022-07-01 mikes@lunarg.com Update MSRTSS vulkan struct to final version
2022-07-01 ianelliott@google.com Revert "Reland "Vulkan: Destroy DescriptorSet cache when it becomes invalid""
2022-07-01 syoussefi@chromium.org Vulkan: Don't optimize away flush after clear for single buffer
2022-06-30 eddiehatfield@google.com Add presubmit check for .gclient file
2022-06-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1fe7a0ab555e to 863435cf0898 (7 revisions)
2022-06-30 geofflang@google.com Metal: Support GL_ANGLE_provoking_vertex
2022-06-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 470172656108 to 1fe7a0ab555e (1 revision)
2022-06-30 yuxinhu@google.com Suppress the new BestPractice VVL Error
2022-06-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ec31f547750c to 90fdde382489 (6 revisions)
2022-06-30 cclao@google.com Reland "Vulkan: Destroy DescriptorSet cache when it becomes invalid"

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: Id47e9e6c11d53379dac2175465553ad3c830471d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555316
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-01 05:55:18 +00:00
skia-autoroll
4d39707554 Roll SwiftShader from 90fdde382489 to d1116fa9e9dc (13 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/90fdde382489..d1116fa9e9dc

2022-07-01 capn@google.com Replace sw::SIMD aliases of 4-wide vectors with rr::SIMD types
2022-07-01 capn@google.com Temporarily support xyzw component swizzling for SIMD types
2022-07-01 capn@google.com Implement SIMD helper functions using 128-bit operations
2022-07-01 capn@google.com Implement 128-bit insert/extract
2022-07-01 capn@google.com Use SIMD types throughout graphics and compute pipelines
2022-07-01 capn@google.com Replace static SIMD::Width asserts with dynamic ones
2022-06-30 capn@google.com Make shader math functions SIMD width agnostic
2022-06-30 nicolas.capens@gmail.com Omit dynamic checks for equal or sequential pointer offsets
2022-06-30 nicolas.capens@gmail.com Construct SIMD pointers from an std::vector instead of array
2022-06-30 nicolas.capens@gmail.com Move rr::Pointer4 to SIMD source and header files
2022-06-30 nicolas.capens@gmail.com Avoid broadcasting data fields to 4-wide vectors
2022-06-30 swiftshader.regress@gmail.com Regres: Update test lists @ 90fdde38
2022-06-30 sugoi@google.com Prevent recompiling programs on changes to compareMask or writeMask

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: I1e8a4d02d1aa98530f0f39084f8300c2dd6bafa1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555317
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-01 04:50:24 +00:00
skia-autoroll
546c4daca9 Roll Dawn from 8866b114af93 to 24239fcc4786 (11 revisions)
https://dawn.googlesource.com/dawn.git/+log/8866b114af93..24239fcc4786

2022-07-01 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 1e96beb9ff89 to 4b745c2bfa6b (6 revisions)
2022-07-01 bsheedy@google.com Move WebGPU worker globs
2022-06-30 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 90fdde382489 to 43183d8b4d0c (6 revisions)
2022-06-30 enga@chromium.org Roll third_party/webgpu-cts/ cef4c7678..7334f06d2 (18 commits)
2022-06-30 senorblanco@chromium.org Implement EGL error handling.
2022-06-30 senorblanco@chromium.org Implement InstanceBase::ConsumedError taking a ResultOrError<T>.
2022-06-30 jiawei.shao@intel.com Implement ResolveDeferredExpectationsNow() for dawn_end2end_tests
2022-06-30 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 785353fd3501 to 1e96beb9ff89 (4 revisions)
2022-06-30 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 1144d58f8be5 to 90fdde382489 (5 revisions)
2022-06-30 hogehoge@gachapin.jp Implement RenderPassDescriptor.maxDrawCount
2022-06-30 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 6aff2983cd8c to 76c2f42ea652 (5 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC shrekshao@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: shrekshao@google.com
Test: Test: dawn_end2end_tests
Change-Id: Ia1efec568d3549bf22e538c14bcf71588015ad33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555318
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-01 04:42:54 +00:00
Jim Van Verth
d9eeef0790 [graphite] Add sampleCount to pipeline key.
Without this fix, a Pipeline created for an attachment with one
sampleCount could be found and used for an attachment with a different
sampleCount, which is invalid.

Change-Id: Ibab0736e0e8dd7b920485eec54d70f00ab8507c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554999
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-06-30 21:23:52 +00:00
Herb Derby
44d58be8bd Find the best font size for too big glyphs
If the font produces glyphs that won't fit in the atlas then:

Given the original font as a starting point, find a smaller font
where the maximum glyphs size will fit in the atlas with room for
padding.

From that new font size, calculate a scale factor that will
make the smaller glyphs the same size as the original font.

This is the second attempt at this code.

Change-Id: I2add9a8e9bae59546b7e8c3bbd5c17eb48d90f65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554401
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2022-06-30 20:58:11 +00:00
Peng Huang
1cfdd63f23 Do not use flat interpolation with ANGLE's metal backend
Using flat interpolation is slow with ANGLE's metal backend,
so not using it.

Bug: chromium:1340620
Change-Id: I91ff04a975ca9778690c6372d240028f24b7c2a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554976
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-06-30 20:52:33 +00:00
John Stiles
143f191edd Fix uniform manager handling of vec3 types.
std140, std430, and Metal all agree that non-array vec3 types should
pack like the equivalent vec4.

std140: http://screen/5NHiYze3sk4CbWv
std430: http://screen/8G6CuomyEkxge5t
Metal:  http://screen/7t9LfvmuZmtJ4zq

Our Stride() function in the UniformManager, however, did not pad out
vec3 types. This would manifest as an assertion when the _next_
uniform was added; we would assert because get_ubo_aligned_offset
would mismatch our expected values.

This CL fixes the bug and adds a test.

Change-Id: I33f04f37d68b0099236576f69250ed73d9e010cd
Bug: skia:13478
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554404
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-06-30 20:26:44 +00:00
Kevin Lubick
2e61aa9b6e [bazel] Reduce stack size usage of debug skcms build
Bug: skia:12541
Change-Id: If08b05c77b0d5e610f6b4d5435cea9cc117053b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555080
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-06-30 19:35:53 +00:00
John Stiles
cb7bfa28fd Simplify unit test logic around Metal half-precision uniforms.
The pattern of treating Metal half-precision uniforms differently was
affecting both existing and upcoming tests, so it's factored out to a
helper function.

Also, added in calls to `doneWithExpectedUniforms`--these aren't
required, but it will give us more thorough test coverage.

Change-Id: I3f76a775816242cd1e5de9be1a96486738ddb12f
Bug: skia:13478
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554998
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
2022-06-30 19:24:43 +00:00
Kevin Lubick
a74ebc9bac [bazel] Use exec_tools instead of tools for better RBE compatibility
The tools in genrules [1] correspond to the HOST's version, which
is a problem if we are doing cross-platform builds. In this case,
when I was using my M1 Mac to run on a Linux RBE platform, the
Mac's python binaries (e.g. python3_9_aarch64-apple-darwin/bin/python3)
were being uploaded to RBE and attempted to be used, which resulted
in OSError: [Errno 8] Exec format error because the won't run
on the Linux RBE machine.

Thanks to tjgq@, I learned about exec_tools [2], which will use
the version of the tools for the EXECUTION platform, which
is exactly what we want.

While debugging this, I added a minimal reproduction case in
//experimental/bazel_test and updated the py_tools version
in an effort to diagnose the issue further.

We will need to contribute similar fixes to @spirv_tools

[1] https://bazel.build/reference/be/general#genrule.tools
[2] https://bazel.build/reference/be/general#genrule.exec_tools
Bug: skia:12541
Change-Id: Ib14deb4e326d3103fd08c21e93afe342d751c17a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554518
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-30 18:02:35 +00:00
John Stiles
9a9a6925ac Add unit test verifying int encoding of uniforms.
Similar to floats, Metal expects short-int uniforms to be passed in 16
bits, but other layouts always use 32 bits for integers.

Change-Id: I99575349d8547876ab6dab00f393158fbeea5385
Bug: skia:13478
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554345
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-06-30 16:41:04 +00:00
Brian Salomon
f6a84dfb53 Revert "Add option to GrGpuBuffer::updateData to *not* discard non-updated area."
This reverts commit a9b52ca52a.

Reason for revert: breaking non-apple mac gms?

Original change's description:
> Add option to GrGpuBuffer::updateData to *not* discard non-updated area.
>
> Also support minimal map region in Dawn implementation when onUpdateBuffer uses mapping.
>
> Bug: skia:13427
> Change-Id: I5c8a2872b520e04f8a55085c86430e635da2f43f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553585
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13427
Change-Id: Ifc9fb9311b19887a8dd14ea6b43709b5a814b766
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554996
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-06-30 15:56:12 +00:00
Robert Phillips
3c4759d04c [graphite] Add runtime effects to new API proposal
Bug: skia:13430
Change-Id: I4958b0d14f7805889ed2061fe929778f69d40c48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549566
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-30 15:23:13 +00:00
Brian Salomon
a9b52ca52a Add option to GrGpuBuffer::updateData to *not* discard non-updated area.
Also support minimal map region in Dawn implementation when onUpdateBuffer uses mapping.

Bug: skia:13427
Change-Id: I5c8a2872b520e04f8a55085c86430e635da2f43f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553585
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-06-30 15:05:44 +00:00
Ethan Nicholas
26afe80a62 Fix assertion failure with 'uniform texture2D'
Bug: oss-fuzz:48371
Change-Id: Ia92a652022985ea738791f3e2e57d360a04b05bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554517
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-30 14:48:48 +00:00
John Stiles
02fd3fc63d Enable Graphite bots when tests/graphite/ is modified.
Change-Id: Ie54eae222c65a30225ce0dc5514908e1395299eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554402
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-06-30 14:28:11 +00:00
John Stiles
eb35a3783e Add unit test verifying float encoding of uniforms.
This test verifies that float scalars and vectors can be added as
uniforms. In Metal, this is a particularly interesting challenge because
we represent half values as 16-bit floats.

Change-Id: I4ce2280a61afee905ac5980792b6dbe6e4be572f
Bug: skia:13478
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554344
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-06-30 14:06:26 +00:00
John Stiles
91c25e9b05 Reland "Create simple unit test for UniformManager types and layouts."
This reverts commit 6c05f9064f.

Reason for revert: fixed in release

Original change's description:
> Revert "Create simple unit test for UniformManager types and layouts."
>
> This reverts commit c42782ad74.
>
> Reason for revert: breaks in release
>
> Original change's description:
> > Create simple unit test for UniformManager types and layouts.
> >
> > The first test is an extremely simple check (can we create a uniform of
> > every allowed type in every layout?) and already uncovered a bug, so
> > we're off to a good start.
> >
> > Change-Id: If9d6aa9c0845727c5422185094711734951c2e0a
> > Bug: skia:13478
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554339
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> Bug: skia:13478
> Change-Id: I75c051c3daee63cad0ffd55e3823d9eb333980ee
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554398
> 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>

Bug: skia:13478
Change-Id: Ic8fafda7c2149cbb07e3469fe7165787e110114e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554400
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-06-30 14:03:22 +00:00
John Stiles
1a79444741 Make UniformManager expectation methods available in release.
In release, these methods are no-ops: all code is either assertions, or
wrapped in #ifdef SK_DEBUG or SkDEBUGCODE(...). In release, any calls to
these methods should be trivially eliminated by LTO.

This change makes it easier to use the class. Previously, UniformManager
required a call to `setExpectedUniforms` before passing in uniforms, or
it would immediately assert, but this method did not exist in release.
This made UniformManager impossible to use without SkDEBUGCODE.

Change-Id: I638843b4413b0ee10d00238c96fe07b0e4e17eb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554399
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-06-30 14:03:22 +00:00
Tommy Chiang
2e79abd941 [docs] Fix SkCanvas Creation API
The `encode` method of SkImage is renamed to `encodeToData` in
6409f84fc3.

We also don't use GrContext anymore. According to the file we included,
we should use GrDirectContext instead now.

This patch should make the code in the documentation buildable.

Change-Id: I07d27c5686673e17afb8a893b1c1c238fa84ecff
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554816
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2022-06-30 13:11:31 +00:00
John Stiles
6c05f9064f Revert "Create simple unit test for UniformManager types and layouts."
This reverts commit c42782ad74.

Reason for revert: breaks in release

Original change's description:
> Create simple unit test for UniformManager types and layouts.
>
> The first test is an extremely simple check (can we create a uniform of
> every allowed type in every layout?) and already uncovered a bug, so
> we're off to a good start.
>
> Change-Id: If9d6aa9c0845727c5422185094711734951c2e0a
> Bug: skia:13478
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554339
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Bug: skia:13478
Change-Id: I75c051c3daee63cad0ffd55e3823d9eb333980ee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554398
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-06-30 12:09:18 +00:00