Added SkImage::MakeCrossContextFromEncoded
authorBrian Osman <brianosman@google.com>
Tue, 9 May 2017 17:19:50 +0000 (13:19 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Tue, 9 May 2017 18:45:04 +0000 (18:45 +0000)
commit13dddce65fd87a8175a209a49f35615735a2886a
tree0f7d85e7ba8db0b3acc7c0ac2dccd839808856cf
parent3734c7d9e39cce682c5095a8f187d41223955f5c
Added SkImage::MakeCrossContextFromEncoded

Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.

Re-land of https://skia-review.googlesource.com/c/14180/

Bug: skia:
Change-Id: I3dd382640629b79b3058f18fee68d043566e43e5
Reviewed-on: https://skia-review.googlesource.com/15895
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
18 files changed:
gm/crosscontextimage.cpp [new file with mode: 0644]
gn/gm.gni
gn/gpu.gni
include/core/SkImage.h
src/gpu/GrBackendTextureImageGenerator.cpp [new file with mode: 0644]
src/gpu/GrBackendTextureImageGenerator.h [new file with mode: 0644]
src/gpu/GrContext.cpp
src/gpu/GrGpu.h
src/gpu/GrResourceCache.cpp
src/gpu/GrResourceCache.h
src/gpu/gl/GrGLGpu.cpp
src/gpu/gl/GrGLGpu.h
src/gpu/vk/GrVkGpu.cpp
src/gpu/vk/GrVkGpu.h
src/gpu/vk/GrVkImage.h
src/image/SkImage_Gpu.cpp
tests/ImageTest.cpp
tools/gpu/GrTest.cpp