diff options
author | 2017-09-26 12:49:26 -0400 | |
---|---|---|
committer | 2017-09-26 17:11:21 +0000 | |
commit | cd871401114f402e72420ccd49edecee2532b0e6 (patch) | |
tree | a323510790f271cc2e0a85487ab52cbc7ffc9339 /src/gpu/GrResourceProvider.h | |
parent | 98a6216b18b57c2f7a0d58f542c60503686aed69 (diff) |
Add ability to remove unique key from proxy and underlying surface.
Bug: skia:
Change-Id: I66b891ce9ca35906fdbddb36f565b35b25825112
Reviewed-on: https://skia-review.googlesource.com/51240
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrResourceProvider.h')
-rw-r--r-- | src/gpu/GrResourceProvider.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h index b906013fe8..b3fe32a0b1 100644 --- a/src/gpu/GrResourceProvider.h +++ b/src/gpu/GrResourceProvider.h @@ -52,10 +52,22 @@ public: void assignUniqueKeyToProxy(const GrUniqueKey&, GrTextureProxy*); /* + * Removes a unique key from a proxy. If the proxy has already been instantiated, it will + * also remove the unique key from the target GrSurface. + */ + void removeUniqueKeyFromProxy(const GrUniqueKey&, GrTextureProxy*); + + /* * Finds a proxy by unique key. */ sk_sp<GrTextureProxy> findProxyByUniqueKey(const GrUniqueKey&, GrSurfaceOrigin); + /* + * Finds a proxy by unique key or creates a new one that wraps a resource matching the unique + * key. + */ + sk_sp<GrTextureProxy> findOrCreateProxyByUniqueKey(const GrUniqueKey&, GrSurfaceOrigin); + /////////////////////////////////////////////////////////////////////////// // Textures |