skia: Add support for CHROMIUM_image backed textures.
authorerikchen <erikchen@chromium.org>
Fri, 5 Feb 2016 20:10:55 +0000 (12:10 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 5 Feb 2016 20:10:55 +0000 (12:10 -0800)
commit7fec91ce6660190f8d7c5eb6f3061e4550cc672b
tree2b2509fa48e9c7b57220fe0a58b8b97090359263
parent3601f280dc400cb75167393b0a2b6670b5f25ea4
skia: Add support for CHROMIUM_image backed textures.

I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Review URL: https://codereview.chromium.org/1623653002
13 files changed:
include/core/SkSurface.h
include/gpu/GrTypes.h
src/gpu/GrTexture.cpp
src/gpu/GrTextureProvider.cpp
src/gpu/SkGpuDevice.cpp
src/gpu/SkGpuDevice.h
src/gpu/SkGrPixelRef.cpp
src/gpu/gl/GrGLGpu.cpp
src/gpu/gl/GrGLGpu.h
src/gpu/gl/GrGLTexture.cpp
src/image/SkSurface.cpp
src/image/SkSurface_Gpu.cpp
tests/TextureStorageAllocator.cpp [new file with mode: 0644]