ce240cc6fd
Previously the pixel data passed to the client was only valid during the client's callback. This meant if the client wanted to defer processing of the data a copy was necessary. Now we pass an object to the callback and the pixel lifetime is tied to the lifetime of that object. The object may be holding a GPU transfer buffer mapped. We don't assume that the object will be released on the direct GrContext thread. So when the object is destroyed it posts a message to a new type, GrClientMappedBufferManager, hanging off the direct context. The direct context will periodically check for messages and unmap and then unref buffers so that they can be reused. Currently this is done in GrContext::performDeferredCleanup() and GrDrawingManager::flush(). The old API is kept around for backwards compatibility but it is reimplemented as a bridge on top of the new mechanism. Also a utility function to SkImageInfo is added to directly make a new info with a specified dimensions rather than passing the width and height separately to makeWH(). Bug: chromium:973403 Bug: skia:8962 Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> |
||
---|---|---|
.. | ||
toolchain | ||
__init__.py | ||
ar.py | ||
bench.gni | ||
BUILD.gn | ||
BUILDCONFIG.gn | ||
call.py | ||
checkdir.py | ||
codesign_ios.py | ||
compile_ib_files.py | ||
compile_processors.py | ||
core.gni | ||
cp.py | ||
create_sksl_enums.py | ||
effects_imagefilters.gni | ||
effects.gni | ||
find_headers.py | ||
find_ios_sysroot.py | ||
find_msvc.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 | ||
highest_version_dir.py | ||
ios.gni | ||
is_clang.py | ||
make_gm_gni.py | ||
opts.gni | ||
pdf.gni | ||
push_to_android.py | ||
run_sksllex.py | ||
samples.gni | ||
shared_sources.gni | ||
skia.gni | ||
sksl.gni | ||
tests.gni | ||
utils.gni | ||
xps.gni |