diff options
author | Robert Phillips <robertphillips@google.com> | 2018-01-17 12:13:11 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-17 17:40:47 +0000 |
commit | 2ac5868f4a695b30777c7c57ffd493fed0fa597b (patch) | |
tree | 2453c3317a488f28a163640eef06f2f44997dac2 /src/gpu/GrProxyProvider.h | |
parent | 8008df1080f5623bf1cf13c713082c2b732d4eb2 (diff) |
Remove GrSurfaceProxy::MakeWrapped
Change-Id: Ic44cf1745dc3be21cbbaa1dc4ac85c8b1b21c6bb
Reviewed-on: https://skia-review.googlesource.com/94101
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrProxyProvider.h')
-rw-r--r-- | src/gpu/GrProxyProvider.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gpu/GrProxyProvider.h b/src/gpu/GrProxyProvider.h index 4c93886da6..f2688aa55c 100644 --- a/src/gpu/GrProxyProvider.h +++ b/src/gpu/GrProxyProvider.h @@ -32,7 +32,7 @@ public: * Assigns a unique key to a proxy. The proxy will be findable via this key using * findProxyByUniqueKey(). It is an error if an existing proxy already has a key. */ - void assignUniqueKeyToProxy(const GrUniqueKey&, GrTextureProxy*); + bool assignUniqueKeyToProxy(const GrUniqueKey&, GrTextureProxy*); /* * Sets the unique key of the provided proxy to the unique key of the surface. The surface must @@ -102,10 +102,17 @@ public: sk_sp<GrTextureProxy> createProxy(const GrSurfaceDesc&, SkBackingFit, SkBudgeted, uint32_t flags = 0); + // These match the definitions in SkImage & GrTexture.h, for whence they came + typedef void* ReleaseContext; + typedef void (*ReleaseProc)(ReleaseContext); + /* * Create a texture proxy that wraps a (non-renderable) backend texture. */ - sk_sp<GrTextureProxy> createWrappedTextureProxy(const GrBackendTexture&, GrSurfaceOrigin); + sk_sp<GrTextureProxy> createWrappedTextureProxy(const GrBackendTexture&, GrSurfaceOrigin, + GrWrapOwnership = kBorrow_GrWrapOwnership, + ReleaseProc = nullptr, + ReleaseContext = nullptr); /* * Create a texture proxy that wraps a backend texture and is both texture-able and renderable @@ -188,6 +195,8 @@ public: void removeAllUniqueKeys(); private: + sk_sp<GrTextureProxy> createWrapped(sk_sp<GrTexture> tex, GrSurfaceOrigin origin); + struct UniquelyKeyedProxyHashTraits { static const GrUniqueKey& GetKey(const GrTextureProxy& p) { return p.getUniqueKey(); } |