Commit Graph

59305 Commits

Author SHA1 Message Date
Michael Ludwig
ee45d92013 Use VectorXform to determine parametric segments for stroke curves
Change-Id: I088119d01d31d58b154e49479aa071ac68938cb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502059
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-17 15:28:17 +00:00
Jim Van Verth
1729710b51 [graphite] Add TextureProxyView class.
Bug: skia:12845
Change-Id: I2cf5074f85242f51b3798c59d4450c043a99afee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509916
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-02-17 15:22:40 +00:00
Ben Wagner
814652c373 Revert "Preserve base device origin on saveLayer and image filters"
This reverts commit f436cf2343.

Reason for revert: May need to be behind flag or more
suppressions. Breaking linux-rel vulkan_swiftshader_blink_web_tests
css3/filters/effect-blur-hw.html .

Original change's description:
> Preserve base device origin on saveLayer and image filters
>
> SaveLayerOriginTest taken from https://skia-review.googlesource.com/c/skia/+/277977
>
> Bug: skia:12732
> Change-Id: I5ce75355bb16237043c229e1cbc7a106eb636d18
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508919
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

Bug: skia:12732
Change-Id: I74cc8dc279d22c4fbd313ae3caeb4d0748daf003
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510196
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-17 13:48:07 +00:00
Dominik Röttsches
01be94d7f1 Support font palette overrides through SkFontArguments
Co-authored with Ben Wagner, bungeman@google.com.

Similar to how we allow configuration of variable font configurations,
provide additional SkFontArguments to select a base palette and a set
of potentially sparse color overrides.

This is required for implementing CSS font-palette.

Modify the more_samples-glyf_colr_1.ttf to have two additional palettes,
and two additional test glyphs, one that draws with COLRv0 logic, one
that draws with COLRv1 logic and has a foreground palette index dot
in the middle. See [1] & [2] for the additions to the test font.

Add a GM which tests this on the SkFontMgr_custom using makeClone() and
makeFromStreamArgs(). The test displays the two glyphs in default
palette on the left, then with palette overrides (as in the title of the
test) on the right. The first row uses a typeface created with
makeFromStreamArgs(), the second uses one created with makeClone().

[1] https://github.com/googlefonts/color-fonts/pull/91
[2] https://github.com/googlefonts/color-fonts/pull/92

