aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureRenderTargetProxy.cpp
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 /src/gpu/GrTextureRenderTargetProxy.cpp
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 'src/gpu/GrTextureRenderTargetProxy.cpp')
-rw-r--r--src/gpu/GrTextureRenderTargetProxy.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp
index 95d5543bbf..5b87399daa 100644
--- a/src/gpu/GrTextureRenderTargetProxy.cpp
+++ b/src/gpu/GrTextureRenderTargetProxy.cpp
@@ -22,12 +22,13 @@ GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(const GrCaps& caps,
const GrSurfaceDesc& desc,
GrSurfaceOrigin origin,
GrMipMapped mipMapped,
+ GrTextureType textureType,
SkBackingFit fit,
SkBudgeted budgeted,
GrInternalSurfaceFlags surfaceFlags)
: GrSurfaceProxy(desc, origin, fit, budgeted, surfaceFlags)
// for now textures w/ data are always wrapped
- , GrTextureProxy(desc, origin, mipMapped, fit, budgeted, surfaceFlags)
+ , GrTextureProxy(desc, origin, mipMapped, textureType, fit, budgeted, surfaceFlags)
, GrRenderTargetProxy(caps, desc, origin, fit, budgeted, surfaceFlags) {}
// Lazy-callback version
@@ -36,14 +37,15 @@ GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(LazyInstantiateCallback&&
const GrSurfaceDesc& desc,
GrSurfaceOrigin origin,
GrMipMapped mipMapped,
+ GrTextureType textureType,
SkBackingFit fit,
SkBudgeted budgeted,
GrInternalSurfaceFlags surfaceFlags)
: GrSurfaceProxy(std::move(callback), lazyType, desc, origin, fit, budgeted, surfaceFlags)
// Since we have virtual inheritance, we initialize GrSurfaceProxy directly. Send null
// callbacks to the texture and RT proxies simply to route to the appropriate constructors.
- , GrTextureProxy(LazyInstantiateCallback(), lazyType, desc, origin, mipMapped, fit,
- budgeted, surfaceFlags)
+ , GrTextureProxy(LazyInstantiateCallback(), lazyType, desc, origin, mipMapped, textureType,
+ fit, budgeted, surfaceFlags)
, GrRenderTargetProxy(LazyInstantiateCallback(), lazyType, desc, origin, fit, budgeted,
surfaceFlags) {}
@@ -123,10 +125,9 @@ void GrTextureRenderTargetProxy::onValidateSurface(const GrSurface* surface) {
GrInternalSurfaceFlags proxyFlags = fSurfaceFlags;
GrInternalSurfaceFlags surfaceFlags = surface->surfacePriv().flags();
- SkASSERT((proxyFlags & GrInternalSurfaceFlags::kTextureMask) ==
- (surfaceFlags & GrInternalSurfaceFlags::kTextureMask));
SkASSERT((proxyFlags & GrInternalSurfaceFlags::kRenderTargetMask) ==
(surfaceFlags & GrInternalSurfaceFlags::kRenderTargetMask));
+ SkASSERT(surface->asTexture()->texturePriv().textureType() == this->texPriv().textureType());
}
#endif