From 7226c232d73356a37ec8cfef0ed55147e68dd2fd Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 30 Jul 2018 13:13:17 -0400 Subject: 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 Commit-Queue: Brian Salomon --- src/gpu/GrTextureRenderTargetProxy.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gpu/GrTextureRenderTargetProxy.cpp') 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 -- cgit v1.2.3