This is a reland of 0596094b81
Original change's description:
> Remove skstd::optional entirely.
>
> Change-Id: Id9862712ea3e769797abd654922879ce6bc4487c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504976
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: Ie5bae44de729aabe50c4e51ad3c7cc476fbc5dc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512358
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
I've updated almost all Win10 Skolo machines to 19044. https://chromium-swarm.appspot.com/botlist?c=id&c=task&c=os&d=asc&f=os%3AWindows&f=os%3AWindows-10&f=pool%3ASkia&f=zone%3Aus-skolo&s=os.
This CL should get the Angle roller unstuck, and any other tasks that currently cannot be scheduled due to lack of capacity.
Context: Some Win10 Skolo machines self-updated from Windows-10-19041 to Windows-10-19043, which prevented some tasks from running due to lack of capacity (the "os" dimension of those tasks is currently "Windows-10-19041"). The solution I went with is to update all those machines to the latest Windows 10 version, then update the "os" dimension of Win10 tasks to match that OS version.
Change-Id: I94dfeb68f04bdddeff29387f2c2bc7049464e543
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509727
Auto-Submit: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Add serialize and Deserialize to TransformedMaskSubRuns.
Bug: chromium:1278340
Change-Id: Ic4fd89c5e0eef8d79a4bbb43367bd2456feb38c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512148
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This should reduce any possibility of keys being built w/ mixed backend snippets. The decision of which backend the key is being created for is made once, when the builder is created.
Bug: skia:12701
Change-Id: I070330627450501eb93ed98271659e1441aaa935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511804
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
I'm going through and fixing up all the code to use validate
before I know about its use.
Change-Id: Iac6a58f925e79ab38e3614ab5e6276bed3e7fc76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512155
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This is an old activity that generates a 5x5 film strip of lottie animations on Android devices.
While unlikely, if this removal breaks something, it will most likely be in our lottie gold instance.
Change-Id: I2d3f6b81b2e5481ed0ae581d2fd86e4e61020e54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512154
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Clean up some names, have the ctor take a TransformedMaskVertexFiller.
This will smooth things out for the serialization code.
Change-Id: I04607b2460509eae6676060c0cfa440069ae808f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512152
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Right now this just checks the creation of the key in debug. In follow up CLs we will pass the data payload to the glue code.
The additional key structure also obviates the need for the block-specific Dump methods.
Bug: skia:12701
Change-Id: Ieddea596de92a4f6b3cf6003f33d7f01d3d28c20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/508678
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
While `CPAL` glyphs may explicitly use the current foreground color,
`sbix` glyphs may also need the current foreground color to be correct.
If a font with an `sbix` table contains glyphs with paths but without
an entry in the `sbix` table the glyph may be drawn from the path.
However, it is not possible to know when this might occur with the
current CoreText API, so it is necessary for correctness to provide the
current foreground color for `sbix` fonts as well.
This is actually quite wasteful as it means caching `sbix` glyphs on a
per-current foreground color basis. However, usually the current
foreground color isn't changing for these fonts.
Change-Id: I1c95820d981d463fde673966b31c2c47ab2f3292
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512147
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
SkCanvas::fMCStack uses SkCanvas::fMCRecStorage for storage, and will
access it in the destructor. Reorder the fields so that fMCStack is destroyed
before fMCRecStorage.
Change-Id: Ie09b9b52820d2dec4b75552dc5c2349b845a01ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509536
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Clean up drawGlyphRunList suggested in a previous CL. The main
serialized strikes, and serialized Slugs is getting large. So,
I broke it up.
Change-Id: I1d116bcf3b28d95e31b4eec7666c0856cea54a48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512159
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
With data with large values we can get into situations where clearly
degenerate quads are not giving a zero determinant, because of
errors when computing the additions and subtractions in sequence.
The solution is to compute the subtractions first, and then add them
together.
Bug: oss-fuzz:41445
Change-Id: I7febead4b020e11a137f1703b761af70c14e4e47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511796
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
If gn generates an otherwise harmless warning, find_headers.py will fail
to parse the gn-generated JSON because gn prints both the warning and
the JSON to stdout. Though find_headers.py prints the output of gn if
JSON parsing fails, a human investigating this failure is likely to
assume that the warning they see is from the build system, not from
find_headers.py, and is not related to the failure.
For example, this warning about an argument which has no effect breaks
the build:
WARNING at build arg file (use "gn args <out_dir>" to edit):36:36: Build argument has no effect.
skia_skqp_global_error_tolerance = 8
^
[...]
Change-Id: Iafa7252ba161e4def1438f5d9480b64fdaa887d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510536
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
gpuSetup() is responsible for calling skiagm::onGpuSetup() which is
responsible for initializing compressed images used in the following
SkQP tests:
- gl_compressed_textures
- gl_compressed_textures_nmof
- gl_compressed_textures_npot
- gles_compressed_textures
- gles_compressed_textures_nmof
- gles_compressed_textures_npot
- vk_compressed_textures
- vk_compressed_textures_nmof
- vk_compressed_textures_npot
Without this patch each of these tests crash. I suspect these tests were
broken by commit a84caa3a5f ("Make some GMs compatible with the *ooprddl
configs").
Change-Id: Iae864996b9b171084c8ceb5374765d510ff56b49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510056
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I51d3f94bcb483e6e3de6f54a2e10683b0ea6d3d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512162
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Erik Rose <erikrose@google.com>
Bug: skia:12701
Change-Id: I648948875a2e9401c0c73cdf4c9c8053c9ba69af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510227
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
These weren't used and added complexity to the dependency graph.
Change-Id: I7e97d73d520b7123e534485d7840538d6b468c48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512145
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
In order to load CanvasKit, we need to add support for statically
served files. On the karma side, this is done by adding an
object [1] to the files list (example: [2]).
Then, we need to include canvaskit.js in with the karma test
files and use the callback to load canvaskit.wasm from the
correct file location.
[1] http://karma-runner.github.io/6.3/config/files.html
[2] 4f7b656012/modules/canvaskit/karma.conf.js (L13)
Change-Id: I7482d6e949a5e8efd0ca882efe5afbe0dc16c0e4
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510736
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Run the tests in headless mode and output the logs
bazel test :hello_world --test_output=all
Start up a visible web browser with the karma test driver
(need to go to Debug tab to actually run tests)
bazel run :hello_world
Suggested review order
- package.json to see the karma dependencies to run
jasmine tests on chrome and firefox.
- WORKSPACE.bazel to see how the packages listed in
package.json and package-lock.json are downloaded
into the Bazel sandbox/cache via the npm_install rule.
As mentioned in the package.json comment, the version
of build_bazel_rules_nodejs which emscripten uses [1]
is 4.4.1 and if we tried to install it ourselves, that
installation will be ignored. We also bring in hermetic
browsers via io_bazel_rules_webtesting.
- bazel/karma_test.bzl which defines a new rule _karma_test
and a macro karma_test which joins the new rule with
an existing web_test rule to run it on a hermetic browser
which Bazel downloads. This rule takes heavy inspiration
from @bazel/concatjs [2], but is much simpler and lets us
configure more things (e.g. proxies, so we can work with
test_on_env).
- karma.bazel.js, which is a pretty ordinary looking karma
configuration file [2] with effectively a JS macro
BAZEL_APPLY_SETTINGS. JS doesn't have a preprocessor or
actual macros, but this string will be replaced by the
JS code in karma_test.bzl which will set correct filepaths
for Bazel content.
- All other files.
[1] c33c7be17f/bazel/deps.bzl (L10)
[2] 700b7a3c5f/packages/concatjs/web_test/karma_web_test.bzl (L318)
[3] http://karma-runner.github.io/6.3/config/configuration-file.html
Change-Id: Id64c0a86d6be37d627762cef0beaaf23ad390ac1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509717
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
This reverts commit 10241484aa.
Reason for revert: Speculative revert for b/220676062
Original change's description:
> 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>
Bug: skia:12516
Change-Id: If496c6be355bbb026ffe478512f8a6334116bb66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511806
Commit-Queue: Brian Osman <brianosman@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This reverts commit 05a4b12dbd.
Reason for revert: Speculative fix for b/220676062
Original change's description:
> Don't dither const shaders that don't have a GP override
>
> https://gold.skia.org/detail?test=gradients_no_texture&digest=008c796df4da7fbb6718e96db2c36c90
>
> If paintFP was only non-null because it came from the main SkShader, we
> should defer to SkPaintPriv's check that the shader is not a constant.
> We don't have a isConstant() for FPs so this assumes that if the GP
> overrides it with a new FP it probably is doing something spatially
> interesting and does need the dithering.
>
> Bug: skia:12516
> Change-Id: I7935ba8f0baf91e7b7ba07280452871c60ffd3e8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509996
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:12516
Change-Id: I9c45f457d42cd5890cc110617e1636ffa6669503
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511807
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Brian Osman <brianosman@google.com>
SkTArray.h uses std::max() which is part of <algorithm>.
Some libc++ changes have stopped exporting <algorithm> from certain headers, causing skia to break with ToT libc++.
2e2f3158c6
Change-Id: Iee4e00b3b3a6cbe2c1881453d05c0658e95a767b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512016
Commit-Queue: Arthur Eubanks <aeubanks@google.com>
Auto-Submit: Arthur Eubanks <aeubanks@google.com>
Reviewed-by: Erik Rose <erikrose@google.com>
Commit-Queue: Erik Rose <erikrose@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: I682e6cd5e02b7b43740c51caf59451da9e789a75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511799
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Switch to using the public API similar to SkTextBlob for
serialize/Deserialize. Add deserializeSlug to SkStrikeClient.
Bug: chromium:1278340
Change-Id: I91b93487859c662e3bfdfba49ba4758f13529cd9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511601
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This fixes a build bot problem. Because this is run with
--nonativeFonts, we are building a descriptor that can't be
turned into a strike. Make failure to find the strike return
an error instead of asserting.
In addition, use the proper code idiom for checking condition in
other parts of the code.
Change-Id: I3fc4051bf93e8f5308ac55bebd4218c04b5a6620
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511797
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
All users have been updated. This flag and the code it guards can now be
removed.
Bug: skia:12956
Change-Id: I8115235fdbe12f8afa1973f43f0f2870447e5e01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511756
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Dominik Röttsches <drott@google.com>
Commit-Queue: Dominik Röttsches <drott@google.com>
Use the SkStrikeClient to do the TypefaceID translation if present
when creating a GrGlyphVector.
With this change, Chromium should be able to use the
flatten/MakeFromBuffer API. Currently, this will only
serialize DirectMask (the most common type) drawing.
Other SubRun type will follow soon.
Bug: chromium:1278340
Change-Id: I08a46c7e4e13f7bd899abfdad89c5b3db2548d6a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/511416
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This failure happens when using the SkRemoteGlyphCache system
*and* serializing slugs. The problem is that the origin from the
blob conversion was applied twice causing all the sub-pixel
positions to be off. This often pass because this position often
is {0, 0}.
Change-Id: I0384cfc1de5c32851381390661d1f4a8a6595ab2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510724
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Previously, FreeType was always instructed to hint or autohint the layer
glyphs of COLRv0 fonts. Instead, pass the appropriate loading flags
through so that the layer glyphs will be created similarly to how the
base glyph would be handled. The behavior change is gated on
SK_IGNORE_FREETYPE_COLRV0_LOAD_FLAGS_FIX because this will require
rebaselining some Blink layout tests.
Also ensure that COLRv1 subglyphs are never hinted or autohinted for
now. These are a bit more complex and allowing hinting will need to be
handled separately.
Bug: skia:12956
Change-Id: Ia69f7a0e207b1af885ed5039f9e53007125b707e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/510876
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Dominik Röttsches <drott@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>