Bug: skia:12730, chromium:1170794
Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_NativeFonts,Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-NativeFonts
Change-Id: Ia1334f069240edc78fd4791969914e8a6f4fbaf9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/479616
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-17 13:19:53 +00:00
skia-autoroll
76699a4495 Roll SwiftShader from 13f7365e81be to 4228bb95b5b5 (7 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/13f7365e81be..4228bb95b5b5

2022-02-16 capn@google.com Fix and improve exp2 accuracy
2022-02-16 capn@google.com Fix handling overflow in Exp2()
2022-02-16 capn@google.com Exhaustively test the exp2 implementation's conformance
2022-02-16 sugoi@google.com Support render area instead of extent in Renderer::draw()
2022-02-16 swiftshader.regress@gmail.com Regres: Update test lists @ 13f7365e
2022-02-16 sugoi@google.com Small resolveDepthStencil refactor
2022-02-16 sugoi@google.com Format fix in VkPromotedExtensions.cpp

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 fmalita@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: fmalita@google.com
Change-Id: Iacc4f79b0dc7eac63148655982e48c7c884ee1e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510098
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-17 04:58:44 +00:00
skia-autoroll
5505a02ca1 Roll Dawn from 703ed278c32d to 6cc74dce933e (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/703ed278c32d..6cc74dce933e

2022-02-17 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 4a15605be725 to afb02e8ec7cd (1 revision)
2022-02-17 jiawei.shao@intel.com Add validation on format when creating a multisampled texture
2022-02-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 6b02308bdccf to 956ca5369840 (3 revisions)
2022-02-16 ccameron@chromium.org Expand GetFormatEquivalentToIOSurfaceFormat
2022-02-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 13f7365e81be to 043a8084c1cb (4 revisions)
2022-02-16 enga@chromium.org Don't try to load libvulkan on Mac
2022-02-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from eeddb05040ba to afacf7f9967a (6 revisions)
2022-02-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 0863290dc7f6 to 13f7365e81be (10 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 4a15605be725 to afb02e8ec7cd

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 kainino@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: kainino@google.com
Change-Id: I958339b7114b1726896ef3b8ad0e18c93e16f866
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510097
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-17 04:43:16 +00:00
Erik Rose
e6fba0a50b [infra] Stop overspecifying the version of 10.14.
There are no more 10.14.3 bots in the farm and haven't been for some
time. This made all 10.14 tasks fail to run.

All we have now is 10.14.6, so we can remove the first if clause.

The second talks about an OS key that isn't even in the hash anymore, so
it can go away too.
Change-Id: I53cd54c9520b8a10f72de8e413f023027cdf8088
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509728
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Erik Rose <erikrose@google.com>
2022-02-17 00:50:45 +00:00
Michael Ludwig
f436cf2343 Preserve base device origin on saveLayer and image filters
SaveLayerOriginTest taken from https://skia-review.googlesource.com/c/skia/+/277977

Bug: skia:12732
Change-Id: I5ce75355bb16237043c229e1cbc7a106eb636d18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508919
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-16 22:20:12 +00:00
Herb Derby
d3243f660e working serialize Slugs with DirectMask runs
Add fully functional flatten, and MakeFromBuffer functionality
for the DirectMaskSubRunSlug type. The other runs will need to come
later.

Add MakeFromBuffer stubs for all the rest of the subrun types.

This has a single unit test to check basic functionality of
flatten and MakeFromBuffer calls.

Change-Id: I379ded4609a2160170ed6a3670c7c7b6ed2c5b2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509137
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-16 19:53:17 +00:00
Herb Derby
e39f253c2a add facilities for flattening different subrun types
Change-Id: Ie223b7ef7035df0c2e40b4b2dd026170a23dbd18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509557
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-16 18:49:41 +00:00
Erik Rose
d714e1ebe1 [infra] Remove job mistakenly made for nonexistent OS-12 Skolo Minis.
Back in 47045c9e06 I had meant to "Add a
Debug-All-NativeFonts CPU job for all OS versions on the new Mac Mini 7.1s."
Well, none of those is running 12.

Change-Id: I9dd13ce33c9a4004faf4da5f53d25c5ce5d8ec04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509718
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Erik Rose <erikrose@google.com>
2022-02-16 16:39:41 +00:00
Michael Ludwig
66470f8b7d Pre-construct device-to-layer matrix for skif::Mappings
SkCanvas and SkDevice were using SkM44 and its definition of invert(),
but it was slightly more generous than SkMatrix::invert() so the fuzzer
caught a case where the layer's SkDevice had a valid transform but then
converting it to a SkMatrix in skif::Mapping was no longer invertible.

This modifies it so that skif::Mapping no longer tries to invert the
matrices. In almost all cases, the inverse of the layer-to-device
matrix can be constructed directly from a matrix multiply (that's what
device->getRelativeTransform() does). When the matrices are
ill-conditioned the constructed inverse may be inaccurate (hence why
SkMatrix::invert reports false), but in practice this happens for
ridiculously large transforms and the error isn't significant compared
to the precision range of the matrices anyways.

Other cases explicitly want to use the identity matrix for the layer
to device matrix, so I added a helper in the few places that would have
had to pass SkMatrix::I() twice instead.

The last case is drawImage() that creates its own skif::Mapping, now it
just calculates the inverse that skif::Mapping() would have done and if
it fails it drops the draw since it means the canvas matrix is bad.

Bug: chromium:1276525
Change-Id: Ib516bb2fac19d5e7397bd27d80f8e3932b25b2e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509396
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-16 16:26:40 +00:00
Herb Derby
2865ea30ff serialization framework down to the Slug level, but not runs
Change-Id: I687ba55a61dd5d0509190804f19255851c328a31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509502
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-16 16:15:50 +00:00
Julia Lavrova
7b5b00aaf1 Fixing some inconsistencies in blitter selection.
So --skvm and --forceRasterPipeline flags work more correctly.

Change-Id: Ia1c3560a61dda4800785b1e7ad1a0e41fe42594d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509719
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-02-16 16:08:54 +00:00
Herb Derby
e444402333 add default ctor for SkGlyphRect
Change-Id: I18bba62b999c3b8920daf831dc512837a23e29a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509785
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-16 15:26:26 +00:00
Michael Ludwig
0b124c444e Fix mask/image filter bounds calculation for inverse-filled paths
Bug: skia:12587, skia:10959
Change-Id: I43dea5f2d2f54c7db47e778ac9c7bac53ae4998d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509176
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-16 15:09:42 +00:00
Jim Van Verth
d6245fc4aa Rename GrSwizzle to skgpu::Swizzle
Bug: skia:12845
Change-Id: Ia03293c4efdad4c5381a713c9d7d4857b79530c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509398
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-02-16 13:30:14 +00:00
skia-autoroll
c3f0a82b2b Roll SwiftShader from 5f1c00bda1c1 to 13f7365e81be (5 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/5f1c00bda1c1..13f7365e81be

2022-02-16 capn@google.com Skip testing subnormals when flushed to zero
2022-02-16 capn@google.com Benchmark the effect of flush-to-zero / denormals-are-zero
2022-02-15 capn@google.com Don't treat all warnings as errors in tests and benchmarks
2022-02-15 swiftshader.regress@gmail.com Regres: Update test lists @ 5f1c00bd
2022-02-15 capn@google.com Don't silently ignore unsupported extension structures

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 fmalita@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: fmalita@google.com
Change-Id: I27acbd087712186a63f9d9c8cb5391cc62a66e46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509618
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-16 04:59:14 +00:00
skia-autoroll
5b7649746c Roll Dawn from 3a60f96079c8 to 703ed278c32d (9 revisions)
https://dawn.googlesource.com/dawn.git/+log/3a60f96079c8..703ed278c32d

2022-02-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 5f6a185d0210 to 4a15605be725 (1 revision)
2022-02-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from ad4fae642fe8 to eeddb05040ba (13 revisions)
2022-02-15 shrekshao@google.com Fix predefined color space undefined jsrepr
2022-02-15 senorblanco@chromium.org Re-enable compilation of GL backends in Chromium.
2022-02-15 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from d0ec88ce6161 to 5f6a185d0210 (3 revisions)
2022-02-15 jrprice@google.com Roll Tint and update WGSL syntax for overrides
2022-02-15 enga@chromium.org Add additional guards in counter set feature checks
2022-02-15 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from a7f412ebb116 to 0863290dc7f6 (6 revisions)
2022-02-15 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from a0bc9dab4eef to ad4fae642fe8 (3 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from f1d570a11eba to 4a15605be725

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 kainino@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: kainino@google.com
Change-Id: I37ea0cab6f871b112c1cfa79af294c92ef8a4a95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509617
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-16 04:46:19 +00:00
Leandro Lovisolo
34e3b35eb4 [codesize] Define more CodeSize tasks for testing purposes (both for CQ and waterfall).
Bug: skia:12151
Change-Id: I0ab5c8d6e48c8f90d825c0a8636d60571b3db708
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509504
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
Auto-Submit: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-15 23:42:43 +00:00
Kevin Lubick
149938e8e3 [canvaskit] Rename some CK-specific defines
The one use of the define in //modules/skottie was in an old
G3 BUILD file which has since been deleted.

Change-Id: I3cbb0dd2bcbff7de433b2d044b3e7a0c34a45240
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509400
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2022-02-15 22:42:17 +00:00
Kevin Lubick
56438322bd [fuzz] Fix unreachable code warning
Change-Id: I18fb0be2ae900cd99c20aa65eea85fff1e367876
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509399
Reviewed-by: Leon Scroggins <scroggo@google.com>
2022-02-15 22:41:11 +00:00
Kevin Lubick
eec8edb660 Remove skottiekit experiment
Takeaway: A specific skottie WASM build *would* improve load time and
code size

This experiment is unused otherwise.

Change-Id: I78ab8c3936c7ac2b5e6e3af08e6f5b749d89265d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509401
Reviewed-by: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-02-15 22:40:08 +00:00
Herb Derby
59452acdc0 support making slugs using the full strike cache
Converting slugs through the remote glyph cache's strike can't work
because the the thing cache doesn't retain enough glyph information
to make slugs. Use the current thin strike cache for analysis, but add
a new painter that holds the full SkStrikeCache.

Change-Id: I6b1646827d78049d2fc5f2e0fd7a2ea1add1b639
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509500
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-15 22:21:59 +00:00
Ben Wagner
c9ca00910a Support for COLR foreground color in CoreText.
COLR fonts can use a magic palette index value 0xFFFF to indicate the
foreground color of the drawing context. Modify the CoreText port to
properly indicate when the foreground color is needed and use it.

Bug: skia:12576
Change-Id: I14818b34fbe40ee508ed720510be53bc289c748a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509178
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-15 21:42:23 +00:00
Ethan Nicholas
85e7f31e6d Rewrote SkSL binary documentation
Change-Id: I2780f33599c65fa8fb76d01c4ca2f464d2a9fd8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508116
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-02-15 19:55:18 +00:00
Herb Derby
0ec59b90ab add SubRunType for each SubRun to facilitate deserialization
Change-Id: I058eb13d4efc20197d81f15d2261906950d6e92e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509397
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-15 19:25:43 +00:00
Michael Ludwig
10241484aa Fix dithering on drawImage[Rect] calls
Bug: skia:12516
Change-Id: Ibb68558e0f474143df3c6a5fb0fb3d4881529226
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508677
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-15 18:59:02 +00:00
Kevin Lubick
7f568e968e [bazel] Update to use emsdk 3.1.4
PS1 regenerates the BUILD.bazel files

This allows us to use closure to minify the JS in canvaskit.js

Change-Id: Ib8326d2e3a19cd2168b740b6946f9165a2810133
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509177
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-02-15 17:47:03 +00:00
Robert Phillips
ee910053ec [graphite] Add first version of Blend Shader support
This CL adds children to the SkPaintParamsKey and ShaderInfo objects and then uses them to implement the blend shader glue code.

Bug: skia:12701
Change-Id: I6750fe375b20a5c1cda315336bfcb3feda8cab28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505297
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-15 17:18:10 +00:00
Kevin Lubick
c13cd6479d Reland "Build CanvasKit using GN/Ninja"
This is a reland of ecac712bec

Changes (best viewed comparing PS1 to latest)
 - Use emsdk 3.1.3 which includes important bug fixes
 - Remove unnecessary steps in compile.sh
 - Fix use of various gn args.
 - Avoid conflicts with Flutter's GN symbols
 - Add/update docs
 - Make activate-emsdk script compatible with our infra.

Original change's description:
> Build CanvasKit using GN/Ninja
>
> Build with
>
> ./bin/gn gen out/wasm_debug '--args=target_cpu="wasm"'
>
> or
>
> ./bin/gn gen out/wasm_release '--args=target_cpu="wasm" is_debug=false'
>
> Change-Id: Ib74586bf8397d57064a3899eaa6da76f9bce9049
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502036
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

Change-Id: I601712a8953c2799fa029e782e097905b95e6b59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507717
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-15 16:31:10 +00:00
Robert Phillips
d184c1b12d [graphite] Add uniform name mangling and a uniform padding cheat
The name mangling is pretty simple. The uniform padding cheat is that all uniform blocks are now multiples of 16B so can always just be blindly concatenated.

Bug: skia:12701
Change-Id: I738b0669d13b11ad22096caf73af3e0c52fc0585
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506879
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-15 16:22:44 +00:00
Herb Derby
bd7f5d9ce0 use GrTextReferenceFrame consistently in SubRuns
Change-Id: I6f221fa3d3df98aeb9a2b955d4d8724a6fb0cc0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509136
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-15 15:49:11 +00:00
Brian Osman
1bd59cf10b Remove g8 config from DM/FM. Switch CPU bots to test r8 instead.
Change-Id: I1bef9f9c8db0147d8cfb60354aa519cc3ca61b43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507319
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-15 15:46:10 +00:00
Kevin Lubick
c0fcc50344 [canvaskit] Add in fillText to spreadsheet demo for comparison
The drawGlyphs implementation seems to have a 20-30% performance
edge and drawText is a few percent slower than fillText on my
machine.

Change-Id: I5b8a623bcd4fdbfea3d534d3dbaf3d6f38d37e55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508921
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-02-15 15:35:43 +00:00
Robert Phillips
4d62cd4892 [graphite] Add hook for dynamically generated glue code
Bug: skia:12701
Change-Id: I67100f3e182211b7f161d0574d75e8837cfd6835
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506537
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-15 15:05:42 +00:00
Greg Daniel
e39cebef73 [graphite] Merge Resource and ResourceRef together.
There really isn't anything we are gaining from keeping these class
separate. Originally the model was copied when porting over from Ganesh,
but I believe even in Ganesh the split mostly exists because GrResource
use to be public and we friended classes in it.. Since Resource is
internal and there are no plans to friend classes, the split is not
adding much value and just adds extra coding hopes.

Bug: skia:12754
Change-Id: I2e94b459d82b9295fa8450a94c612c593337fb98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508676
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-02-15 14:48:54 +00:00
dependabot[bot]
9fae1e741e Bump follow-redirects from 1.13.0 to 1.14.8 in /modules/canvaskit
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.0 to 1.14.8.
<details>
<summary>Commits</summary>
<ul>
<li><a href="3d81dc3237"><code>3d81dc3</code></a> Release version 1.14.8 of the npm package.</li>
<li><a href="62e546a99c"><code>62e546a</code></a> Drop confidential headers across schemes.</li>
<li><a href="2ede36d7c6"><code>2ede36d</code></a> Release version 1.14.7 of the npm package.</li>
<li><a href="8b347cbcef"><code>8b347cb</code></a> Drop Cookie header across domains.</li>
<li><a href="6f5029ae1a"><code>6f5029a</code></a> Release version 1.14.6 of the npm package.</li>
<li><a href="af706bee57"><code>af706be</code></a> Ignore null headers.</li>
<li><a href="d01ab7a5c5"><code>d01ab7a</code></a> Release version 1.14.5 of the npm package.</li>
<li><a href="40052ea8aa"><code>40052ea</code></a> Make compatible with Node 17.</li>
<li><a href="86f7572f93"><code>86f7572</code></a> Fix: clear internal timer on request abort to avoid leakage</li>
<li><a href="2e1eaf0218"><code>2e1eaf0</code></a> Keep Authorization header on subdomain redirects.</li>
<li>Additional commits viewable in <a href="https://github.com/follow-redirects/follow-redirects/compare/v1.13.0...v1.14.8">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=follow-redirects&package-manager=npm_and_yarn&previous-version=1.13.0&new-version=1.14.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/google/skia/network/alerts).

</details>

This is an imported pull request from
https://github.com/google/skia/pull/93

GitOrigin-RevId: cd866a81a4068daa7417ff084ef9369795b57cb5
Change-Id: I6a5acd8505472d13c9e00fb7965c08632d7dffc5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508996
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-02-15 13:42:38 +00:00
skia-autoroll
1e3d307ba7 Roll ANGLE from 06edae72ba69 to e5045587752d (9 revisions)
06edae72ba..e504558775

2022-02-15 yuxinhu@google.com Debug Overlay Demo
2022-02-14 cclao@google.com Vulkan: Switch XFB counter buffer to suballocation
2022-02-14 cclao@google.com Vulkan: Switch stencilBlitResolveNoShaderExport to suballocation
2022-02-14 andrew-naumov@yandex-team.ru Unicode support for system_utils on Windows
2022-02-14 cnorthrop@google.com Tests: Add MARVEL Strike Force trace
2022-02-14 syoussefi@chromium.org Vulkan: Enable overlay by default with debug layers
2022-02-14 m.maiya@samsung.com Vulkan: Enable subgroup feature in GenerateMipmap.comp
2022-02-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 071bfca11aa9 to 2d1377ec02b5 (11 revisions)
2022-02-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from c0b2804cbd93 to c9825531290b (658 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 fmalita@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: fmalita@google.com
Test: Test: angle_perftests --gtest_filter="*marvel_strike_force*"
Change-Id: Iae7e0fda613fd79403ea3f578d69af914527d26a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508979
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-15 06:26:10 +00:00
skia-autoroll
899b5fcb2b Roll Chromium from d4e809c3175f to 8fa4c9362816 (556 revisions)
d4e809c317..8fa4c93628

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 fmalita@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: fmalita@google.com
Change-Id: I46bc9ecec0f7ec881c97a87b19e4e097eb7d46b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508976
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-15 05:15:08 +00:00
skia-autoroll
fc0385c86c Roll SwiftShader from f908b18550c9 to 5f1c00bda1c1 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/f908b18550c9..5f1c00bda1c1

2022-02-14 natsu@google.com Fix `WARNING: UNSUPPORTED:` warnings for having external format in sampler
2022-02-14 penghuang@chromium.org Win32SurfaceKHR: use StretchDIBits to replace StrectchBlt.

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 fmalita@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: fmalita@google.com
Change-Id: I65772415b5faeae9dd3eb8d0d453716dd09adcfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508978
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-15 05:02:15 +00:00
skia-autoroll
9e49b5096e Roll Dawn from 3b88de520185 to 3a60f96079c8 (7 revisions)
https://dawn.googlesource.com/dawn.git/+log/3b88de520185..3a60f96079c8

2022-02-15 hao.x.li@intel.com Reset root descriptor table for samplers when descriptor heaps are changed
2022-02-14 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from c6f5a5bbe6cf to a0bc9dab4eef (6 revisions)
2022-02-14 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from f95f11417eb2 to f1d570a11eba (1 revision)
2022-02-14 bajones@chromium.org More verbose BindGroupLayout error messages
2022-02-14 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from f868b4437065 to 6b02308bdccf (77 revisions)
2022-02-14 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 6f9ac3524a0f to f95f11417eb2 (1 revision)
2022-02-14 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 06edae72ba69 to c6f5a5bbe6cf (1 revision)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 6f9ac3524a0f to f1d570a11eba

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 kainino@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: kainino@google.com
Change-Id: I676f5ca6d373c73309e7f158c0e834c2c30069e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508977
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-15 04:43:43 +00:00
Ben Wagner
843bc16686 CoreText color glyphs are not rendered with paths.
Properly report that CoreText color glyphs are not rendered from simple
paths. This prevents sbix, COLR, and SVG fonts from switching from color
to path at large sizes.

Bug: chromium:1266022
Change-Id: Ic59f0e28a08acebe192e56c5657b2ff29d063d57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508917
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-15 02:27:16 +00:00
Ben Wagner
b9b550e9bb Avoid undefined pointer overflow in neon mask opts
When blitting out of a mask with nine patch, the nine patch code may
call the blitters with a mask row bytes of zero, with the intention of
blitting the same row out of the mask into many rows of the destination.

In D32_A8_Opaque_Color_neon and blit_mask_d32_a8_black when
SK_ARM_HAS_NEON it is assumed that the maskRB >= width. If the maskRB
are less than the width, the maskRB -= width underflows, which is
defined, but the later mask += maskRB is not, as this wil be the
addition of a very large integer to the mask pointer, which is
definitely larger than the mask allocation. In practice on a twos
compliment machine with sizeof(size_t) == sizeof(void*) with a flat
address space this works out, but it is undefined behavior.

When calculating the mask adjustment instead calculate and store it as
ptrdiff_t. After ssa, this is effectively the same code but with a
signed add to the mask pointer instead of unsigned.

Discovered with dm with ASAN (with UBSAN) on arm64 Mac.

Change-Id: I4c8967730c802039e192750927e10f13282258b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508680
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-14 22:36:13 +00:00
Jim Van Verth
c94eb30c6e Check for count == 0 when computing center of mass.
Bug: oss-fuzz:41243
Change-Id: I0297469057826f83ab35c43733ffb7d3cc5b9965
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508679
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-14 21:37:05 +00:00
Erik Rose
b493da459e [infra] Add Mac 12.x CPU NativeFonts_ASAN job.
Change-Id: Ifcd6e9ced293d51b5c75849ec4a6a9899b2a0459
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506780
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Erik Rose <erikrose@google.com>
2022-02-14 20:47:44 +00:00
Erik Rose
046c0cf8a4 [infra] Add a Debug-All-NativeFonts GPU job on 10.15
...since the other Debug-All-NativeFonts GPU job is on a different GPU
and CPU ISA.

Add an "i5" extraConfig option so we can distinguish between the 2
differently-CPU'd MacMini7,1s.

Change-Id: I609d5361c313a005d888ca7a847375cad78dec01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506778
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-02-14 20:47:44 +00:00
Erik Rose
0ecfde718c [infra] Add a Debug-All-NativeFonts GPU job on Mac 12.x
...since we have so many of those machines (which were recently racked).

Change-Id: I61baa5d7b5140633d707411ab3a7a9ecc376b042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506777
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-02-14 20:47:44 +00:00
Herb Derby
014ebf1bdd add infrastructure for unflattening size for Slugs
First, count the number of sub runs in this Slug.

Second,the Slug is allocated as a large block with an arena at the
end of it. Calculate a hint for allocating that initial large block.

This does not do the calculation for the different sub runs. We are
doing the direct mask case first. Others can be added later.

Change-Id: I80ed206177b50d9bb0742f4d826c3372d12b6fe3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508639
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-14 20:41:17 +00:00
Herb Derby
67f72e232c unify array creation for DirectMaskSubRun*
Change-Id: I05bc49b1bc2946009c29ab50553c7de2bff27978
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508638
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-14 19:36:24 +00:00