"High quality" filtering is no longer a concept in Skia. New variants
with other suffixes will make more sense. The existing image triaging
isn't adding value so no worries about starting over.
Bug: skia:13036
Change-Id: Iaa4d285e74de8e7c154fa15027489963124315ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522977
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
A few tests received minor tweaks to make them Runtime Effect-friendly.
Change-Id: Icbcedb84b7882e42f21425b2d40d7819705c359e
Bug: skia:13042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522918
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is useful because it will allow these tests to be supported in
Android CTS, where only Runtime Effects are API-accessible.
This CL updates the C++ test harness so that .rts files in the error/
directory are found, and tweaks error tests as necessary to make them
Runtime Effect-compatible. For instance, Runtime Effects enforce the
parameters on main(), which adds extra errors that we don't want. And
some error tests require ES3 (e.g. array constructors) and so those
tests remain as .sksl files.
In this CL, only tests beginning with A are updated. The remaining tests
will be updated in followup CLs.
Change-Id: I70b064df4f0b3ed02d6bc8cc9add7ee844a78691
Bug: skia:13042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522424
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Previously CPU computed the lambda value and then for nearest mode
took the floor value. GPUs instead round lambda to implement nearest.
GPU has an option to "sharpen" mip maps. The implementation adds a
-1/2 bias to lambda. This makes GPU match CPU's nearest implementation.
However, the bias is also applied in linear mode and so linear mode
now differs between CPU and GPU.
CPU should either
1) Match GPU without the option
2) Match GPU with the option
3) Be switchable.
Given that implementing 3 adds complexity and Chrome does use the option
I've chosen option 2 in this change.
BUG: skia:13078
Change-Id: Ie1066529f079b07a5b927659995a0cacd973c45a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521960
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is a reland of commit 171450a1a0
Original change's description:
> Add glGetFloatv and glSamplerParameterf to GrGLInterface.
>
>
> Bug: skia:13036
> Change-Id: Ie15e0c2b0ada468b82bced818eec67c32d70126b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522100
> Auto-Submit: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:13036
Change-Id: Id594ea5fd68c76703ff61d8414c203facbf28801
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522359
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
`test_expect_fail` did a lot of fiddly string manipulation work in one
big monolithic function. Now it has helper functions
`get_expected_errors` and `check_expected_errors`. This hopefully makes
the logic a bit easier to understand.
There aren't any functional changes here, just restructuring.
Change-Id: I0961054b475255b6159b4dd05b98b6054b144d71
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522422
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Add SK_IGNORE_OUTLINE_OVERLAP_FIX to hide this change while the one user
with a font which sets the overlap flag and strokes has their expected
images updated to the imperceptible difference.
Change-Id: Ia3988d358711e54610dd87362a22e636f690bd9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522361
Reviewed-by: Florin Malita <fmalita@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: If2e7bfd93b916663e568e7d761cd891d0ac2303a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521838
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
This GM was originally written against the old high-quality mode.
Given that it only draws at scale or downsamples, the modern equivalent
would be to use mip maps. However, when it was converted to
SkSamplingOptions it was made to use Mitchell.
The result is pretty ugly but hopefully this will help illustrate the
benefit of anisotropic filtering in comparison.
Bug: skia:13036
Change-Id: I2e5ef2d143fa148583391aace66b44fa59b7f202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522360
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
`atest` will now properly create a RuntimeShader for each of the SkSL
runtime_error tests, and report an SkQP failure if the errors listed
within the test's *%%* markers are not thrown.
This CL also fixes a string-handling bug in `get_sksl_error_tests` which
could cause garbage bytes to appear at the end of shader text. (The code
accidentally assumed that an SkData would have a zero terminator.)
Bug: skia:13042
Change-Id: I971c2a78b8e1c2801a49ce8cd660520d2df5e519
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522358
Reviewed-by: Leon Scroggins <scroggo@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
PS1 regenerates the Bazel files. Use it as the base change when
comparing patchsets.
IWYU seems to do a good job of working with MyFile.cpp and
MyFile.h, but if there is just a MyHeader.h, it doesn't always
seem to throw errors if the includes aren't correct. This was
observed with include/sksl/DSL.h This might be due to the fact
that headers are not compiled on their own, so they are never
sent directly to the IWYU binary.
This change sets enforce_iwyu_on_package() on the all sksl
packages and then fixes the includes until all those checks
are happy. There were a few files that needed fixes outside
of the sksl folder. Examples include:
- src/gpu/effects/GrConvexPolyEffect.cpp
- tests/SkSLDSLTest.cpp
To really enforce this, we need to add a CI/CQ job that runs
bazel build //example:hello_world_gl --config=clang \
--sandbox_base=/dev/shm --features skia_enforce_iwyu
If that failed, a dev could make the changes described in
the logs and/or run the command locally to see those
prescribed fixes.
I had to add several entries to toolchain/IWYU_mapping.imp
in order to fix some private includes and other atypical
choices. I tried adding a rule there to allow inclusion of
SkTypes.h to make sure defines like SK_SUPPORT_GPU, but
could not get it to work for all cases, so I deferred to
using the IWYU pragma: keep (e.g. SkSLPipelineStageCodeGenerator.h)
Change-Id: I4c3e536d8e69ff7ff2d26fe61a525a6c2e80db06
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522256
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
With variable fonts overlapping glyph contours are now normal. However,
these do not stroke well. Simpify the glyph paths which are marked as
overlapping.
Bug: b/225044541
Change-Id: I9687e28c9274cd189f4ae8e059d8d40dd802ec41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521637
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
We can't use SkOSFile::Iter in the Java version of SkQP--it doesn't find
any files. We need to load our assets via the AAssetManager.
Change-Id: Id9c58fb83da810884d2fa4272fc58101e436aee7
Bug: skia:13042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521841
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
IWYU found that #include <cstddef> was unused.
Change-Id: I063d11eb0a11eb54ce0dd9194ec1aeb0836392ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522437
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
https://skia-review.googlesource.com/c/skia/+/521523 added a new tile
to the GM, but made some tweaks to the clipping logic. It accidentally
only outset the clip bounds for kInverseFillAA edge types, when it
should have outset for BW and AA. This fixes the GM so that the only
meaningful changes are the new tile.
Bug: skia:10456
Change-Id: Ic6fbb1db26921173e4aa846d37ee31d523e3dbb1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522436
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
We are going to cache the uniform data and the texture data separately.
Begin by making the texture data something that could be cached on its own.
Bug: skia:12701
Change-Id: I1847f5c901939fcb445694e7cc65e903a6c7c822
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522179
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Progress on exposing the RenderSteps used in the one renderer for
re-use with new renderers.
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12703
Change-Id: I134c79c37f2cdee40558161c9e73dc3221188e67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521959
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
For convenience, builds against musl libc currently use the
linux_glibc properties because they are almost always linux-specific
and not glibc-specific. In preparation for removing this hack,
tweak the linux_glibc properties by either moving them to host_linux,
which will apply to linux_glibc, linux_musl and linux_bionic, or
by setting appropriate musl or linux_musl properties. Properties
that must not be repeated while musl uses linux_musl and also still
uses the linux_glibc properties are moved to glibc properties, which
don't apply to musl. Whether these stay as glibc properties or get
moved back to linux_glibc later once the musl hack is removed is TBD.
Bug: b/223257095
Test: m checkbuild
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ie2067df4271558a0a2dc67e947d027c32f7db9ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521361
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Modifies rrects_* GMs to draw a clipped rrect with
a large radius. The _effect case would draw with a blurry
edge before the fixes.
1. Adds scaling to the elliptical effects key and activate
it when the rrect radii are large enough. This fixes the
precision issue with the elliptical effect variant.
2. Uses SkRRectPriv::IsSimpleCircular() to choose the
circular variant over elliptical, which uses a tolerance
between X and Y radii. This avoids the issue since the
circular effect doesn't suffer in this case.
Confirmed that both fixes work independently of each other.
Cq-Do-Not-Cancel-Tryjobs: true
Bug: skia:10456
Change-Id: Ifef63356e31f46ec1546684636d9667b90bcef9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521523
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
We are going to cache the uniform data and the texture data separately.
Begin by making the uniform data something that could be cached on its own.
Bug: skia:12701
Change-Id: If3ea3a9b6050faf0810549d4076ae44732656a9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522178
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
We're going to cache and uniquify texture bindings separate from
uniform bindings. Split up the 'fUniformKey' w/in the SortKey in
preparation.
Note that caching the uniforms separate from the texture bindings
should reduce some of the size pressure on the ShadingUniformField.
Bug: skia:12701
Change-Id: I8c7af5e5d5c796f5cc46cab168ee4800c92aba81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522257
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is in preparation for additional tessellation-based RenderSteps.
Cq-Include-Trybots: luci.skia.skia.primary:Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite,Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite,Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite,Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite,Build-Mac-Clang-x86_64-Release-Graphite,Build-Mac-Clang-x86_64-Debug-Graphite,Build-Mac-Clang-arm64-Release-iOS_Graphite,Build-Mac-Clang-arm64-Release-Graphite,Build-Mac-Clang-arm64-Debug-iOS_Graphite,Build-Mac-Clang-arm64-Debug-Graphite_NoGpu,Build-Mac-Clang-arm64-Debug-Graphite,Build-Mac-Clang-arm64-Debug-ASAN_Graphite
Bug: skia:12703
Change-Id: I497ea14802201be10535ee26147838b28ab6b34d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521957
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Previously, when we wanted to run multiple test types, we cloned the
outer testing loop and had a bunch of duplicated logic for translating
test results into TestRunner success/failure. This worked, but
maintaining duplicate code can be a chore (see
c5d130aac0:platform_tools/android/apps/skqp/src/main/java/org/skia/skqp/SkQPRunner.java?l=102 )
Instead of going back to that approach, I've factored out the logic for
individual tests into a bare-bones "TestExecutor" interface. The outer
work loop takes a TestExecutor and iterates over every test in it.
Unit tests and SkSL error tests can each implement this interface as
needed. For this CL, actual SkSL error test handling is not yet
implemented, so the SkSL tests will all be listed as passing (in
0-1 milliseconds).
In a followup CL, SkSLErrorTestExecutor#run will be implemented to match
the behavior of the C++ SkSL error tests.
Change-Id: I7ff2cf32baaa3ea46d1ad930885365dde0b9ce22
Bug: skia:13042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522101
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Bug: skia:12845
Change-Id: I46e37ae0c1a8b0587aee3eb9e8cad728d8f61783
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/520738
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ie7bc325af6280e7714798d0d418e045f798cc2fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521842
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Google3 and chromium have both updated, so this is unused
Cq-Include-Trybots: luci.skia.skia.primary:Canary-Chromium,Canary-G3
Change-Id: I1e6abe0db90a7163f222cc4243e68485b6b2f925
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521839
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:13051
Change-Id: I13cdb1b625f65e6d15d3b59ba493897ed88b24c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521005
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This adds an assert to Position::line() to ensure that we don't run
past the end of the source string. Since the source string can
contain embedded nulls, we also switch the source handling from
const char* to std::string so we can accurately determine its length.
Change-Id: I9df47e98c1a0cbc35222a0ea709d9403762210d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521656
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This allows us to create one-off UploadTasks to submit to the Recorder,
e.g. for makeTextureImage().
Also renames UploadCommand to UploadInstance to avoid confusion with
addCommand() method.
Bug: skia:12845
Change-Id: I6cad6f6df6406d1d790ecf6297996fb7ab376f54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521362
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:12845
Change-Id: Iebaacfbb341554886fee1415aaf44fb0e44df723
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521524
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
The MTLDepthStencilState objects are only refed in MtlResourceProvider.
When we shut down, we tear down all the Recorders. That tears down their
resource providers, which in the Metal case deletes these DepthStencil
objects. But we can have a command buffer still in flight, so we need to
add a ref to keep those objects alive.
Bug: skia:13068
Change-Id: Ic2fb8fdd83c5323505fa4ccda509e28a8c7e3bfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521521
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
The number of sub runs > 0, and the size hint must be > 0. Check,
and fail if not true.
Bug: oss-fuzz:45638
Bug: oss-fuzz:45650
Change-Id: Icef9b30a142ac133b86b980ce40467cb64c7b033
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/521837
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>