Commit Graph

59167 Commits

Author SHA1 Message Date
Brian Osman
0c7f1d9919 Revert "Add kR8_unorm_SkColorType"
This reverts commit 3225c8cc46.

Reason for revert: Client code needs to handle the new enum value.

Original change's description:
> Add kR8_unorm_SkColorType
>
> Change-Id: I97b5bc7f90715664f233ca7b7c41c0ecbfc29ac4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505679
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Change-Id: I1174f533600827e29131198c10c243d9cf1300ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506457
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-09 18:46:11 +00:00
John Stiles
72941b87f0 Group arrays/structs together in the variable pane while debugging.
SkVMSlotInfo now contains a "group index" field in each slot. The
group index starts at zero for the first slot of a variable and
increases by 1 for each slot associated with that variable.

For simple types, this group index will always match the component
index. (This is by far the common case, so the groupIndex field is
omitted from the JSON if the indices match.) For more complicated
types--structs, arrays, or nested combinations thereof--it gives us
a simple way to find the start and end slot of a variable. For a given
slot, we can identify the associated variable's initial slot by
subtracting its group index, and we can identify the last slot of any
variable by walking forward and looking for a group index of zero
(indicating the start of a new, different variable).

Change-Id: Iaa71c89ba470a4f9640206dab0774096a7467cce
Bug: skia:12906
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506317
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-09 18:16:29 +00:00
Ben Wagner
d6f7e294e8 Better report lack of SkSVG in test.
The `Typeface_glyph_to_char` test assumes that
`ToolUtils::emoji_typeface()` will always return an SkTypeface which
supports all the codepoints in `ToolUtils::emoji_sample_text()`.
However, it is possible in some configurations for there to be no
available emoji font. Detect this and provide a better massage about why
the test failed.

Correct the preprocessor directives in TestFontMgr.cpp so that the
"Emoji" and "Planet" test fonts are consistently defined and used.

Change-Id: Ibc18b03b272d9cb1187bd012a843e550af954565
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506209
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-09 17:43:52 +00:00
Zhou Shuangshuang
ec0af16644 Add codes for specifying Intel GPU generations
Bug: skia:12909

Change-Id: Ie7c76f36787ff3f756f3e124e6f81e452496c528
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504376
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-02-09 17:07:15 +00:00
Brian Osman
3225c8cc46 Add kR8_unorm_SkColorType
Change-Id: I97b5bc7f90715664f233ca7b7c41c0ecbfc29ac4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505679
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-09 17:02:57 +00:00
Brian Osman
6a312e79e9 Update SkSL docs (isOpaque, folding)
- Remove the isOpaque parameter from all makeShader calls
- Add some folding to emphasize important parts of fiddles

Bug: skia:12643
Change-Id: Iaae5d61b63b409a8754b5144dc2baf5927a14848
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506316
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-09 16:31:38 +00:00
Nathaniel Nifong
43c5837e1b Do not assert a nonzero number of GMs or unit tests in skqp
Bug: skia:12890
Change-Id: Iba42248fdc673a6f0fd44251841749065dd12483
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502700
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2022-02-09 16:26:44 +00:00
Herb Derby
9bbff29d9c Add flatten and MakeFromBuffer to SkDescriptor
Create canonical flattening for SkDescriptor and unflattening
for SkAutoDescriptor.

Eventually Slug serialization and the remote glyphs cache will use
this method for SkDescriptor serialization.

