diff options
author | Greg Daniel <egdaniel@google.com> | 2018-03-16 14:57:21 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-16 19:27:46 +0000 |
commit | 7278d68cac9e39970144909df449113d43fff480 (patch) | |
tree | 95c86e6c9676d59e99549ddcd3fa5d727b71ec98 /dm/DMSrcSink.cpp | |
parent | 7ba427ef40301d199bcd5c0f9a9d41244c495bd6 (diff) |
Add DoneProc to Promise Images
This proc will notify the client when we will no longer call fulfill on
their promise image so that can delete any meta data they needed to store
to be able to complete the fulfill requests.
Bug: skia:
Change-Id: Ife1e6845f221c31ce1ae2c0d2ba5e4c8f0203b74
Reviewed-on: https://skia-review.googlesource.com/114092
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'dm/DMSrcSink.cpp')
-rw-r--r-- | dm/DMSrcSink.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 9b68dc99cf..43992a8ff8 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -1248,6 +1248,10 @@ static void promise_image_release_proc(void* textureContext) { // Do nothing. We free all the backend textures at the end. } +static void promise_image_done_proc(void* textureContext) { + // Do nothing. +} + class PromiseImageCallbackContext { public: const SkTArray<PromiseImageInfo>* fImageInfo; @@ -1283,6 +1287,7 @@ static sk_sp<SkImage> promise_image_creator(const void* rawData, size_t length, curImage.fBitmap.refColorSpace(), promise_image_fulfill_proc, promise_image_release_proc, + promise_image_done_proc, (void*) &curImage); SkASSERT(image); return image; |