These are guarded with $es3, so we can use them in SkSLTest ES3 tests,
but are not generally accessible in Runtime Effects yet.
(Metal will need a polyfill as well: skia:12898)
Change-Id: Ibc1e4b9dc230517163a8f6a4a3af0172d8275de1
Bug: skia:11209
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503483
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The forceOpaque parameter is now ignored. Instead, we do a conservative
analysis of the shader's main function to determine if it always returns
an opaque color. This is good enough to detect simple cases, including
things like:
return child.eval(p).rgb1
Bug: skia:12643
Bug: skia:12896
Change-Id: I74b331aa12fadb1d0d1bb85f225dc7aa01ba2455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503346
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The previous CLs have removed the last significant differences between
SkSL::String and std::string. This CL removes SkSL::String entirely and
replaces it with std::string throughout the code.
Apologies for the very long CL, but I have done my best to make it as
simple and reviewable as possible. The vast majority of changes are
simple replacement of `SkSL::String` with `std::string`. In the rare
spots where code is moved from one place to another, it is logically
unchanged.
Change-Id: I39563d2db45da229f17f4504dfd63e00bde7a96e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503339
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 805acda3f3.
Reason for revert: Looks to be breaking the Android roll. See https://android-build.googleplex.com/builds/pending/P29733268/aosp_bramble-userdebug/latest/view/logs/build_error.log
Original change's description:
> [fuzzer] Remove GL from (now-Vulkan) build
>
> The fuzzer runs against the Vulkan version of Swiftshader.
> There are no libGL.so (etc) on the fuzz runtime, so we
> want to avoid linking against those.
>
> The GL code that is #ifdef'd out is still necessary to
> avoid timeouts on TSAN with our NVIDIA jobs.
> https://skia-review.googlesource.com/c/skia/+/502638
>
> Procedure for testing this locally (and iterating):
> 1. In oss-fuzz checkout, run
> `python infra/helper.py shell skia`
> to pull up local interactive version of Docker
> fuzzer build image.
> 2. Run `compile` in fuzzer shell. Stop after
> the swiftshader compiles and is copied into /out
> with Ctrl + C.
> 3. Comment out the swiftshader compilation part [1]
> (no need to re-do this when modifying Skia code).
> `apt-get install nano -y`
> `nano ../build.sh`
> 4. Make change to Skia repo using normal methods.
> 5. Run the following in the Skia repo
> `git diff origin main > foo.patch`
> Copy the patch into the Docker shell using Ctrl+C
> and nano.
> 6. Apply the patch inside the Docker shell
> `git apply foo.patch`
> and re-compile (which should skip right to
> building the fuzzer libs)
> `compile`
> 7. Repeat 4-7 or make small changes directly in
> the Docker shell via nano.
> 8. When compilation and link succeeds, run
> `ldd /out/api_mock_gpu_canvas`
> to verify GL and friends were not dynamically linked.
>
> [1] https://github.com/google/oss-fuzz/pull/7214/files#diff-76f13875e33875cdd372f1f0933206be599cd87952f1bd1eaa57ca928ee9e3e1R49-R53
>
> Change-Id: Idf569820527c1304b0e5a68fd36295be89dfa2a0
> Bug: oss-fuzz:44132
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503016
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>
Bug: oss-fuzz:44132
Change-Id: I3832417c60ff425572717d37dc9609419922b18e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503351
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Brian Osman <brianosman@google.com>
fe56532f50..b756b2c274
2022-02-03 jonahr@google.com Suppress flaky Mipmap/Multithreading tests on Win/SwS/ASAN
2022-02-03 kbr@chromium.org Metal: End the current render pass at glInvalidateFramebuffer.
2022-02-03 cnorthrop@google.com Vulkan: Update default FBO when fetch in use
2022-02-02 kbr@chromium.org Mac: Try to diagnose crashes inside Core Animation.
2022-02-02 ynovikov@chromium.org Revert "Vulkan: Enable ANGLE_texture_multisample"
2022-02-02 lexa.knyazev@gmail.com Metal: Remove emulatedInstanceID
2022-02-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 9ee740d2e9ef to fe093f4789c2 (5 revisions)
2022-02-02 syoussefi@chromium.org Vulkan: Fix a few framebuffer fetch bugs
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 borenet@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: borenet@google.com
Test: Test: FramebufferFetchES31.DefaultFramebufferMixedProgramsTest
Test: Test: FramebufferFetchES31.DefaultFramebufferTest
Change-Id: I8d1eab3d78f704f8276e48ad335fb0d3415add8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503557
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Instead of CubicPatch(writer) << control points ... code now writes
writer << Cubic(controlPoints). The main benefit of this is that the
control points are available to the PatchWriter. This allows it (in
follow up CLs) to automatically chop the curves and track the last join
control point.
Change-Id: I38b57a141261afd42e511cc195eb5e64a2382263
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501837
Reviewed-by: Christopher Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
std::string unfortunately does not have a `string + string_view`
plus operator. (https://stackoverflow.com/q/44636549/291737)
This brings SkSL::String one step closer to matching std::string's API.
Change-Id: I44fd4538a9433442d2f34e63ebd120f3377fbb70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503343
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
std::string is less permissive than SkSL::String about concatenation.
This change is a step towards eliminating SkSL::String.
(We couldn't continue using this technique for std::string, as it's
undefined behavior to add our own methods inside namespace std.)
Change-Id: I21e421182be23d3033f827758ea2b2c01fa99d26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503341
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit d921f21fbc.
Reason for revert: New test breaking GL android bots
Original change's description:
> Add SkSurface resolve function.
>
> This will insert a resolve msaa call into the stream of commands for
> the SkSurface. This is mostly useful for cases when a client wraps the
> resolve texture but has Skia draw with MSAA, and the client wants to
> make sure Skia resolves to their wrapped texture.
>
> Bug: chromium:1292418
> Change-Id: I6eddae967136716b9215fcd96e7d77a2457efdf2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503340
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: chromium:1292418
Change-Id: I86e5f82f0e2a0921906c0caba964929750500965
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503350
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This will insert a resolve msaa call into the stream of commands for
the SkSurface. This is mostly useful for cases when a client wraps the
resolve texture but has Skia draw with MSAA, and the client wants to
make sure Skia resolves to their wrapped texture.
Bug: chromium:1292418
Change-Id: I6eddae967136716b9215fcd96e7d77a2457efdf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503340
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
These tests are not guaranteed to pass in ES2 (as ES2 specifically does
not require NaN to be implemented), so they are now run in GPU+ES3 and
on the CPU.
Change-Id: Ica78e15a06b3b00b651c5fabd0decf751853a83f
Bug: skia:12858
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501238
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
By being on Recorder, more calls can directly access the ResourceProvider
without needing the Context or Gpu. A different ResourceProvider is
created for each Recorder. Each ResourceProvider stores a ref to the
GlobalCache so that it can access shared resources. Eventually each
ResourceProvider will also have its own ResourceCache for all non shared
Resources.
A big win of this change is that Context can be removed from Recorder.
Bug: skia:12754
Change-Id: Ib6ac71c617de4d6b6b2ac4956580e65d4d7e6f7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502637
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 35e34d8db2.
Reason for revert: circles were corrupting join point; fix in PS1->PS2
Original change's description:
> Revert "Move last join control point storage into PatchWriter"
>
> This reverts commit 1f1270f8ac.
>
> Reason for revert: unexpected gold diffs crept in after PS2...
>
> Original change's description:
> > Move last join control point storage into PatchWriter
> >
> > Change-Id: I916c23778e04911ea122720b8e48850caab4df64
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501437
> > Reviewed-by: John Stiles <johnstiles@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> Change-Id: I143a6a16e2ecef735f5c67995e92d315ab463121
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502697
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Change-Id: I4bd7479da9d5bcb15a3ce6cef25fdda97aa25d3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502785
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Christopher Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This makes it so we don't trigger msaa in drawStrokedLine anymore.
Bug: skia:skia:12872
Change-Id: Id68b55ba9e3989f2a775affe9a1b20bf3186123c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502816
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Christopher Dalton <csmartdalton@google.com>
Bug: oss-fuzz:43679
Change-Id: Iff85dc7ee802672ddf31bd09884aa9f36fd2870f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503157
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
GrFragmentProcessor::invokeChild now takes a string_view for the coords
instead of a String. This reduces copying while still allowing a String
to be passed in without casts/conversions.
Change-Id: I311eedda0ae2de8258c7b3a28420c152626401b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503337
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I82be2c8a825a070024748f8a1c6449ce508efdc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503156
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The fuzzer runs against the Vulkan version of Swiftshader.
There are no libGL.so (etc) on the fuzz runtime, so we
want to avoid linking against those.
The GL code that is #ifdef'd out is still necessary to
avoid timeouts on TSAN with our NVIDIA jobs.
https://skia-review.googlesource.com/c/skia/+/502638
Procedure for testing this locally (and iterating):
1. In oss-fuzz checkout, run
`python infra/helper.py shell skia`
to pull up local interactive version of Docker
fuzzer build image.
2. Run `compile` in fuzzer shell. Stop after
the swiftshader compiles and is copied into /out
with Ctrl + C.
3. Comment out the swiftshader compilation part [1]
(no need to re-do this when modifying Skia code).
`apt-get install nano -y`
`nano ../build.sh`
4. Make change to Skia repo using normal methods.
5. Run the following in the Skia repo
`git diff origin main > foo.patch`
Copy the patch into the Docker shell using Ctrl+C
and nano.
6. Apply the patch inside the Docker shell
`git apply foo.patch`
and re-compile (which should skip right to
building the fuzzer libs)
`compile`
7. Repeat 4-7 or make small changes directly in
the Docker shell via nano.
8. When compilation and link succeeds, run
`ldd /out/api_mock_gpu_canvas`
to verify GL and friends were not dynamically linked.
[1] https://github.com/google/oss-fuzz/pull/7214/files#diff-76f13875e33875cdd372f1f0933206be599cd87952f1bd1eaa57ca928ee9e3e1R49-R53
Change-Id: Idf569820527c1304b0e5a68fd36295be89dfa2a0
Bug: oss-fuzz:44132
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/503016
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Bug: skia:12701
Change-Id: Iee63650517a739029f81121cabd45dfcc2e8fa38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502698
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Other than the `float`/`double` overloads, the only value-add of these
methods is to cast the result of `std::to_string` to `SkSL::String`.
When `SkSL::String` is removed, these no-op calls can be replaced with
direct calls to `std::to_string` instead. (The float overloads can
continue to live in `skstd` since their output isn't the same.)
Change-Id: I4df841403114b401ad58017f0264a246fef341af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502786
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I90140348eeb87c849a857a12008c201efc9e328d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/482596
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:12701
Change-Id: Ib081e07731d30d5da19fef9191958ee3ee3a23a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502777
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This will make it easier to migrate from SkSL::String to std::string.
These methods can then continue to exist as free functions.
Change-Id: I9f6799788aaf42f4a95c6df03d01f9e123ae52c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502783
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
std::string::starts_with will be available in C++20. In the interim,
prefer using a free function in skstd. This puts us a small step closer
towards removing SkSL::String.
Change-Id: I8c6b33d94c51a643d8cb99ac4c4b1c0556cb9170
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502782
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
f810e99899..fe56532f50
2022-02-02 syoussefi@chromium.org Vulkan: Enable ANGLE_texture_multisample
2022-02-02 cclao@google.com Vulkan: Add a dedicated suballocation garbage list
2022-02-01 jmadill@chromium.org Vulkan: Initialize exectuable with invalid uniform serial.
2022-02-01 syoussefi@chromium.org Vulkan: Fix vkCmdResolveImage extents
2022-02-01 cclao@google.com Vulkan: Cache commonly used 6 ushorts stream index array data
2022-02-01 b.schade@samsung.com Vulkan: Add support for OES_primitive_bounding_box
2022-02-01 b.schade@samsung.com Translator: Emit warning when identifier has double underscores
2022-02-01 jmadill@chromium.org Vulkan: Fix off-by-one in DynamicBuffer.
2022-02-01 wez@chromium.org [fuchsia] Don't try to use calling executable path to load .so's
2022-02-01 jmadill@chromium.org Vulkan: Fix image base/max level respecification case.
2022-02-01 b.schade@samsung.com Vulkan: Fix incorrect gl_SamplePosition on ES3.2
2022-02-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 4db20a80409b to 4998c7b3a2b8 (1 revision)
2022-02-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 69f4b9c09e48 to 9ee740d2e9ef (3 revisions)
2022-02-01 sergeyu@google.com Allow GL_RGBX8_ANGLE for texture copy destination
2022-02-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 97a33ab1a078 to a210f891a450 (477 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 borenet@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: borenet@google.com
Test: Test: dEQP-GLES31.functional.primitive_bounding_box.*
Test: Test: dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.at_sample_position.default_framebuffer --deqp-gl-config-name=rgba8888d24s8ms4
Test: Test: dEQP-GLES31.functional.shaders.sample_variables.sample_pos.correctness.default_framebuffer --deqp-gl-config-name=rgba8888d24s8ms4
Change-Id: I9645a1845bc632411f0f58b9c15f431fe1f19a79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502927
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This class will be used to provide thread safe access to various shared
resources in Graphite. Currently the only thing moved onto here is
the SkShaderCodeDictionary. Eventually it will have things like the
pipeline cache on it as well.
The plan is that users will not access this class directly but instead
via a ResourceProvider (see follow on change).
Bug: skia:12754
Change-Id: I2ae2c4bf7025945de850a618055e59ccd403aaaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502315
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
An API like this was never adopted in std::string. (The concept was
borrowed from absl::ConsumeSuffix.)
This is a step towards removing SkSL::String entirely, since we no
longer have a pressing need for it now that std::string_view and
std::string are compatible.
Change-Id: I661e5f374aaf317c3d4bdb5dcf4ac1081d178e80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502309
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
* use GrTextReferenceFrame instead of blob
* use TransformedMaskVertexFiller
* remove mask field - this was always A8
Change-Id: I645a68658c4f873301db51987739e9138f8d4822
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502780
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
We now use std::string_view throughout. SkStringView.h has been moved to
include/private/ and is only used for our C++20/23 compatibility methods
(starts_with/ends_with/contains).
Change-Id: I961842c6778256a03868e7602d48add34f420763
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502306
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
When restoring a saveLayer, SkBitmapDevice::drawSpecial is used
to composite layer contents onto the parent layer. The parent layer's
backing pixmap was not being notified that its content was modified.
In some circumstances Chromium's 2D canvas implementation uses a
saveLayer internally for applying certain compositing operations.
Because the draw op was not causing a bump in gen ID, we were getting
key collisions inside cc::PaintOpBuffer's image cache. This was causing
the wrong version of the content of a canvas to be used in a
canavas-to-canvas drawImage calls where the source canvas is software
rendered and the destination canvas uses gpu-accelerated or
out-of-process rasterization.
BUG=chromium:1281185
Change-Id: I3aacae27e3cc1c68d130b782aa99517ffee890a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501237
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Justin Novosad <junov@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
It's not free to construct an skvm::Program. This makes the programs
owned by the blitter be SkTLazy, so they're only constructed (allocated)
when necessary. Then, it splits out the blitter's program pointer to be
separate from the (optional, lazy) instance. With that in place, we can
avoid *removing* things from the cache on a hit. That, in turn, lets us
skip putting things back into the cache, unless we actually constructed
a new program with this blitter.
Change-Id: I53d7b53207cf5f65f8f0e4f53456c9f4ffa24498
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501685
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Since the introduction of canReuse on a per-run basis, we have
not revisited how SDFT reuse is handled. Abandon the less precise
per GrTextBlob calculation for handling matrix range calculations on
the SubRun.
Change-Id: Ib943b97b2184da1abedbe6851200e6487908bad0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502696
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Let variable axes override existing or determine style information
with priority over FreeType face flags or information
from the OS/2 table.
Add test case for matching a variable fonts through SkFontMgr_FCI to
ensure the weight determination from variable axes is exercise.
The test does not exercise width or slant.
Add a small (~8.5k) subsetted Noto Sans CJK collection as a test font
(made using [1]), and ensure that matching, reported font style and axis
configuration are correct after matching.
[1] https://github.com/drott/noto-cjk/blob/subsetVFttv/subsetvf.py
Bug: skia:12864, skia:12881
Change-Id: I1fb05d88f68eda308b8864d32d98400c68e46834
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500516
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Dominik Röttsches <drott@google.com>
Draw the lines as rectangles instead of going through path rendering.
Only do this when calling through drawPoints(). (We don't do this
optimization for drawPath() because it can undermine batching.)
NOTE: Lines will still trigger DMSAA after this CL. We need to update
FillRRect to use a local matrix first, in order to have a non-MSAA
renderer capable of drawing these strokes.
Change-Id: I20aa10cd82fa171ade430a3da44ece5688c12417
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497296
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Christopher Dalton <csmartdalton@google.com>