From 7278d68cac9e39970144909df449113d43fff480 Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Fri, 16 Mar 2018 14:57:21 -0400 Subject: 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 Reviewed-by: Robert Phillips Reviewed-by: Brian Salomon --- dm/DMSrcSink.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dm') 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* fImageInfo; @@ -1283,6 +1287,7 @@ static sk_sp 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; -- cgit v1.2.3