Added SkImage::MakeCrossContextFromEncoded
authorBrian Osman <brianosman@google.com>
Mon, 8 May 2017 19:16:45 +0000 (15:16 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Mon, 8 May 2017 19:56:27 +0000 (19:56 +0000)
commit83b1b3db36e8622f4bbc8c391d5c714e258d1e03
tree95c4bf6e53bc73f90373fa06dbf6afa8298420e5
parentaef837a542cd91fba46bc0b3d4571a598710b90e
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.

Bug: skia:
Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
Reviewed-on: https://skia-review.googlesource.com/14180
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@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