
After https://crrev.com/2390861 we started to use source texture for all operations on original context. SharedImageBacking are ref-counted by their representation, but the source_texture was deleted when client deletes shared image (i.e when FactoryRepresentation is deleted). This is problematic as shared image could be deleted before raster finished. This CL adds ref-counted wrapper to source texture to keep it alive until last representation on original context and thread is alive. Bug: 1127320 Change-Id: I395f6177b752acc163f05f2d365073c67a25991a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2407182 Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Peng Huang <penghuang@chromium.org> Cr-Commit-Position: refs/heads/master@{#806502}