Change-Id: Ia4b6be43058aeca19fbfdcf3c5cdd8d703935775
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505681
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-09 16:00:24 +00:00
Ben Wagner
f85d3e7fdb Update Google3 thread annotations.
Bug: b/175729598
Bug: cl/419616952
Change-Id: I70efa1a23a86d941adf04e8e1c0f0340d5a5bf18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505677
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-09 15:47:22 +00:00
John Stiles
a424b619bc Fix OverflowFloatLiteral test in OS X 10.12.
std::stringstream has a subtle bug in OS X 10.12. Reading in a too-large
floating point value returns INFINITY but does not set failbit. This
caused SkSL to report a different error message than expected
("floating point value is infinite" instead of "floating-point value
is too large: NNNNN"). We now guard against this case in SkSL::stod by
adding an explicit `isfinite` check.

Bug: skia:12928
Change-Id: I9996e64b69512ea5710e6fc3ff00ad1ad83c247b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505939
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-02-09 15:13:39 +00:00
Ethan Nicholas
93f8c24dc2 Removed fContext field from Rehydrator
This field is no longer necessary now that we store a Compiler.

Change-Id: I797a2816ab39a10f38ac5415f5a1535a037e6eca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505937
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-02-09 15:02:41 +00:00
Florin Malita
e5d7a8ec89 Revert "[skottie] Visual-only text valign"
This reverts commit dcafc5d2bc.

Reason for revert: too disruptive for existing g3 asssets

Original change's description:
> [skottie] Visual-only text valign
>
> Historically, Skottie started with vertical alignment based on the
> typographic bounding box.  This was meant to account for empty
> leading/trailing lines.
>
> At some point [1], the strategy was changed to also take the visual
> bounding box into account (union of typographic and visual bounds).
>
> It turns out this is still suboptimal: aligning based on font metrics
> yields poor results in practice, and pretty much everyone expects
> visual-only alignment.
>
> This CL is an attempt to fix things:
>
> 1) update kVisualTop/kVisualCenter/kVisualBottom to use visual bounds
>    only (as their name implies)
> 2) introduce kDeprecatedVisualCenter to preserves the old behavior
>    for compatibility, and use it for the legacy sk_vj flags
>
> The latter is done to minimize disruption for clients which have
> adjusted for the current misalignment: luckily they're mostly using the
> old sk_vj flag instead of explicit resize/valign policies, and they can
> continue to do so without change, while new clients can opt into the
> new/improved valign modes.
>
> The change is guarded by a build flag for g3 staging.
>
> [1] https://skia-review.googlesource.com/c/skia/+/224188
>
> Change-Id: I334c1713ce32635e3649711f072a3dcdf6b12244
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501016
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

Change-Id: I633dd54cd04727617e845d24a35e5e8cef64f861
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506177
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2022-02-09 14:42:14 +00:00
John Stiles
3e6e29cf2e Convert 0 and NULL to nullptr.
The goal was to enable -Wzero-as-null-pointer-constant. Unfortunately,
this was thwarted by VK_NULL_HANDLE which is defined as 0ULL in the
Vulkan headers. It might be possible to enable the warning for a subset
of Skia, but not for the parts which interface with Vulkan.

Change-Id: Id27f5f57d9b2676d18f319f443fdf8bb5d4fb89d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505801
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-09 14:20:57 +00:00
skia-autoroll
dee902ad57 Roll ANGLE from d635feb11520 to 71d06198c62b (8 revisions)
d635feb115..71d06198c6

