Metal needs helper functions in order to compare arrays, structs, and
matrices. Depending on the input code, it was possible for the
array-comparison helper to be emitted before a matrix-comparison
or struct-comparison helper. If this occurred, array comparisons of that
matrix or struct type would fail, because the operator== for the array's
inner type was defined after array==, and Metal (like C++) parses
top-to-bottom and only considers functions declared above the current
function.
We now emit prototypes for all the array, struct and matrix helper
function. These prototypes are emitted above any helper functions. This
ensures visibility no matter how your comparisons are organized.
Change-Id: Ib3d8828c301fd0fa6c209788f9ea60800371edbe
Bug: skia:12326
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437739
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Comparing `vec1 == vec2` returns a bvec in Metal, so the result must be
wrapped in `all()` in order to boil it down to a single boolean result.
Our array-comparison helper function did not do this. Fortunately,
`all(scalar)` is a no-op, so we can just wrap the result unilaterally.
Change-Id: I4f1f09a6832164ae2e6577d53b317f561332d581
Bug: skia:12324
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437736
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Ifb45cdb7fe33a69765ebdbc83e29f312b8dfd104
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437916
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
b1b760e74e..1d49cb6620
2021-08-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from ad1ae9d489da to 8e25231b71ac (9 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 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: I80065ecdf89eb2deeadd2ff9dba88dad5238f226
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437811
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
4686da27b3..b1b760e74e
2021-08-09 ynovikov@chromium.org Ignore VUID-vkCmdClearAttachments-baseArrayLayer-00018
2021-08-09 jmadill@chromium.org Serialization: Fix groups & ensure compile resolution.
2021-08-09 timvp@google.com Framecapture: Update file naming
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 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: I47e86c5718682d0d76a99167b06f9cd0f90618f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437806
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
GrFragmentProcessor now provides an (explicit) copy constructor which
clones all child processors and flags from the passed-in FP. Since we no
longer have flags which propagate up to the root node of the FP tree,
all flags are now safe to copy, since a cloned FP also clones all of its
children.
Change-Id: Ia9f80e0ec540ed1056d25dbb1861a174a1d55f4b
Bug: skia:12299
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437836
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is a reland of 0de475e29e
Old code restored behind a build flag pending web_test rebaseline.
Original change's description:
> Use a table for dither effect rather than math.
>
> We used to use integer math on sk_FragCoord, when supported, and a
> fallback using floating point (on a 4x4 rather than 8x8 grid). Now we
> precompute a 8x8 table in a texture because it was shown to be
> significantly faster on several devices. Test was done with the following
> running in viewer with the stats layer enabled and looking at total
> frame time:
> SkRandom r;
> for (int i = 0; i < N; ++i) {
> SkColor c[2] = {r.nextU(), c[1] = r.nextU()};
> SkPoint pts[2] = {{r.nextRangeScalar(0, 500), r.nextRangeScalar(0, 500)},
> {r.nextRangeScalar(0, 500), r.nextRangeScalar(0, 500)}};
> SkPaint p;
> p.setDither(true);
> p.setShader(SkGradientShader::MakeLinear(pts, c, nullptr, 2, SkTileMode::kRepeat));
> canvas->drawPaint(p);
> }
>
> Device GPU N no dither int math dither table dither
> Linux desktop QuadroP1000 5000 304ms 400ms (1.31x) 383ms (1.26x)
> TecnoSpark3Pro PowerVRGE8320 200 299ms 820ms (2.74x) 592ms (1.98x)
> Pixel 4 Adreno640 500 110ms 221ms (2.01x) 214ms (1.95x)
> Galaxy S20 FE Mali-G77 MP11 600 165ms 360ms (2.18x) 260ms (1.58x)
>
>
> Bug: b/195281495
> Change-Id: I200a2be8e450ab66f7c8ae340a5c83ec6780db09
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437239
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: b/195281495
Change-Id: Ia52d24aa731281b161865b08954f9eeaca0033eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437677
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:10205
Change-Id: Iafee804751d69e98241a7825664f3be04b20eb14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436566
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit 4f12b4a599.
Reason for revert: MSAN issue
Original change's description:
> [COLRv1] Support retrieving ClipBox.
>
> After the discussion in [1] which was filed also in response to feedback
> from Ben, the COLRv1 spec moved to not using a bounding box derived from
> the `glyf` glyph for a give glyph id, but instead either use a ClipBox
> found for a particular glyph id range from a ClipList array in the
> COLRv1 table. If such a ClipBox is not found, perform a traversal of the
> COLRv1 graph to compute the union of rectangles to compute a bounding
> box.
>
> [1] https://github.com/googlefonts/colr-gradients-spec/issues/251
>
> Includes FreeType roll:
> 47b1a541cb..2c853b38a7
>
> Fixed: skia:12297
> Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Release-All-Android_NativeFonts
> Change-Id: Iac3677cb1207b953876b106a1e0d754760612955
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435116
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Dominik Röttsches <drott@google.com>
TBR=bungeman@google.com,drott@chromium.org,drott@google.com,behdad.esfahbod@gmail.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: Id041a270bd2e4d4edcaa114c524981bc2c9e5320
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Release-All-Android_NativeFonts
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437738
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11358
Change-Id: Ic179ddd9d52dca3fc0bd85b61db49097390b7f58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437681
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
I noticed Viewer lagging significantly when interacting with certain
sliders (such as transform state). It turns out that the UI tracking
would trigger calling Window::setRequestedDisplayParams and that in
turn can trigger a full context recreation, depending on backend.
I'd recently changed GPUs in my machine and apparently its context
creation is substantially slower than my previous one. Historically
I noticed minor jank when interacting, but it was never a deal
breaker.
This splits the parameter tracking into two categories so that lighter
weight widgets can still trigger window invalidation / re-rendering,
without triggering the context creation.
Change-Id: I3eb4c15b802f8b8ea8d8eca386de5dcee22ba9ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437685
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:10205
Change-Id: I7c5a0db5018cdc1b25283175d7607947749cfe8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435016
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
After the discussion in [1] which was filed also in response to feedback
from Ben, the COLRv1 spec moved to not using a bounding box derived from
the `glyf` glyph for a give glyph id, but instead either use a ClipBox
found for a particular glyph id range from a ClipList array in the
COLRv1 table. If such a ClipBox is not found, perform a traversal of the
COLRv1 graph to compute the union of rectangles to compute a bounding
box.
[1] https://github.com/googlefonts/colr-gradients-spec/issues/251
Includes FreeType roll:
47b1a541cb..2c853b38a7
Fixed: skia:12297
Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Release-All-Android_NativeFonts
Change-Id: Iac3677cb1207b953876b106a1e0d754760612955
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435116
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Dominik Röttsches <drott@google.com>
Insert/Delete/Backspace
Status line
Change-Id: I38727ddb86bf20cdd6c64363c33ffda03ab3c2c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431179
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
When Type names were converted to string_views, Type::clone wasn't
fully updated to clone the typenames in every case.
Change-Id: I1de8a0ad4b5a367178cd0082aa8ccebafbd93c75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437338
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
7f38e2892c..4686da27b3
2021-08-09 jmadill@chromium.org Add GetImage test with RGB.
2021-08-09 jmadill@chromium.org EGLWindow: Add option to force robust init.
2021-08-09 jmadill@chromium.org EGLWindow: Add option to enable capture limits.
2021-08-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 29702b8b93b0 to bfd7c5a55cd0 (62 revisions)
2021-08-09 gert.wollny@collabora.com Capture/Replay: Add option to override test disabling
2021-08-09 gert.wollny@collabora.com Capture/Replay: rework test runner to use expectations
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 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: Ibcccb067d71a7cf25a8d7fd98796f13e54965d69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437696
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This makes pool handling easier and less error-prone.
Change-Id: I63a6b63a9ff45431921bfbbc56d537a25e2770c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437337
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This reverts commit 717ef9472b.
Reason for revert: Blocking the G3 roll
Original change's description:
> Clean up unflattening paints
>
> Just removing legacy cruft for fonts, and also change to return by
> value (cleaner).
>
> Change-Id: If120931119c32542e06801da2b6d60ba84ba2186
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437676
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=bungeman@google.com,fmalita@chromium.org,reed@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: If735d0212412c0262a6ccb52e7dd224a255906cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437678
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11358
Change-Id: Ie70e45b18c12126c8e86700ad1040bc319be385a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436998
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Just removing legacy cruft for fonts, and also change to return by
value (cleaner).
Change-Id: If120931119c32542e06801da2b6d60ba84ba2186
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437676
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit 0de475e29e.
Reason for revert: likely blocking chrome roll with layout test diffs
Original change's description:
> Use a table for dither effect rather than math.
>
> We used to use integer math on sk_FragCoord, when supported, and a
> fallback using floating point (on a 4x4 rather than 8x8 grid). Now we
> precompute a 8x8 table in a texture because it was shown to be
> significantly faster on several devices. Test was done with the following
> running in viewer with the stats layer enabled and looking at total
> frame time:
> SkRandom r;
> for (int i = 0; i < N; ++i) {
> SkColor c[2] = {r.nextU(), c[1] = r.nextU()};
> SkPoint pts[2] = {{r.nextRangeScalar(0, 500), r.nextRangeScalar(0, 500)},
> {r.nextRangeScalar(0, 500), r.nextRangeScalar(0, 500)}};
> SkPaint p;
> p.setDither(true);
> p.setShader(SkGradientShader::MakeLinear(pts, c, nullptr, 2, SkTileMode::kRepeat));
> canvas->drawPaint(p);
> }
>
> Device GPU N no dither int math dither table dither
> Linux desktop QuadroP1000 5000 304ms 400ms (1.31x) 383ms (1.26x)
> TecnoSpark3Pro PowerVRGE8320 200 299ms 820ms (2.74x) 592ms (1.98x)
> Pixel 4 Adreno640 500 110ms 221ms (2.01x) 214ms (1.95x)
> Galaxy S20 FE Mali-G77 MP11 600 165ms 360ms (2.18x) 260ms (1.58x)
>
>
> Bug: b/195281495
> Change-Id: I200a2be8e450ab66f7c8ae340a5c83ec6780db09
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437239
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: If2ba6bb354ba9cc2933ef516a6d80e1dd809aac2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/195281495
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437456
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
The last flag that was pushed down was removed here:
https://skia-review.googlesource.com/c/skia/+/435018
Bug: skia:12198
Change-Id: Ia184d6a03fe4078e00dd92d9d3cd87596d0c0fcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436999
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Accidentally left these behind in previous change.
Change-Id: I77620d27561ce1c73b9509388cd9253c405a95b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436997
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:10209
Change-Id: I72639b7e768742dcdec810a5a714ce21ff0f6e0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436565
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
We used to use integer math on sk_FragCoord, when supported, and a
fallback using floating point (on a 4x4 rather than 8x8 grid). Now we
precompute a 8x8 table in a texture because it was shown to be
significantly faster on several devices. Test was done with the following
running in viewer with the stats layer enabled and looking at total
frame time:
SkRandom r;
for (int i = 0; i < N; ++i) {
SkColor c[2] = {r.nextU(), c[1] = r.nextU()};
SkPoint pts[2] = {{r.nextRangeScalar(0, 500), r.nextRangeScalar(0, 500)},
{r.nextRangeScalar(0, 500), r.nextRangeScalar(0, 500)}};
SkPaint p;
p.setDither(true);
p.setShader(SkGradientShader::MakeLinear(pts, c, nullptr, 2, SkTileMode::kRepeat));
canvas->drawPaint(p);
}
Device GPU N no dither int math dither table dither
Linux desktop QuadroP1000 5000 304ms 400ms (1.31x) 383ms (1.26x)
TecnoSpark3Pro PowerVRGE8320 200 299ms 820ms (2.74x) 592ms (1.98x)
Pixel 4 Adreno640 500 110ms 221ms (2.01x) 214ms (1.95x)
Galaxy S20 FE Mali-G77 MP11 600 165ms 360ms (2.18x) 260ms (1.58x)
Bug: b/195281495
Change-Id: I200a2be8e450ab66f7c8ae340a5c83ec6780db09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437239
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
We were previously using a mix of pass-by-value and pass-by-pointer (to
allow for explicitly null PositionInfo). Being able to pass a null
PositionInfo didn't really add much, since we can just use a nullary-
constructor PositionInfo instead, so these have all been migrated to
by-value.
Change-Id: Ia31e252cac94f64c4b38c29a54e6e7f752e70672
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437276
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Skia has been using the not entirely public HarfBuzz subsetting API.
This API is changing for public release. In order to make the transition
from old to new build flags were added, which would require build
changes as HarfBuzz is updated downstream. Instead detect the existence
of the old or new API and use whichever is present automatically.
Change-Id: I0727f97ad7d394dfb24553076d4b383570cf0002
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437121
Reviewed-by: Garret Rieger <grieger@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit b942d4b436.
Reason for revert: dependent cl no longer blocking android roll, so
this can be relanded.
Original change's description:
> Revert "Avoid expanding clip ops in tests that will remain after feature removal"
>
> This reverts commit d1c51b2572.
>
> Reason for revert: blocking revert that might be breaking android
>
> Original change's description:
> > Avoid expanding clip ops in tests that will remain after feature removal
> >
> > Bug: skia:10208
> > Change-Id: I4fb2c8181bfb8cac3c8ab95c833094c98f8ee6fc
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436159
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: Ib62cc03f99793f8f1cb0180145b7557101a23ead
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10208
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436957
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
# Not skipping CQ checks because this is a reland.
Bug: skia:10208
Change-Id: Iff6e5b2b245426a76b92e895434613fe16ba717c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437277
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
After adding framebuffer support in Metal, the validator is failing
because we're hitting cases where we're trying to use a pipelinestate
that assumes a stencil attachment to render to a framebuffer
without a stencil attachment. This CL addresses this issue.
Change-Id: I6e95f321aa5820a64a8084c457159f917c37a7c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437119
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
CMake is the only build system which ensures all the referenced headers
actually exist. In the last HarfBuzz roll a few header files were
removed but the headers were not removed from the BUILD.gn file. Remove
the files from the build since they no longer exists.
Apparently CMake bails as fast as possible and only reports one
non-existent file at a time, so this time kept going until it actually
built.
Change-Id: Ib85ef8427a751b507986473ab586a0e7d0261563
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437336
Reviewed-by: Ben Wagner <bungeman@google.com>
To get the Flutter license checks to pass
Bug: skia:12317
Change-Id: I73a1f618276d32a1c737015b5d231daecd8c63ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437236
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
This reverts commit 8ba1e71a1f.
Reason for revert: had missed a few places where GrReducedClip needed to
use the equivalent region op, not skClipOp + replace bool.
TBR=robertphillips@google.com,brianosman@google.com,csmartdalton@google.com
Original change's description:
> Revert "Add SkClipStack::replaceClip() separate from deprecated clip op"
>
> This reverts commit 68587ae274.
>
> Reason for revert: breaking path clipping tests in Android?
>
> Original change's description:
> > Add SkClipStack::replaceClip() separate from deprecated clip op
> >
> > The replaceClip functionality was added to allow Android to move off of
> > generalized expanding clips. At the time, SkClipStack simply used the
> > kReplace_SkClipOp to handle it. In order to remove those expanding ops,
> > SkClipStack will need a proper implementation of replaceClip().
> >
> > The clip elements have an additional field to mark if
> > it's a replace (and it's op will be kIntersect). Adds a temporary
> > getRegionOp() function to unify elements that use this field vs.
> > elements that use the deprecated clip op (i.e. if they were deserialized
> > from an SKP that recorded an expanding op).
> >
> > Clients of SkClipOp that checked for replace ops use the new function
> > instead of referring to the enum value directly.
> >
> > Bug: skia:10209
> > Change-Id: I1c16c87fadb2becfe181db717c05e240ac87fd34
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436158
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Chris Dalton <csmartdalton@google.com>
>
> TBR=robertphillips@google.com,brianosman@google.com,csmartdalton@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: If3f99a7d2f2df99c2b99d431d494ca28da66b1d8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10209
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436956
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
# Not skipping CQ checks because this is a reland.
Bug: skia:10209
Change-Id: I9feb0f3571ec26580bcdf0fe541f43f2ee8cf8d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436959
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
The object type is treated like "any", which is not good.
We can be more descriptive of those types.
Change-Id: I39f3dba635c196ea06163deb358a56c9e4f82f6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437316
Reviewed-by: Florin Malita <fmalita@chromium.org>
This is a "legacy" field in SkPath, and only needed for editing the
path (in funny cases, such as a relative verb or missing moveto).
When we finally make SkPath immutable, we won't need this field at all.
Note: this CL "fixes" the last 2 columns in path_append_extend gm.
They should appear the same as the previous 2 columns.
Change-Id: Ia5f2e8ec586b5f5189fc3ac2cd513fe89d31cd22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436958
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
DSLParser had been broken by https://skia-review.googlesource.com/c/skia/+/436156,
but it was not caught due to being #ifdef'ed out. This restores it to working
order.
Change-Id: Ic30ed6bc1950aeed08f7ae32f8060ec29cdc3cd9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437019
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Most of the code generated by the fuzzer is nonsense, but there is a
method to its madness. The crash is only triggered under specific
conditions:
- The runtime effect has enough helper functions to mostly fill up the
call graph hash-map. It won't rehash until it gets close to capacity.
- There must be several calls to built-in functions, in order to add
elements to the call graph to force a rehash.
The fuzzer-generated code manages to satisfy both these requirements.
Change-Id: I9a1d7535557fedd4e9bfece3930ac86ede291ffe
Bug: oss-fuzz:36655
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437118
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
We assumed that any time a function call was emitted, we could look up
the mangled function name in our function-name map and it would exist.
This was not true for self-recursive calls, as the function name is
only added to the map after the function is emitted.
We now use the `functionName()` accessor to retrieve the function name,
which will synthesize a mangled name and add it to the map if it is
missing.
(It looks like recursive calls will not actually work properly, though,
because `writeFunctionPrototype` doesn't emit any code, and the SkVM
compiler can't handle recursion at all.)
Change-Id: I021f5009709d9eed8306eb71cb7f42cbc4c29ae9
Bug: oss-fuzz:36655
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437117
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
GLSL allows an array of `lowp float` to be compared against `highp
float` seamlessly because the types are considered to be the same. SkSL,
however, treats these as different types, so we need to coerce the types
to allow this comparison to work.
In other words, these comparisons can cause an array to be implicitly
casted. The expression `myHalf2Array == float[2](a, b)` should be
allowed when narrowing conversions are enabled. To allow this to work,
we need a dedicated IR node representing this type coercion.
We now allow implicit coercion of array types when the array's component
types would be implicitly coercible, and have a new IR node representing
that implicit conversion.
This CL fixes array comparisons, but array assignment needs additional
fixes. It currently results in:
"type mismatch: '=' cannot operate on (types)".
Bug: skia:12248
Change-Id: I99062486c081f748f65be4b36a3a52e95b559812
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436571
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
CMake is the only build system which ensures all the referenced headers
actually exist. In the last HarfBuzz roll a header file was removed
because support for an old table was dropped but the header was not
removed from the BUILD.gn file. Remove the file from the build since it
no longer exists.
Change-Id: I3093e215cfa001534247208787a365db73629f2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437196
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>