Commit Graph

60100 Commits

Author SHA1 Message Date
John Stiles
3134ec4324 Use op cache for OpCompositeExtract.
If we start with an OpConstantComposite, then we do an
OpCompositeExtract from it, we can look up the result directly from op
cache and avoid doing any work. This helps our matrix code a lot.

Change-Id: Idfbdc0c69676b9c1e91cdc57bf0d6382b9b5d8d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529339
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-13 16:35:06 +00:00
Brian Osman
68476b304d Add vulkan-deps to DEPS
Many chromium adjacent projects have started using this repo to fetch
all of the Vulkan and SPIRV repos in a single bundle. Using this ensures
that we get a group of repos that should work together (atomically), and
simplifies autoroller configuration (we just need one roller for
vulkan-deps that does transitive rolls of the children, rather than five
separate rollers).

Change-Id: I015edb5811be60eb2275cdfe195138317d341a03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529730
Reviewed-by: Eric Boren <borenet@google.com>
2022-04-13 16:04:30 +00:00
Brian Osman
b00f0a6b23 Add vulkan-tools to DEPS
This library is now used by Dawn, so will be required to get the roller
working again. Landing this separately (and unused), first.

Change-Id: I22a820e4996299ccdc9181ac96fb617eb7933c5b
Bug: dawn:1365
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529725
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2022-04-13 15:53:21 +00:00
Jorge Betancourt
8a5aa6d7c0 add Mac hash for MarkupSafe requirements
Change-Id: Ibbc3abd2b84b4a77b90ceec8707776dbc238fa89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528442
Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-04-13 15:39:27 +00:00
skia-autoroll
319f38e9f7 Roll skcms from 30c8e303800c to 5394ae3ed6c8 (1 revision)
https://skia.googlesource.com/skcms.git/+log/30c8e303800c..5394ae3ed6c8

2022-04-13 lovisolo@google.com Ignore .vscode.

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Canary-Chromium
Tbr: armansito@google.com,brianosman@google.com
Change-Id: Ia82a4c2072a951e1b2fad286e5cd4b0812813ca1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529571
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-13 14:59:11 +00:00
Dominik Röttsches
442997ab88 Fix PaintRotate and PaintSkew angle orientation
PaintRotate needs to rotate counter-clockwise, but was rotating
clockwise due to passing the font's value unchanged to
SkMatrix::RotateDeg. Negate the value to achieve counter-clockwise
rotation.

For PaintSkew, we compute the tangent from the values in the font and
set up a skew matrix with that. Since we're using the trigonometric
functions to set up the matrix, the angle works in counter-clockwise
direction.

So this previously worked correctly for skew in the x
direction, but not in the y-direction due Skia using a y-down coordinate
system. Negate the y-angle from PaintSkew before calculating the
tangent and setting up the matrix.

Bug: skia:13190
Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_NativeFonts
Change-Id: I98329f9746bcc6e875c4f87982782470e0f0a17d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529076
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Dominik Röttsches <drott@google.com>
2022-04-13 14:42:36 +00:00
Brian Salomon
114b8c99c7 Don't set max aniso when creating GL texture
Creates unexplained regression in chrome perf test.

Bug: 1312339
Change-Id: I691bb845904ae541f8cae7537af7210ae8efdd99
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529682
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-13 13:41:15 +00:00
skia-autoroll
a1d5fffd9a Roll ANGLE from 797e627e641c to 6768aff710de (13 revisions)
797e627e64..6768aff710