2022-02-09 syoussefi@chromium.org Vulkan: Fix vkCmdClearAttachments vs multiview
2022-02-08 m.maiya@samsung.com Vulkan: Force submit updates to immutable textures
2022-02-08 jmadill@chromium.org Vulkan: Bind aligned default uniform buffer size.
2022-02-08 jmadill@chromium.org Vulkan: Minor cleanup to DynamicDescriptorPool.
2022-02-08 syoussefi@chromium.org Overlay: Rearrange the font image
2022-02-08 jmadill@chromium.org Vulkan: Use common storage for descriptor set descs.
2022-02-08 jmadill@chromium.org Expand SwiftShader Win/ASAN suppression.
2022-02-08 cclao@google.com Vulkan: StreamVertexDataWithDivisor write beyond buffer boundary

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 herb@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: herb@google.com
Test: Test: EGLContextSharingTestNoSyncTextureUploads.*
Change-Id: I3870beb561cc037af881c92bba5747c521cf10e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506098
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-09 05:28:39 +00:00
skia-autoroll
58df5e43ec Roll Chromium from 26b1b87c9091 to 5826a77e26c0 (574 revisions)
26b1b87c90..5826a77e26

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 herb@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: herb@google.com
Change-Id: I225b1e122e307a7edb3b83a4d9de2ce98ec720be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506097
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-09 04:55:12 +00:00
skia-autoroll
944e752cdc Roll SwiftShader from e576ca6011cd to 0915ab4bddf7 (6 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/e576ca6011cd..0915ab4bddf7

2022-02-08 capn@google.com Fix validation layer error for ClearImage benchmarks
2022-02-08 capn@google.com Fix non-x86 build of LLVM Reactor
2022-02-08 kramerb@google.com Avoid deprecated llvm::IRBuilder::CreateShuffleVector overload
2022-02-08 capn@google.com Unroll transcendentals benchmarks by 10x
2022-02-08 swiftshader.regress@gmail.com Regres: Update test lists @ e576ca60
2022-02-08 capn@google.com Remove Vulkan structure enum to integer casts

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 herb@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: herb@google.com
Change-Id: I22b3b3d7b6d04596e68106069fb4e92fb698f2a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506096
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-09 04:50:40 +00:00
skia-autoroll
2dbe7ff3c0 Roll Dawn from f994c5637c2d to 73b577e9c629 (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/f994c5637c2d..73b577e9c629

2022-02-09 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 8622810c4fae to 1b9774f57784 (8 revisions)
2022-02-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c6d8cadd3300 to d21ebe74bd9c (1 revision)
2022-02-08 enga@chromium.org tint->dawn: Add proxy groups and temp targets for Dawn tests
2022-02-08 shrekshao@google.com dawn.json changes for the upstream webgpu.h
2022-02-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from e576ca6011cd to 8ccc63f045d5 (4 revisions)
2022-02-08 senorblanco@chromium.org Enable the Tint/GLSL backend in the CMake build.
2022-02-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 8b81742dd8d1 to 8622810c4fae (5 revisions)
2022-02-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from c9e8f23b0fb8 to e576ca6011cd (17 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from c6d8cadd3300 to d21ebe74bd9c

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 amaiorano@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: amaiorano@google.com
Change-Id: I78b8aac642bff4c1c174e9ec098800094a58ab6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506099
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-09 04:45:18 +00:00
Zhou Shuangshuang
a96505f627 Supplementary codes for identifying more Intel GPUs
Bug: skia:12909

Change-Id: Ib15ddf488f95ba393532baf7a4ac384b23d48b50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503579
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-02-09 00:23:09 +00:00
John Stiles
bae2cb0894 Remove OverflowFloatLiteral error test temporarily.
This breaks on OS X 10.12: http://screen/7A9bumDr8Z4ihcy

Debugging is difficult via a trybot. This CL can be reverted once the
root cause is discovered and fixed.

Change-Id: Ibbfadc9fbe39eb8d1755e6f382b806d1d648a6fe
Bug: skia:12928
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505803
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-09 00:10:11 +00:00
Leon Scroggins
37a7a19d50 Revert "Change default of skia_use_wuffs to true"
This reverts commit 281126dff3.

Reason for revert: Various bot failures

Original change's description:
> Change default of skia_use_wuffs to true
>
> Bug: skia:12921
>
> Skia is switching over completely to Wuffs. All known clients are
> already using Wuffs, so switch our development builds to Wuffs.
>
> Fix a clang warning building SkWuffsCodec.
>
> Change-Id: I24d676bcb514ff4c6657bedacc76c86898b9170c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505676
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Auto-Submit: Leon Scroggins <scroggo@google.com>

Bug: skia:12921
Change-Id: I5ba30ef07f5b2e194baee8808cbba68d5f04104c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505938
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2022-02-08 22:39:58 +00:00
Leon Scroggins III
281126dff3 Change default of skia_use_wuffs to true
Bug: skia:12921

Skia is switching over completely to Wuffs. All known clients are
already using Wuffs, so switch our development builds to Wuffs.

Fix a clang warning building SkWuffsCodec.

Change-Id: I24d676bcb514ff4c6657bedacc76c86898b9170c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505676
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
2022-02-08 22:10:12 +00:00
John Stiles
aa3b95ffaf Enable warning -Wunused-template.
This detected one truly unused function, and also some static template
functions in Sk4px which are sometimes unused (appears to vary depending
on SK_OPTS_NS).

Change-Id: I4ee2a86aa89125bd1be3a029b318eb040398fe88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505800
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-02-08 21:49:16 +00:00
Michael Ludwig
cc7682da28 Remove fixed count stroking's recursive chopping
The StrokeFixedCountTessellator now uses the same chopping algorithm
and code in PatchWriter that the curve and wedge filled-path
tessellators use.

Change-Id: Ic65f8df11325e1515f44de0757b7cad08d286a0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502057
Reviewed-by: Christopher Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-08 20:51:58 +00:00
John Stiles
3bb1f9db82 Remove static from template functions in headers.
When static is used, this triggers a warning which we currently have
disabled, -Wunused-template ("unused function template SkTAfter").

There doesn't seem to be any benefit to adding static here. See
https://stackoverflow.com/a/30863380/291737 for a brief explanation.

Unfortunately this doesn't quite allow us to enable the warning, as
we have some static member functions that also trigger the warning.

Change-Id: I7198bdc1bff2bdd5a090ee2b2d5520baa5e4b9e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505300
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-08 20:17:04 +00:00
John Stiles
f7db39f59d Run difficult matrix-constructor test on non-ES2 GPUs.
ES2-only GPUs are a lost cause here, but a newer GPU should be able to
construct a matrix from a mix of scalars and vectors in any order.

Change-Id: If9ca5d348cd18b9791c4ee8298f141f6c0edd2c2
Bug: skia:12858
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505796
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-08 20:12:16 +00:00
John Stiles
12b6796407 Fix floating-point overflow error check on OS X 10.12.
We no longer enforce a particular string form of 3.41e+38.

Change-Id: I33b8a30aa3c7ab54de0c7f4a02181b60cd8f71a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505799
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-08 20:04:52 +00:00
Ethan Nicholas
b86ab9d097 Improved symbol handling in whole-program serialization
Previously, a dehydrated SkSL program would include all symbols, even
module builtins. The rehydration API also required a vector of shared
elements, which made the API essentially impossible to use outside of
the very artificial situation in our test cases, where we retained the
original program so we could simply grab the elements from it. We
obviously cannot rely on the original program still being around in
order to successfully rehydrate it.

This CL eliminates the parent symbol tables, referring to module
builtins by name instead. This reduces the size of a small dehydrated
program by roughly 95%. We also encode the shared elements directly
into the output, which both simplifies the API and makes it work in
real-world cases.

Change-Id: I8e5dddf9316fe0886e6b97e7d29638fff8f9f499
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505816
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-02-08 19:33:52 +00:00
Ben Wagner
654f09a5ad Check rejects exist before attempting drawables.
Change-Id: I64b8a1e9da3351080bcc13eb490ec534c9d21eed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505797
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-08 19:33:28 +00:00
Robert Phillips
61e7b64962 [graphite] Rearrange headers
There is no need for these headers to be in include/private:
SkPaintParamsKey.h
SkShaderCodeDictionary.h

Added the new header:
src/core/SkBuiltInCodeSnippetID.h

Bug: skia:12701
Change-Id: I413e9a21bc26d5df48765d16dd7390e324006368
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505197
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-08 19:07:34 +00:00
skia-autoroll
77f1618a40 Roll ANGLE from 236a3d0f0898 to d635feb11520 (4 revisions)
236a3d0f08..d635feb115

2022-02-08 grt@chromium.org [fuchsia] Tests using additional_manifest_fragments are CFv1.
2022-02-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ad6d7f84f2a1 to e576ca6011cd (19 revisions)
2022-02-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 26dacbf4b527 to 817a527fde8c (500 revisions)
2022-02-08 yuxinhu@google.com Add instructions to enable Debug Overlay On Android

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 herb@google.com,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: herb@google.com,robertphillips@google.com
Change-Id: I91e1e480777c37d3837eec6e4836dc4fc4abf4e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505698
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-08 18:49:13 +00:00
Greg Daniel
1048287b5d [graphite] Add GraphiteResourceKey class.
Bug: skia:12754
Change-Id: I29a33224941e92504fe4f47fca3b923e6983ac26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505137
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-02-08 18:28:43 +00:00
Jim Van Verth
d67c266b73 [graphite] Add UploadList and UploadTask.
Sets up the internal framework for Uploads by adding an UploadList
to the DrawContext that is accumulated until we choose to snap off
an UploadTask.

Bug: skia:12845
Change-Id: Ibde03fba263bb158344b50c7477233266868c35d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503820
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-02-08 18:25:29 +00:00
John Stiles
a456175a07 Add expected errors to every test file.
This was (crudely) automated with shell scripts:
http://go/paste/5484300603490304

Change-Id: Ic9e1c93112772d303d1158eb26d995f27b439eba
Bug: skia:12665
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505637
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-08 18:20:25 +00:00
John Stiles
28991c1a34 Reland "Verify that tests in errors/ actually generate the expected errors."
This reverts commit 43539c22a2.

Reason for revert: UB fixed at http://review.skia.org/505678

Original change's description:
> Revert "Verify that tests in errors/ actually generate the expected errors."
>
> This reverts commit 8d646c127a.
>
> Reason for revert: triggering UBSAN
> http://screen/887FeQtZWs2A6oo
>
> Original change's description:
> > Verify that tests in errors/ actually generate the expected errors.
> >
> > Error expectations are embedded in the source with a special *%%*
> > marker, like this:
> >
> >      /*%%*
> >      expected 'foo', but found 'bar'
> >      'baz' is not a valid identifier
> >      *%%*/
> >
> > This unit test compiles every effect in errors/ and verifies that it
> > makes an error. It also verifies that the errors returned include the
> > expectations from the *%%* marker section, in the listed order, if any
> > expectations have been listed. (Error expectations are not meant to be
> > exhaustive; additional errors are allowed.)
> >
> > In this CL, I've manually attached error expectations to the first few
> > error tests. A followup CL will (mechanically) add expectations to every
> > error test, based on their current error reports.
> >
> > Change-Id: I4add30fef6419c4d3f8d2a221c5aeb53eee35ae7
> > Bug: skia:12665
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505399
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
>
> Bug: skia:12665
> Change-Id: I3bcdbe9fc1abab13656d6462b73f6439967fd96f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505642
> 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:12665
Change-Id: I49e23869f4ef383a0b076006e319e0a6d7191cad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505643
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-08 18:20:04 +00:00
Ben Wagner
35d25ac79f Plumbing for glyph drawable
The plumbing necessary to allow glyphs to have an associated drawable.
The TestSVGTypeface is updated to produce drawables for testing.

Bug: skia:12121
Change-Id: I475a1bfc27bf11e732e18bed3c1a9593e7c901cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413438
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-08 18:14:27 +00:00
John Stiles
ada59c148e Fix UB when reporting out-of-range values.
It's undefined behavior to cast a double to an int64 if the double is
out of range. Our SkSL error tests managed to trigger UBSAN on the tree,
pinpointing the issue (which we had already written up a bug for).

Change-Id: Ia06896732223ff310f2c175efcbeb96ba5786fa8
Bug: skia:12863
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505678
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-08 17:30:09 +00:00
Kevin Lubick
e7985f22fa [debugger] Remove dependency cycle
DebugCanvas.h and DebugLayerManger.h both included each other.
DebugCanvas.h already had a forward declaration of DebugLayerManager,
so that seemed the easiest way to break the cycle.

Change-Id: Ie8ce5eeca7aba2cdbbcbf92f9fdc42eccc319a2e
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505641
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2022-02-08 17:28:54 +00:00
Kevin Lubick
8e7c2ae4f7 Remove old test main (skia_test.cpp)
The only use was an executable that only compiled in the pathops tests.

The pathops tests *are* ran in DM and this executable
is not run anywhere.

Change-Id: Ia2d5d7247c25cbad1941b9ee124615c008ea76b7
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505640
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-08 17:06:47 +00:00
Kevin Lubick
5cb6b4464b Remove SkVptr
It appears unused in Skia and Chrome.

Change-Id: I2058374dfda853312087e7e9c50845d2c805b0d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505639
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-08 17:00:15 +00:00
Kevin Lubick
89ce347cca Remove SkFixed15
It appears unused in Skia and Chrome.

Change-Id: I5d21f6635f96eca58c5efc9eaabe649a7e81db04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505638
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-08 16:57:24 +00:00
Robert Phillips
3bdff6b354 [graphite] Add a means of accumulating multiple code snippets
Namely, SkShaderInfo. This doesn't do anything interesting yet. The ShaderCodeDictionary stores the snippets and then a PaintParamsKey can be traversed to collect the snippets in an SkShaderInfo. Gluing them together will be next-ish.

Bug: skia:12701
Change-Id: Icb4b41716592fc119778ae08f84565da9acaf202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503822
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-08 16:46:50 +00:00
Jorge Betancourt
18a96a62f7 Reland "add defines for new os condition flag(no_codec added in google3 build)"
This reverts commit 716456c335.

Reason for revert: This did not break the leak detection task

Original change's description:
> Revert "add defines for new os condition flag(no_codec added in google3 build)"
>
> This reverts commit d831da5b8a.
>
> Reason for revert: Failing LSAN leak detection https://ci.chromium.org/raw/build/logs.chromium.org/skia/58eec496c79be011/+/annotations
>
> Original change's description:
> > add defines for new os condition flag(no_codec added in google3 build)
> >
> > flag reduces build size in xeno by .1 MB
> >
> > Change-Id: I3fac4ebd243ea506b0a2df2eba32f016ed13a456
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504539
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Reviewed-by: Florin Malita <fmalita@google.com>
> > Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
>
> Change-Id: I1a19d9e74b0ebff90ea7de447e92fcc578c45982
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505298
> Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Change-Id: I7221c85b550a363dce1ff3b84d8cdcb7ca74a2c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505636
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-02-08 16:34:54 +00:00
Michael Ludwig
220702dac0 Track min required segments in PatchWriter
Also handles automatically chopping curves to reach the maximum segments
allowed for the PatchWriter.

Change-Id: Iba817e817dd270d170d305c1256cf9aec7b803d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502056
Reviewed-by: Christopher Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-08 16:30:26 +00:00
John Stiles
43539c22a2 Revert "Verify that tests in errors/ actually generate the expected errors."
This reverts commit 8d646c127a.

Reason for revert: triggering UBSAN
http://screen/887FeQtZWs2A6oo

Original change's description:
> Verify that tests in errors/ actually generate the expected errors.
>
> Error expectations are embedded in the source with a special *%%*
> marker, like this:
>
>      /*%%*
>      expected 'foo', but found 'bar'
>      'baz' is not a valid identifier
>      *%%*/
>
> This unit test compiles every effect in errors/ and verifies that it
> makes an error. It also verifies that the errors returned include the
> expectations from the *%%* marker section, in the listed order, if any
> expectations have been listed. (Error expectations are not meant to be
> exhaustive; additional errors are allowed.)
>
> In this CL, I've manually attached error expectations to the first few
> error tests. A followup CL will (mechanically) add expectations to every
> error test, based on their current error reports.
>
> Change-Id: I4add30fef6419c4d3f8d2a221c5aeb53eee35ae7
> Bug: skia:12665
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505399
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Bug: skia:12665
Change-Id: I3bcdbe9fc1abab13656d6462b73f6439967fd96f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505642
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-08 16:29:36 +00:00
Leon Scroggins III
7fa16d9a08 Remove MPL from Android's license_kinds
Change-Id: I8942814623e4d66df3a8810c68fa36aaab5bd578
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504538
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
2022-02-08 16:18:12 +00:00
Jason Simmons
9116bd3bee Convert font width values from variable axes to SkFontStyle widths
A recent change added support for using the width variable axis to
override the usWidthClass value from the font's OS/2 table.

However, the width axis uses a different value scale.  This PR converts
the axis value to a usWidthClass value that is equivalent to the
SkFontStyle Width enum.

Change-Id: I6ce78f4dcad3abdcf3e00bd524ffb08a57e51919
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505356
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-08 16:10:52 +00:00
Robert Phillips
07b639da6f [graphite] Consolidate functionality in the SkShaderCodeDictionary
At some point we'll need to go through the dictionary for user provided SkSL

Bug: skia:12701
Change-Id: I484ae30626dad64f2bce1e0948071380d9f8282e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504596
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-08 15:54:35 +00:00
John Stiles
8d646c127a Verify that tests in errors/ actually generate the expected errors.
Error expectations are embedded in the source with a special *%%*
marker, like this:

     /*%%*
     expected 'foo', but found 'bar'
     'baz' is not a valid identifier
     *%%*/

This unit test compiles every effect in errors/ and verifies that it
makes an error. It also verifies that the errors returned include the
expectations from the *%%* marker section, in the listed order, if any
expectations have been listed. (Error expectations are not meant to be
exhaustive; additional errors are allowed.)

In this CL, I've manually attached error expectations to the first few
error tests. A followup CL will (mechanically) add expectations to every
error test, based on their current error reports.

Change-Id: I4add30fef6419c4d3f8d2a221c5aeb53eee35ae7
Bug: skia:12665
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505399
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-08 14:38:39 +00:00
John Stiles
f1bb464ee4 Add support for constant folding of matrix-times-matrix.
This code should be easily adaptable to matrix-times-vector as well;
just treat the vector as a 1-row or 1-column matrix. I haven't gotten
around to writing tests for this, though.

Change-Id: If59ae52cd12952b44d3574d54398b2dc66edbcc8
Bug: skia:12819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505221
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-08 14:35:45 +00:00
John Stiles
d0234ba3bf Move backend-specific error tests out of errors/ test folder.
These tests only generate an error in the SPIR-V or GLSL backends. We
will soon enforce that everything in errors/ must actually fail to
compile.

Change-Id: Ic54707eb3bfa19287b4ed52335066fc0fbf19ec1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505397
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-08 14:18:46 +00:00