Change how PromiseLazyInstantiationCallback calls Done proc.

Previously we used the texture's "release proc" mechanism to call
the client's Done proc for promise texture-backed images. There was also
an attempt to call the Done proc more aggresively when the callback is
destroyed and release was already called. Otherwise, Done won't get
called until the resource cache processes the cache key invalidation
message for the texture and releases the texture.

The new approach is to have the done proc be reffed by the lazy
instantiation callback and the idle callback that is used to call the
client's release callback. This is a bit simpler and means Done gets
called ASAP.


Bug: skia:
Change-Id: Id3928bafee68ee5e047917b34e3d39ba9d8d603b
Reviewed-on: https://skia-review.googlesource.com/c/183981
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2 files changed