skia2/fuzz
Brian Salomon ce240cc6fd SkSurface asynchronous read APIs allow client to extend pixel lifetime
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>
2019-10-02 19:20:08 +00:00
..
oss_fuzz added support for user-defined functions to GrSKSLFP 2019-09-20 17:13:57 +00:00
coverage remove SkColorSpace::MakeICC() fuzzer 2018-05-23 16:31:11 +00:00
Fuzz.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
Fuzz.h Prevent UBSAN from complaining too early about invalid enums 2019-06-03 15:58:36 +00:00
FuzzCanvas.cpp Rename GrColorSpaceInfo -> GrColorInfo 2019-09-30 21:53:24 +00:00
FuzzCommon.cpp Revert "add guard to switch to SkPathTypes" 2019-09-14 19:13:44 +00:00
FuzzCommon.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
FuzzDrawFunctions.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
FuzzEncoders.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
FuzzGradients.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
FuzzMain.cpp SkSurface asynchronous read APIs allow client to extend pixel lifetime 2019-10-02 19:20:08 +00:00
FuzzParsePath.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
FuzzPathMeasure.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
FuzzPathop.cpp Revert "add guard to switch to SkPathTypes" 2019-09-14 19:13:44 +00:00
FuzzPolyUtils.cpp Move SkImageFilter functionality into private SkImageFilter_Base 2019-08-02 18:56:39 +00:00
FuzzRegionOp.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00