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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
...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>
...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>
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>