aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/GrTextureProxy.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-07-30 13:13:17 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-30 19:32:13 +0000
commit7226c232d73356a37ec8cfef0ed55147e68dd2fd (patch)
tree47559e4a5994b5cffc5382e9bb230f49b6c04cd7 /include/private/GrTextureProxy.h
parent3ebd354730ea9590bf233deccfc24982ffe48a98 (diff)
Make GrTextureProxy store a GrTextureType.
Removes flag indicating rectangle or external as its now redundant. Bug: skia: Change-Id: Ia475b557390e7a6b0f19f6e189cf8c27090e397c Reviewed-on: https://skia-review.googlesource.com/144346 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/private/GrTextureProxy.h')
-rw-r--r--include/private/GrTextureProxy.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/private/GrTextureProxy.h b/include/private/GrTextureProxy.h
index fc7f1c54a7..38469547d1 100644
--- a/include/private/GrTextureProxy.h
+++ b/include/private/GrTextureProxy.h
@@ -72,12 +72,12 @@ protected:
friend class GrTextureProxyPriv;
// Deferred version - when constructed with data the origin is always kTopLeft.
- GrTextureProxy(const GrSurfaceDesc& srcDesc, GrMipMapped, SkBackingFit, SkBudgeted,
- const void* srcData, size_t srcRowBytes, GrInternalSurfaceFlags);
+ GrTextureProxy(const GrSurfaceDesc& srcDesc, GrMipMapped, GrTextureType, SkBackingFit,
+ SkBudgeted, const void* srcData, size_t srcRowBytes, GrInternalSurfaceFlags);
// Deferred version - no data.
- GrTextureProxy(const GrSurfaceDesc& srcDesc, GrSurfaceOrigin, GrMipMapped, SkBackingFit,
- SkBudgeted, GrInternalSurfaceFlags);
+ GrTextureProxy(const GrSurfaceDesc& srcDesc, GrSurfaceOrigin, GrMipMapped, GrTextureType,
+ SkBackingFit, SkBudgeted, GrInternalSurfaceFlags);
// Lazy-callback version
// There are two main use cases for lazily-instantiated proxies:
@@ -90,7 +90,7 @@ protected:
// The minimal knowledge version is used for CCPR where we are generating an atlas but we do not
// know the final size until flush time.
GrTextureProxy(LazyInstantiateCallback&&, LazyInstantiationType, const GrSurfaceDesc& desc,
- GrSurfaceOrigin, GrMipMapped, SkBackingFit, SkBudgeted,
+ GrSurfaceOrigin, GrMipMapped, GrTextureType, SkBackingFit, SkBudgeted,
GrInternalSurfaceFlags);
// Wrapped version
@@ -100,15 +100,9 @@ protected:
sk_sp<GrSurface> createSurface(GrResourceProvider*) const override;
- void setIsGLTextureRectangleOrExternal() {
- fSurfaceFlags |= GrInternalSurfaceFlags::kIsGLTextureRectangleOrExternal;
- }
- bool isGLTextureRectangleOrExternal() const {
- return fSurfaceFlags & GrInternalSurfaceFlags::kIsGLTextureRectangleOrExternal;
- }
-
private:
GrMipMapped fMipMapped;
+ GrTextureType fTextureType;
GrUniqueKey fUniqueKey;
GrProxyProvider* fProxyProvider; // only set when fUniqueKey is valid