0c3dda058c
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> |
||
---|---|---|
.. | ||
portable | ||
skia | ||
toolchain | ||
__init__.py | ||
bench.gni | ||
BUILDCONFIG.gn | ||
call.py | ||
checkdir.py | ||
checkpath.py | ||
codesign_ios.py | ||
compile_ib_files.py | ||
compile_sksl_tests.py | ||
copy_git_directory.py | ||
core.gni | ||
cp.py | ||
dehydrate_sksl.py | ||
effects_imagefilters.gni | ||
effects.gni | ||
find_headers.py | ||
find_msvc.py | ||
find_xcode_sysroot.py | ||
flutter_defines.gni | ||
fuchsia_defines.gni | ||
gen_plist_ios.py | ||
gm.gni | ||
gn_meta_sln.py | ||
gn_to_bp_utils.py | ||
gn_to_bp.py | ||
gn_to_cmake.py | ||
gpu.gni | ||
graphite.gni | ||
highest_version_dir.py | ||
ios.gni | ||
is_clang.py | ||
make_gm_gni.py | ||
opts.gni | ||
pdf.gni | ||
push_to_android.py | ||
rm.py | ||
run_sksllex.py | ||
samples.gni | ||
shared_sources.gni | ||
skia.gni | ||
skqp_gn_args.py | ||
sksl_tests.gni | ||
sksl.gni | ||
tests.gni | ||
utils.gni | ||
xps.gni |