diff options
author | Robert Phillips <robertphillips@google.com> | 2018-01-08 13:40:32 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-08 19:05:31 +0000 |
commit | 1afd4cdb0800e2e395b465da24eb71e0e834dafa (patch) | |
tree | d3353e7e4487a86d00002ab882f34ec24347000b /src/gpu/GrResourceProvider.h | |
parent | 5ec5d677b02c41a3c58609461cd8b62c2feaeddc (diff) |
Add GrProxyProvider
This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider.
Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f
Reviewed-on: https://skia-review.googlesource.com/91501
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrResourceProvider.h')
-rw-r--r-- | src/gpu/GrResourceProvider.h | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h index 64c9a8bea3..08da9ae0b0 100644 --- a/src/gpu/GrResourceProvider.h +++ b/src/gpu/GrResourceProvider.h @@ -24,9 +24,7 @@ class GrResourceProviderPriv; class GrSemaphore; class GrSingleOwner; class GrStencilAttachment; -class GrSurfaceProxy; class GrTexture; -class GrTextureProxy; class GrStyle; class SkDescriptor; @@ -53,29 +51,6 @@ public: return sk_sp<T>(static_cast<T*>(this->findResourceByUniqueKey(key).release())); } - /* - * 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*); - - /* - * 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 @@ -95,7 +70,8 @@ public: const GrMipLevel texels[], int mipLevelCount, SkDestinationSurfaceColorMode mipColorMode); - sk_sp<GrTextureProxy> createTextureProxy(const GrSurfaceDesc&, SkBudgeted, const GrMipLevel&); + // Create a potentially loose fit texture with the provided data + sk_sp<GrTexture> createTexture(const GrSurfaceDesc&, SkBudgeted, const GrMipLevel&); /////////////////////////////////////////////////////////////////////////// // Wrapped Backend Surfaces @@ -269,10 +245,6 @@ public: fGpu = nullptr; } - // 'proxy' is about to be used as a texture src or drawn to. This query can be used to - // determine if it is going to need a texture domain or a full clear. - static bool IsFunctionallyExact(GrSurfaceProxy* proxy); - const GrCaps* caps() const { return fCaps.get(); } bool overBudget() const { return fCache->overBudget(); } |