Remove renderable flag from texture createLazyProxy.
Besides some tests, we always set the renderable flag to kNo for this
function. No need to keep supporting a code path we don't actually use.
Tests that use to pass in kYes here have been converted to calling
createLazyRenderTargetProxy instead.
Change-Id: I91efe6cc51fd7ba04b711509ca26f18eba2af333
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313425
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index 1017b9e..2bb1708 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -329,7 +329,7 @@
desc.fDimensions, desc.fFormat, colorType, desc.fRenderable,
desc.fSampleCnt, desc.fBudgeted, desc.fFit, desc.fProtected, mipLevel));
},
- format, dims, GrRenderable::kNo, 1, GrMipmapped::kNo, GrMipmapStatus::kNotAllocated,
+ format, dims, GrMipmapped::kNo, GrMipmapStatus::kNotAllocated,
GrInternalSurfaceFlags::kNone, fit, budgeted, GrProtected::kNo, UseAllocator::kYes);
if (!proxy) {
@@ -377,9 +377,8 @@
desc.fDimensions, desc.fFormat, colorType, GrRenderable::kNo, 1,
desc.fBudgeted, GrProtected::kNo, texels.get(), mipLevelCount));
},
- format, dims, GrRenderable::kNo, 1, GrMipmapped::kYes, GrMipmapStatus::kValid,
- GrInternalSurfaceFlags::kNone, SkBackingFit::kExact, budgeted, GrProtected::kNo,
- UseAllocator::kYes);
+ format, dims, GrMipmapped::kYes, GrMipmapStatus::kValid, GrInternalSurfaceFlags::kNone,
+ SkBackingFit::kExact, budgeted, GrProtected::kNo, UseAllocator::kYes);
if (!proxy) {
return nullptr;
@@ -465,9 +464,8 @@
desc.fDimensions, desc.fFormat, desc.fBudgeted, desc.fMipmapped,
desc.fProtected, data.get()));
},
- format, dimensions, GrRenderable::kNo, 1, mipMapped, mipmapStatus,
- GrInternalSurfaceFlags::kReadOnly, SkBackingFit::kExact, SkBudgeted::kYes,
- GrProtected::kNo, UseAllocator::kYes);
+ format, dimensions, mipMapped, mipmapStatus,GrInternalSurfaceFlags::kReadOnly,
+ SkBackingFit::kExact, SkBudgeted::kYes, GrProtected::kNo, UseAllocator::kYes);
if (!proxy) {
return nullptr;
@@ -696,8 +694,6 @@
sk_sp<GrTextureProxy> GrProxyProvider::createLazyProxy(LazyInstantiateCallback&& callback,
const GrBackendFormat& format,
SkISize dimensions,
- GrRenderable renderable,
- int renderTargetSampleCnt,
GrMipmapped mipMapped,
GrMipmapStatus mipmapStatus,
GrInternalSurfaceFlags surfaceFlags,
@@ -721,33 +717,17 @@
return nullptr;
}
- if (renderable == GrRenderable::kYes) {
- return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(*this->caps(),
- std::move(callback),
- format,
- dimensions,
- renderTargetSampleCnt,
- mipMapped,
- mipmapStatus,
- fit,
- budgeted,
- isProtected,
- surfaceFlags,
- useAllocator,
- this->isDDLProvider()));
- } else {
- return sk_sp<GrTextureProxy>(new GrTextureProxy(std::move(callback),
- format,
- dimensions,
- mipMapped,
- mipmapStatus,
- fit,
- budgeted,
- isProtected,
- surfaceFlags,
- useAllocator,
- this->isDDLProvider()));
- }
+ return sk_sp<GrTextureProxy>(new GrTextureProxy(std::move(callback),
+ format,
+ dimensions,
+ mipMapped,
+ mipmapStatus,
+ fit,
+ budgeted,
+ isProtected,
+ surfaceFlags,
+ useAllocator,
+ this->isDDLProvider()));
}
sk_sp<GrRenderTargetProxy> GrProxyProvider::createLazyRenderTargetProxy(