diff options
author | Robert Phillips <robertphillips@google.com> | 2018-03-16 16:47:25 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-19 12:21:05 +0000 |
commit | fe0253f8bb64857df088d5ff54e2b5b66b102b46 (patch) | |
tree | 0d540ceaf02a992228dd713ccfee9fef413f7b3b /src/gpu/GrProxyProvider.h | |
parent | 4410d7ff757268792dd5f842d585c514cc80a5fb (diff) |
Alter GrSurface/GrSurfaceProxy flags to prepare for GrTexture/GrTextureProxy -specific flags
This CL:
moves GrRenderTarget::fFlags to GrSurface::fSurfaceFlags
adds a GrInternalSurfaceFlags type and uses it for GrSurfaceProxy::fSurfaceFlags
The goal of this is to provide a location where GrTexture/GrTextureProxy-specific flags
(i.e., isExternal & isRectangle) can be stored.
Change-Id: I8df7b79036a6853dd378ff6cf10d4b37c60dd511
Reviewed-on: https://skia-review.googlesource.com/114796
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrProxyProvider.h')
-rw-r--r-- | src/gpu/GrProxyProvider.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/gpu/GrProxyProvider.h b/src/gpu/GrProxyProvider.h index e1ddf5c1f6..2f452b4e62 100644 --- a/src/gpu/GrProxyProvider.h +++ b/src/gpu/GrProxyProvider.h @@ -66,7 +66,8 @@ public: * testing-only. */ sk_sp<GrTextureProxy> createInstantiatedProxy(const GrSurfaceDesc&, GrSurfaceOrigin, - SkBackingFit, SkBudgeted, uint32_t flags = 0); + SkBackingFit, SkBudgeted, + GrSurfaceDescFlags = kNone_GrSurfaceFlags); /* * Create an un-mipmapped texture proxy with data. @@ -82,7 +83,7 @@ public: * actually upload the data to the gpu. */ sk_sp<GrTextureProxy> createTextureProxy(sk_sp<SkImage> srcImage, - GrSurfaceFlags flags, + GrSurfaceDescFlags descFlags, int sampleCnt, SkBudgeted budgeted, SkBackingFit fit); @@ -106,11 +107,13 @@ public: * Create a GrSurfaceProxy without any data. */ sk_sp<GrTextureProxy> createProxy(const GrSurfaceDesc&, GrSurfaceOrigin, GrMipMapped, - SkBackingFit, SkBudgeted, uint32_t flags); + SkBackingFit, SkBudgeted, GrInternalSurfaceFlags); - sk_sp<GrTextureProxy> createProxy(const GrSurfaceDesc& desc, GrSurfaceOrigin origin, - SkBackingFit fit, SkBudgeted budgeted, uint32_t flags = 0) { - return this->createProxy(desc, origin, GrMipMapped::kNo, fit, budgeted, flags); + sk_sp<GrTextureProxy> createProxy( + const GrSurfaceDesc& desc, GrSurfaceOrigin origin, + SkBackingFit fit, SkBudgeted budgeted, + GrInternalSurfaceFlags surfaceFlags = GrInternalSurfaceFlags::kNone) { + return this->createProxy(desc, origin, GrMipMapped::kNo, fit, budgeted, surfaceFlags); } // These match the definitions in SkImage & GrTexture.h, for whence they came @@ -167,11 +170,11 @@ public: * callback should cleanup any resources it captured and return an empty sk_sp<GrTextureProxy>. */ sk_sp<GrTextureProxy> createLazyProxy(LazyInstantiateCallback&&, const GrSurfaceDesc&, - GrSurfaceOrigin, GrMipMapped, GrRenderTargetFlags, + GrSurfaceOrigin, GrMipMapped, GrInternalSurfaceFlags, SkBackingFit, SkBudgeted, LazyInstantiationType); sk_sp<GrTextureProxy> createLazyProxy(LazyInstantiateCallback&&, const GrSurfaceDesc&, - GrSurfaceOrigin, GrMipMapped, GrRenderTargetFlags, + GrSurfaceOrigin, GrMipMapped, GrInternalSurfaceFlags, SkBackingFit, SkBudgeted); sk_sp<GrTextureProxy> createLazyProxy(LazyInstantiateCallback&&, const GrSurfaceDesc&, @@ -187,7 +190,7 @@ public: sk_sp<GrRenderTargetProxy> createLazyRenderTargetProxy(LazyInstantiateCallback&&, const GrSurfaceDesc&, GrSurfaceOrigin origin, - GrRenderTargetFlags, Textureable, + GrInternalSurfaceFlags, Textureable, GrMipMapped, SkBackingFit, SkBudgeted); // 'proxy' is about to be used as a texture src or drawn to. This query can be used to |