skia2/gn
Arman Uguray 0c3dda058c [ganesh][dawn] Support blocking on async WebGPU events in WASM
The `wgpu::Device::Tick()` function is not available when the Dawn
backend is compiled using emsdk to target WebAssembly. As an
alternative, this CL introduces code that takes advantage of
emscripten's Asyncify feature to yield execution to the browser's event
loop and allowing it to execute async tasks from blocking Skia code.

* Introduced the GrDawnAsyncWait class which abstracts over Asyncify vs
wgpu::Device::Tick depending on the platform and implements common
busy-wait boilerplate.
* Refactored the fence management in GrDawnGpu to make use of
GrDawnAsyncWait. The GPUQueue.onSubmittedWorkDone is now handled by a
callback on GrDawnGpu instead of per-fence callbacks since the latter
cannot easily prevent a use-after-free if a fence is destroyed before
the callback runs.

Bug: skia:12512
Change-Id: I255e92ec87c799dc7a50bd034a815c0aaca0ef5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530736
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-04-29 17:02:12 +00:00
..
portable Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
skia Disable no-declaration-after-statement 2022-04-29 15:42:12 +00:00
toolchain Fix our GN files to build pure objcc targets correctly 2022-04-27 21:07:15 +00:00
__init__.py
bench.gni Move tessellation-specific functions out of GrPathUtils 2021-11-20 02:47:40 +00:00
BUILDCONFIG.gn Enable WASM cross-compilation by correctly using current_cpu 2022-04-20 11:31:35 +00:00
call.py
checkdir.py
checkpath.py
codesign_ios.py Reland "Set GN's script_executable to "python3"" 2022-04-07 20:11:27 +00:00
compile_ib_files.py [python3] Reland recipes -> python3 changes 2021-12-01 13:04:03 +00:00
compile_sksl_tests.py Avoid hard failure when invalid UTF8 is returned. 2022-04-27 19:51:20 +00:00
copy_git_directory.py [python3] Reland recipes -> python3 changes 2021-12-01 13:04:03 +00:00
core.gni Move skgpu::graphite::Mask to SkEnumBitMask 2022-04-28 14:04:16 +00:00
cp.py
dehydrate_sksl.py Add Graphite-only dehydrated modules. 2022-04-21 21:05:27 +00:00
effects_imagefilters.gni Implement separate crop filter 2021-09-24 20:18:36 +00:00
effects.gni Add missing SkTrimPathEffect to skia_effects_public 2022-02-28 22:42:44 +00:00
find_headers.py Give a human-intelligible message if gn generates a warning 2022-02-23 18:40:03 +00:00
find_msvc.py
find_xcode_sysroot.py [python3] Reland recipes -> python3 changes 2021-12-01 13:04:03 +00:00
flutter_defines.gni drawVertices and drawPath apply blend between paint and primitive color. 2021-11-22 19:09:33 +00:00
fuchsia_defines.gni
gen_plist_ios.py
gm.gni Reland "skif:LayerSpace<SkRect>::roundOut/In have epsilon tolerance." 2022-04-14 14:41:22 +00:00
gn_meta_sln.py
gn_to_bp_utils.py Build the NDK compliant shared library to be used by JNI in SkQP. 2022-01-10 17:11:48 +00:00
gn_to_bp.py Use DEPS to pull in VulkanMemoryAllocator. 2022-04-28 22:59:02 +00:00
gn_to_cmake.py Fix CMakeLists to find Emscripten headers 2021-04-16 16:45:22 +00:00
gpu.gni [ganesh][dawn] Support blocking on async WebGPU events in WASM 2022-04-29 17:02:12 +00:00
graphite.gni [graphite] Add UploadBufferManager class. 2022-04-28 20:59:14 +00:00
highest_version_dir.py
ios.gni Fix setup for iOS simulator on arm64 Macs. 2022-03-30 20:06:39 +00:00
is_clang.py
make_gm_gni.py
opts.gni
pdf.gni
push_to_android.py
rm.py
run_sksllex.py
samples.gni Revert "Move SkCamera.h to client_utils/android" 2022-04-25 12:33:01 +00:00
shared_sources.gni Update sprint to graphite name 2021-09-21 16:44:10 +00:00
skia.gni Remove mdbviz 2022-04-20 15:59:50 +00:00
skqp_gn_args.py [sksl] Make sksl tracing optional 2022-04-12 13:59:25 +00:00
sksl_tests.gni Move recursion tests into general /errors/ directory. 2022-04-28 21:25:41 +00:00
sksl.gni Rename CheckProgramUnrolledSize to CheckProgramStructure. 2022-04-27 22:30:04 +00:00
tests.gni Move skgpu::graphite::Mask to SkEnumBitMask 2022-04-28 14:04:16 +00:00
utils.gni Revert "Move SkCamera.h to client_utils/android" 2022-04-25 12:33:01 +00:00
xps.gni