2022-04-12 yuxinhu@google.com Fix Geometry Shader Conformance Test Failure on Pixel6
2022-04-12 penghuang@chromium.org Use the real max vertex attrib index instead of MAX_VERTEX_ATTRIBS
2022-04-12 sunnyps@chromium.org vulkan: Mark external memory textures as preinitialized
2022-04-12 ynovikov@chromium.org Suppress multisample_interpolation dEQP failures on Pixel 6 Vulkan
2022-04-12 senorblanco@chromium.org D3D: Remove a pass-through function.
2022-04-12 cclao@google.com Vulkan: Change ContextVk to Context for BufferPool APIs
2022-04-12 antonio.caggiano@collabora.com Vulkan: Support Wayland
2022-04-12 ynovikov@chromium.org Roll chromium_revision f89964bd5b..f961a0d473 (990903:991486)
2022-04-12 steven@valvesoftware.com egl_angle_ext: add more missing extension enum values
2022-04-12 ynovikov@chromium.org Update ANGLE's docs regarding Windows 10 SDK version to use
2022-04-12 steven@valvesoftware.com gl_angle_ext.xml: treat glProvokingVertexANGLE as alias
2022-04-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from d15c42482560 to 620982155d55 (2 revisions)
2022-04-12 syoussefi@chromium.org Reland "Vulkan: Fix texture-after-framebuffer sync issues"

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 armansito@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: armansito@google.com
Change-Id: Ib51255cbfe22bc809674075cadfe34fda49e40bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529564
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-13 05:28:03 +00:00
skia-autoroll
0da5f80744 Roll Chromium from 8219c5d3322a to ba62a8683b71 (531 revisions)
8219c5d332..ba62a8683b

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 armansito@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: armansito@google.com
Change-Id: I4dac7a88bff85d24dfa7130af3b2fbcf881426bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529566
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-13 05:06:05 +00:00
skia-autoroll
1513df3c1f Roll SwiftShader from 620982155d55 to 011bba68c819 (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/620982155d55..011bba68c819

2022-04-12 capn@google.com Optimize sRGB conversion using FMA
2022-04-12 capn@google.com Fix storage image write of VK_FORMAT_B8G8R8A8_SRGB
2022-04-12 capn@google.com Refactor sRGB color space conversions
2022-04-12 swiftshader.regress@gmail.com Regres: Update test lists @ 62098215

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 armansito@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: armansito@google.com
Change-Id: I682b7cf43494a1e434bf10d68d8e581d52cff2ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529565
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-13 04:50:39 +00:00
Herb Derby
d5a244e6c0 Add dimensions to SkGlyphDigest and remove max dimension
Add dimensions to the glyph digest to enable SkRemoteGlyphCache to build
SubRuns directly.

It would be nice to use SkGlyphRect to encode this information but,
the MSVC-2019 compiler has problems producing correct code on 32-bit
machines.

Change-Id: I519ffecf3c727f608a8e6972742aee04b65a283a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529613
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-12 22:50:37 +00:00
John Stiles
702bf7ed1b Add support for SkSpan::subspan(offset).
https://en.cppreference.com/w/cpp/container/span/subspan

The real std::span::subspan in C++20 allows the "count" argument to
default to `std::dynamic_extent` (a fancy way of spelling ~0U). I didn't
think it would be worth adding `skstd::dynamic_extent`, but I did have
a use for an unbounded subspan, so I added a single-argument version to
SkSpan.

Change-Id: I297cc452cf2db727a3f9869ff8f46f3527e19370
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529603
Reviewed-by: Arman Uguray <armansito@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-04-12 22:44:11 +00:00
Ben Wagner
97f7956254 Generalize SkGlyph::fForceBW.
The field SkGlyph::fForceBW is currently used by the DirectWrite
SkScalerContext implementation to let generateImage know that
generateMetrics needed to fall back to aliased rendering in order to
load the glyph. This is part of a more general issue where
generateMetrics must generate the metrics based on some glyph
representation and then generateImage must use that same representation
to draw.

Currently this consistency comes from ensuring that generateMetrics and
generateImage make the same decisions, with the only real information
passed from generateMetrics to generateImage being the mask format.
However, there have always been multiple glyph represenations for a
given mask format (like outline masks vs. embedded bitmap masks) and now
there are four (soon to be five) different color formats. While the mask
format and bounds are enough to allocate the space for a glyph
rendering, this is not enough information for generateMetrics and
generateImage to agree on which glyph rendering to choose. The
additional required information has come from implicitly coding
generateImage to make the same decisions generateMetrics would have.
However, these decisions may have been based on information which is
expensive to compute, like probing the font for which representations a
glyph may have.

To transmit this extra information, formalize that generateMetrics may
state which decisions it made (which glyph representation it used) so
that generateImage can use this information explicitly instead of
implicitly. Do this by expanding fForceBW and renaming it
fScalerContextBits and documenting what it is used for.

Change-Id: I91ba747233447f4d7bea81b0dcde51e49fa705fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529604
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-04-12 22:20:03 +00:00
Herb Derby
8191a9f29b Before atlas rebuild check pinned strike
The invariant for drawing is that this strike must be pinned in
the cache. If it is not, then dump a stacktrace.

Bug: chromium:1315730
Change-Id: I73a79d8d3c45262753ef64b679e4af23cd1d6eea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529557
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-12 22:03:37 +00:00
Leandro Lovisolo
44cf5ad0f4 gcs_mirror.go: Add support for .zip files.
Bug: skia:12400
Change-Id: Ice706804bfb46593afe0773311870c993c1a7551
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529608
Auto-Submit: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-04-12 22:01:38 +00:00
John Stiles
ad235abc1b Add assertion that samplers cannot be subpass inputs.
Based on some code archaeology, we believe that textures (not samplers)
should always be used for subpass inputs.

Change-Id: Ida461e20f3b4f236918e72076e9c008ac280b8ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529609
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-12 21:49:52 +00:00
John Stiles
abf84fd342 Use op cache for constant matrix construction.
Previously, we didn't usually generate OpConstantComposite ops for
matrices. Now, a matrix assembled from constants should come out as a
constant.

Change-Id: I458718901686dffb84e4079a81017d61195420d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529338
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-12 21:43:14 +00:00
Arman Uguray
77ed5fcfbe Revert "Add glyph dimensions to SkGlyphDigest"
This reverts commit 4831018d05.

Reason for revert: Broke tests on Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Release-All and Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Debug-All bots

Original change's description:
> Add glyph dimensions to SkGlyphDigest
>
> Add dimensions to the glyph digest to enable SkRemoteGlyphCache to build
> SubRuns directly.
>
> Bug: skia:13192
> Change-Id: I8e68fe4ef144344347d4bc23865821d8517709fc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529517
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Bug: skia:13192
Change-Id: I14e9763ff015558e046f77211490c94a33c80df1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529558
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-04-12 21:39:01 +00:00
Arman Uguray
e0934a67a7 Revert "Workaround win2019 bad bit field code gen"
This reverts commit fddb53ee53.

Reason for revert: Broke tests on Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Release-All and Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Debug-All bots

Original change's description:
> Workaround win2019 bad bit field code gen
>
> Change-Id: I51130e4a0f62eb9e803710c23a7c5efda6b48012
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529607
> Reviewed-by: Arman Uguray <armansito@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Change-Id: Id0a7fa078ae29c116f4dcfeebf7235d571710c98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529637
Commit-Queue: Arman Uguray <armansito@google.com>
Auto-Submit: Arman Uguray <armansito@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-12 21:37:51 +00:00
John Stiles
8c2a505432 Replace scalar/vector ID caches with op cache.
The output changes here are almost entirely a wash, because we already
had support for caching scalars and vectors. Almost all changes are just
inconsequential reorderings of IDs, and the removal of RelaxedPrecision
decorators on constants (which were not meaningful).

Change-Id: I45340c4a240cb504b7c4a934b3db178d2f39ec99
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528709
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-12 21:33:50 +00:00
Herb Derby
fddb53ee53 Workaround win2019 bad bit field code gen
Change-Id: I51130e4a0f62eb9e803710c23a7c5efda6b48012
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529607
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-12 21:32:34 +00:00
Greg Daniel
bc767ae1b5 Revert "skif:LayerSpace<SkRect>::roundOut/In have epsilon tolerance."
This reverts commit acb8770918.

Reason for revert: possibly breaking g3 roll

Original change's description:
> skif:LayerSpace<SkRect>::roundOut/In have epsilon tolerance.
>
> Adds a little tolerance so that e.g. left=30.999994 with roundOut
> will still round to 31 not 30. Helps avoid cases where imprecision
> leads to including an entire unwanted row/column of an input image
> to an image filter.
>
> This Chrome change must land first:
> https://chromium-review.googlesource.com/c/chromium/src/+/3577185/
>
> Bug: chromium:1313579
> Change-Id: I143c8f99b90413a6b610f2b3a5e54e648777ca68
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528652
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: chromium:1313579
Change-Id: Ia5589858afb042fae142357983f5ccf50ecc0020
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529628
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-12 21:12:37 +00:00
John Stiles
08e125adb6 Implement op cache for SPIR-V.
We have a new `writeInstruction` call which can cache instructions as
they are written. This allows us to reuse existing instructions instead
of recomputing the same things twice.

This feature is largely untapped in this CL. As a demonstration that it
works, we no longer check the `fNumberConstants` map when writing
numbers, and instead rely on the cache to deduplicate OpConstant
instructions. Followup CLs will leverage the feature more heavily.

Change-Id: I6c25d0c2db7888ace05c24f8f9961d25c91b93b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528817
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-12 20:31:46 +00:00
John Stiles
cc6892dbd7 Untangle SPIR-V sampler creation logic.
Evolution over time led to a bit of gnarly logic around sampler
creation in SPIR-V. I've untangled it a bit.

Change-Id: I1987dd9b06c66f55051d72a6de4e950813697dbb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529499
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-12 20:24:59 +00:00
John Stiles
fcbd099bcc Replace (SpvId)-1 with NA throughout.
Historically this code generator has used -1 as a sentinel "invalid"
SpvID. It's clearer to give this concept a name. The "NA" name is
borrowed from SkVM, and existing code using -1 has been updated.

Change-Id: I1733df4fb0bd440f849390046a7f26973e518976
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529519
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-04-12 19:25:35 +00:00
Herb Derby
4831018d05 Add glyph dimensions to SkGlyphDigest
Add dimensions to the glyph digest to enable SkRemoteGlyphCache to build
SubRuns directly.

Bug: skia:13192
Change-Id: I8e68fe4ef144344347d4bc23865821d8517709fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529517
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-12 19:18:39 +00:00
Michael Ludwig
4007b9bc6d [graphite] Draw deferred clip shapes
Bug: skia:12698
Change-Id: Ibd09f64d2f8690719d0cb6ed1f34abf6cdcf4497
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/527916
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-04-12 19:02:17 +00:00
Florin Malita
0e53e24f00 Update SKIA_EGL_SRCS to reflect new Ganesh location
Location changed in
https://skia-review.googlesource.com/c/skia/+/528156.

Change-Id: I4557a1952212bcf6379e0941f59910516a68f765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529556
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-04-12 19:01:06 +00:00
Michael Ludwig
e35f6eeef4 Actually flag local-to-device as dirty
Bug fix for https://skia-review.googlesource.com/c/skia/+/529126
This only affects Graphite, so there was no need to revert and fix.

Bug: skia:12787
Change-Id: Iab20b26e90083f1659d0c6502bd8e2d85ecb6fec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529518
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-12 18:38:19 +00:00
John Stiles
5f2db357fe Factor out opcode identification logic.
This will allow `is_globally_reachable_op` to be used in other places.

Change-Id: I99ea05b0a1da685a24d96700b395b4d13df0993e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529122
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-12 17:42:34 +00:00
Robert Phillips
59ba27bc6a Move Ganesh specific headers into include/private/gpu/ganesh
Change-Id: Ia799cdff5288efe5d5d53e8d8f77cf32f3343371
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529131
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-12 17:30:07 +00:00
Michael Ludwig
2a1f2641f1 [graphite] Reuse local-to-device Transform between draws and clips
In profiling, calculating the inverse of the 4x4 every draw call or on
every clip operation was measurable, but it really only needs to be
done if the transform is stale before the next time it's used.

Code is a little cleaner now too, since we're staying skgpu:: types
more than before.

Bug: skia:12787
Change-Id: Ib6313f211c8ebd6a484878bf9975e5ad6a4e750f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529126
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-04-12 17:27:49 +00:00
Herb Derby
ba429fbc16 make calculating width and height easy for GrGlyphRect
Rearrange SkGlyphRect so that leftTop is negative. This makes
calculating width and height = rightBottom + leftTop. Then we
can use this as the dimensions of the glyph in the digest.

Rename: topLeft to leftTop.

Bug: skia:13192
Change-Id: If06ebf6e595f380f8fbb9a3381e87945e312eceb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529336
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-12 17:05:21 +00:00
Herb Derby
24a1344800 move the SkPackedGlyphID out of SkGlyphDigest
Move the packed glyph id out of the digest to make room for the
glyph dimensions. Use SkTHashMap instead of SkTHashTable. Add a
Hash function struct to SkPackedGlyphID.

Bug: skia:13192

Change-Id: I1b59b47cb292402bf8b8e892b3b37edad9ecb9ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529132
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-12 16:29:09 +00:00
Erik Rose
e853b8d2b5 [docs] Document new "lin-123-g580" Golo naming convention.
Change-Id: I126bee10ebeb34c024c84e5cd6bc5db950a82029
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529354
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Erik Rose <erikrose@google.com>
2022-04-12 14:19:17 +00:00
Kevin Lubick
196b172650 [sksl] Make sksl tracing optional
This removes the required dependency on our JSON code. In the Bazel
rules, this dependency is pushed down into sksl instead of required
by the cc_binary rules.

It adds a stub version of SkVMDebugTrace.cpp and removes
SkVMDebugTracePlayer unless the appropriate GN or Bazel flag
is set (skia_enable_sksl_tracing and enable_sksl_tracing,
respectively). There was an existing #define that CanvasKit
used (CK_INCLUDE_SKSL_TRACE) and this was changed to
SKSL_ENABLE_TRACING.

Users of //:skia_core no longer need to specify a JSON dep,
if sksl needs it (e.g. for tracing), then it will specify
the dependency.

This is a reland of https://skia-review.googlesource.com/c/skia/+/528837

Bug: skia:12541
Change-Id: I79612c69fdbefd3db9822a2b66df7552f7c13865
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529278
Reviewed-by: John Stiles <johnstiles@google.com>
2022-04-12 13:59:25 +00:00
Brian Salomon
acb8770918 skif:LayerSpace<SkRect>::roundOut/In have epsilon tolerance.
Adds a little tolerance so that e.g. left=30.999994 with roundOut
will still round to 31 not 30. Helps avoid cases where imprecision
leads to including an entire unwanted row/column of an input image
to an image filter.

This Chrome change must land first:
https://chromium-review.googlesource.com/c/chromium/src/+/3577185/

Bug: chromium:1313579
Change-Id: I143c8f99b90413a6b610f2b3a5e54e648777ca68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528652
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-04-12 13:56:46 +00:00
skia-autoroll
095f28416a Roll ANGLE from 1b94c585682b to 797e627e641c (14 revisions)
1b94c58568..797e627e64

2022-04-12 syoussefi@chromium.org Autogenerate list of features as enum
2022-04-12 syoussefi@chromium.org Autogenerate features
2022-04-12 gman@chromium.org Metal:remove TextureMtl::mIsPow2
2022-04-11 kkinnunen@apple.com Metal: Avoid leaking MTLDevice lists in DisplayMtl
2022-04-11 kkinnunen@apple.com Metal: Avoid leaking MTLFunctionConstantValues in ProgramMtl
2022-04-11 steven@valvesoftware.com egl_angle_ext.xml: add missing enums and typedefs
2022-04-11 jmadill@chromium.org Add error check on resuming XFB with deleted buffer.
2022-04-11 jonahr@google.com Skip BlitFramebufferTest.ScissoredMultisampleStencil
2022-04-11 steven@valvesoftware.com add GL_ANGLE_robust_resource_initialization extension to xml
2022-04-11 senorblanco@chromium.org D3D11: implement SSBOs in pixel and vertex shaders.
2022-04-11 geofflang@google.com Fix CheckedNumeric using the wrong type.
2022-04-11 penghuang@chromium.org Validate vertex attrib index against caps.maxVertexAttributes
2022-04-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 6f8a7182bd26 to 20a474e64382 (14 revisions)
2022-04-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from a01c0c749d0a to f89964bd5b42 (617 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 armansito@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: armansito@google.com
Change-Id: Ifba839a0df945eab5c07e1eb1a7f38a88b147e3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529357
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-12 05:37:11 +00:00
skia-autoroll
c9399b0dad Roll Chromium from 4064ec2bcf25 to 8219c5d3322a (480 revisions)
4064ec2bcf..8219c5d332

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 armansito@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: armansito@google.com
Change-Id: I87bec25008f57f083e703bdf86aa2b6220e29aeb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529356
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-12 05:00:37 +00:00
skia-autoroll
89bd272cc3 Roll SwiftShader from d15c42482560 to 620982155d55 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/d15c42482560..620982155d55

2022-04-11 capn@google.com Work around MSan false positives for Reactor routine parameters
2022-04-11 capn@google.com Pass RoutineT::operator() parameters by value

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 armansito@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: armansito@google.com
Change-Id: I29ce721eb10c13865ca937a6ed1e575a492252a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529359
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-12 04:54:05 +00:00
Jim Van Verth
c695cee3fc Ignore flaky encode-platform GM for mtltestcompile jobs
Change-Id: Ic2436cc47b6a5820ec4bbce7b4ac1d7cf1ef203d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529133
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-04-11 22:13:33 +00:00
Herb Derby
38f104e85d combine direct position calculation
Make the glyph buffers use the same Direct position calculations
for Bitmap and GPU processing. This will create fewer changes when
switching to SkGlyphDigest based API.

Bug: skia:13192

Change-Id: I7e3e44dcfc1a4bad014d0ebe2bef3c1b28c712f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529277
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-04-11 20:37:07 +00:00
Kevin Lubick
e4047903db [bazel] Unify boolean flags to be enable*
I think they read better when it is enable_foo. I have to
do less double-negation in my head if they are set to false
then.

Reland of https://skia-review.googlesource.com/c/skia/+/528838

Change-Id: I15075687cbee98b41364518384b656e897d716d8
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529276
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-11 19:52:12 +00:00
Robert Phillips
cd692a6bb0 [graphite] Finally, allocate uniform data in an arena
Bug: skia:12701
Change-Id: Ib02db7160599d3c15a01597c746ce5131f2998e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526298
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-11 19:17:20 +00:00
Ben Wagner
d271a2330e Clean up FreeType COLRv1 implementation.
Stop attempting to draw the glyph on any error. Clean up some
indentation and naming. Ensure that out parameters are always set
correctly.

Change-Id: I0e5c6c1da698393684f76413c4dbb156803f508a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528880
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-04-11 19:05:36 +00:00
Jim Van Verth
3108d49999 Update iOS build instructions for new simulator arg.
Bug: skia:12880
Change-Id: Ia91c02dce5d994ebe169347e1e6fbe4a72bffa6f
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529119
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-11 18:56:53 +00:00
Jim Van Verth
42f710f3fa Reland "[graphite] Move Graphite into Skia base directories."
This is a reland of commit ae5e846047

Original change's description:
> [graphite] Move Graphite into Skia base directories.
>
> Change-Id: Ie0fb74f3766a8b33387c145bd1151344c25808cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528708
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Change-Id: Ia575fd49206ad0b665a6a9153317e738bb321446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529059
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-04-11 18:37:20 +00:00
Arman Uguray
5d594e4af4 [sksl][wgsl] Enable WGSL codegen in skslc
* Wire up the WGSLCodeGenerator to SkSLCompiler.
* Wire up build rules to generate WGSL from unit tests.
* Include HelloWorld.sksl as the first complete program.

Bug: skia:13092
Change-Id: I283cf5971b6856126b9fc23340afacff5cc54697
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526760
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-04-11 18:32:46 +00:00
Robert Phillips
d8e15701e1 [graphite] Add UniformExpectationsValidator
Bug: skia:12701
Change-Id: Iaac8b6fd0f2d9d1f8d5771f8204047a9127184c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528041
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-04-11 17:46:57 +00:00
John Stiles
471fd2eb09 Revert "[sksl] Make sksl tracing optional"
This reverts commit 6bc4bdf645.

Reason for revert: Android roll

Original change's description:
> [sksl] Make sksl tracing optional
>
> This removes the required dependency on our JSON code. In the Bazel
> rules, this dependency is pushed down into sksl instead of required
> by the cc_binary rules.
>
> It adds a stub version of SkVMDebugTrace.cpp and removes
> SkVMDebugTracePlayer unless the appropriate GN or Bazel flag
> is set (skia_enable_sksl_tracing and enable_sksl_tracing,
> respectively). There was an existing #define that CanvasKit
> used (CK_INCLUDE_SKSL_TRACE) and this was changed to
> SKSL_ENABLE_TRACING.
>
> Users of //:skia_core no longer need to specify a JSON dep,
> if sksl needs it (e.g. for tracing), then it will specify
> the dependency.
>
> Change-Id: I2fcd29cde118fc391c269ba2d8f8a40a6f164c99
> Bug: skia:12541
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528837
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

Bug: skia:12541
Change-Id: Icf75495f19e409d96925ca4dca9e839eca4057ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529129
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-04-11 17:42:17 +00:00