SkVx.h attempted to not use vector instructions if SKNX_NO_SIMD was set.
However, this was incomplete and could lead to a wasm build with
SKNX_NO_SIMD still trying to use some vector instructions which are
not present if __wasm_simd128__ is defined.
This change requires some additional "include what you use" includes
since some other files were depending on SkVx.h including the vector
instruction headers.
Bug: cl/421848579
Change-Id: I6a878d64b76677a925b94724926c62f3e42ddd4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496313
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This was added with d2ccc772d "Changes to public.bzl to support building
on iOS with objc_library bazel target." [0]. A recent test showed
nothing that breaks by removing this define, so try removing it now.
[0] https://codereview.chromium.org/1639443002
Change-Id: I9938e6a66b29e18332d9e7c4f60e2f2b2a5355ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496606
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This eliminates a handful of useless statements. They were harmless, but
presumably this saves optimization work for the GLSL compiler.
(Patterned after http://review.skia.org/496377 )
Change-Id: Ibe135750488a9917b982dcac67f22b3765412ee1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496599
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
These are harmless, but they can cause the Metal compiler to emit a
warning, and these warnings are making some logs messy for Flutter.
Change-Id: I21b7a3c9ae661c55bbbe8bc13d097966180e977d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496377
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Avoids needless creation of nearly-identical programs. If someone ever
animated a two-point conical gradient, this was a disaster waiting to
happen.
Change-Id: I49008591fec703ef86eb331d7df87f3405ff15ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496603
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This will give us better control (or, at least, the ability to provide a
cleaner error) when we make schema changes.
Change-Id: I4e9a41dd9084647d1c2ceb1d7815b2942f4903ce
Bug: skia:12755
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496602
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
This returns a string_view of the JSON string (via begin() and size()).
Change-Id: I5f92848f4dfdd2be034beb0e48f3fb651ee97640
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496600
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
The blend/compose shader's dump method will need to recursively call SkPaintParamsKey::DumpBlock
Bug: skia:12701
Change-Id: Iab7c26bf5410c2429e4932859b91d741caeed4b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496311
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: Ic664ad0134d61dcf939dcf585a81d53e29c6afcc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496597
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Bug: skia:12701
Change-Id: Ifa6b600b445a78f4ba936bf763adb2a5bf4d7542
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496299
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:12701
Change-Id: I067a28939a2d92b54d76fa519b659bd54bc99906
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496309
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Previously, cloning such a node would have dereferenced a null pointer.
Change-Id: Id2f8248b3bbe3233f14e93d1383c95ee45ad6fc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496376
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:12817
Change-Id: Id555b205a8d99b204f211c1a6f51a25f8124cdfb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496298
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
The previous command line parsing was extremely limited and did not
allow us to easily add additional flags. This generalizes the parse so
that we are not dependent on fixed numbers of arguments in fixed
positions.
In the future we may be able to use CommandLineFlags, but right now it
doesn't completely support our needs.
Change-Id: I55bdc993e9ea71a85678d11b991dfc69e151b014
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496098
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Added namespace for local functions, etc.
* Change variables to use Skia nameing
* add this->
* enhanced SkGlyph with setImage()
* move MapOps to where it is used
* move SkFuzzDeserializeSkDescriptor to be globally visible
Change-Id: Id15acde9d3c6a1b116cff3262ab6f6c62d171b16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/496237
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Bug: skia:12701
Change-Id: Id6ce588c28413b32b864f22cec73a5e90a9ec376
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494756
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This binary triggers a compiler bug when built with ThinLTO. Opt it out
of LTO to workaround the breakage.
Change-Id: Idf23d384328d19c5a146375d466a568ed2f0a827
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/495596
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Bug: skia:12633
Change-Id: Id0bd892375e3a3e2886714f19b7fd8da2232e4e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/479736
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
The SwiftShader OpenGL frontend is officially unsupported. They strictly
support their Vulkan frontend only.
Bug: skia:12218
Bug: skia:12820
Bug: skia:12826
Bug: skia:12829
Change-Id: Ib2e43783e18fcabfa2df9268c29bcd610350e5a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437149
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Christopher Dalton <csmartdalton@google.com>
The tests for these methods are only handled in Javascript, so the type
mismatches weren't detected until I tried using the calls in Typescript
later.
Change-Id: Ifb233f871be1146d3f059b166b7de40bb401d4c9
Bug: skia:12818
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/495417
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>
We've run into drivers a few times now that have bugs where they only
expose vkGetInstaneProcAddr and not vkGetDeviceProcAddr. The latest
being swiftshader (which is getting fixed). To avoid this issue in the
future we can just have our tests use vkGetInstanceProcAddr to get
vkGetDeviceProcAddr.
Change-Id: I6d73abde507519c145b873042393f50ce6c4527c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494822
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Just a placeholder for now until we have a better sense of what we want.
Bug: skia:12817
Change-Id: I75a76cb990c5a63bd2eefb5916ead3bff6742739
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494036
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
We shouldn't be trying to run the convex routine on known non-convex
polygons, and the offset routine only works for simple polygons.
Bug: oss-fuzz:43588
Change-Id: Ia1c73d05d7b1496c9d0599ee36eafe1d58684fd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494818
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This leads to a crash when trying to precompile otherwise.
Change-Id: I40264b9ec09078214f2ff01837d4ff945742994a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494820
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Our ES2-fallback switch rewrite doesn't work well on Tegra3; it doesn't
always like breaks inside of for loops.
Change-Id: Iaaef0b7d0a94ce4fc954529e39f0810a6a34101c
Bug: skia:12477, skia:12828
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494976
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
* Using docker.New instead of docker.Login which needed configDir passed around.
* Also cleaned up unneeded references to infraCommonEnv and infraCommonBuildArgs.
Bug: skia:12812
Change-Id: Ie60ad77d75a5a17f9350e0028afb8c54bf4c63cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494581
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Angle/Vulkan added GL_ANGLE_rgbx_internal_format extension for RGBX
texture format. Add support for that format in Skia.
Bug: chromium:1261867, chromium:1269826, angle:6690
Change-Id: I74fc91699dc1eaf2b275b29fbcf3d4060e63c5a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/485157
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This bot has been failing due to a warning as error about the extra ';'
inside a class. This extra semicolon comes from some older existing
code, so this appears to be a new warning from -Wextra-semi.
Change-Id: Ibbd2ccda4dced9f0892ee19b1d5d9465131ec74e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494819
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Specifically this adds flushing of the Device when the Device is deleted
and also when we snap a Recording, we flush all Devices connected to a
Recorder.
Bug: skia:12633
Change-Id: Idfecc8cd2a0ecf6a8d39fc81618dd6b13ec87ec2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494243
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
The change in [1] is likely responsible for a regression in which we're
not taking into account P2 for gradient skewing anymore.
Fix that, and add a test case to the gradient set of test cases.
Source for test glyph, see here:
https://github.com/googlefonts/color-fonts/pull/90/files
[1] 2da029b28f
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
Bug: skia:12822, chromium:1287162
Change-Id: I8b790e2a5c6c04487118306b4b38b1d77349431d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494676
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Dominik Röttsches <drott@google.com>
It's been a no-op for 6 years.
Change-Id: Id5e4b21ac806eb68879b217084006cb62cedfe7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494636
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The prepareForMaskDrawing in the RemoteStrike and the SkScalerCache
must fully agree on the maximum dimensions calculations.
Bug: chromium:1280180
Change-Id: Idfe98618027e5b04a481fa55f27e10b5bb048aea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494580
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
- We always download from https
- All external assets have a primary and a mirror URL.
- We prioritize the sources as follows:
bazel mirror, github/original source, our mirror
- There is a way (see build_toolchain) to test the sources
from the mirrors (done before CL submission).
This adds a utility to upload files to the mirror in a
consistent, scripted way. It includes a way to copy in
parts of our bazel files (e.g. debs_to_install from
toolchain/build_toolchain.bzl) to update many things
at once.
Our Bazel mirror (gs://skia-world-readable/bazel)
is a Content Addressable Storage system, where the
file name is based on the sha256sum of the contents
(the same hash that Bazel uses). All files in it should
be publicly accessible.
Change-Id: Ida8b8e07d27a0a557bc49467ebbc86c806cabbd3
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494478
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Adding tests for matrix math and comparison
bug: skia:12681
Change-Id: Ia1537ee2e411383749456fd6ff938b7c9a2e1061
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/493416
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
It is safe to store raw pointers to these objects since they are both
always accessed on the same thread we can safely invalidate their
back pointers when needed. This allows us to remove a ref of Recorder on
Device.
Bug: skia:12794
Change-Id: Icb5e079f7e820824520d52e48012b447e714a9ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/494239
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>