Add Support for serialization of mailbox backed PaintImages

For OOPR Canvas2D we need to refer to mailbox backed PaintImages in
PaintOp commands. This CL adds the SharedImageProvider interface in cc
with corresponding SharedImageProviderImpl in gpu. This class obtains
read access for each shared image and holds it until it's destroyed.
This destruction should only occur after all operations that refer to
the image have been flushed to Skia. RasterDecoderImpl handles the
creation/destruction of SharedImageProviderImpl in Begin/EndRaster
CHROMIUM respectively.

Bug: 1031055
Change-Id: I100365baed37d14cd8d9cbffb3ceb3e4b255dff0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253238
Auto-Submit: Nathan Zabriskie <nazabris@microsoft.com>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#786658}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ffc210691cd908c2f4063d9f8fd4a31db806fc7f
1 file changed