From e1da1d9a7dfa6c9ebdcbd2845acebd045edd2a6f Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Fri, 6 Oct 2017 15:59:27 -0400 Subject: Add option to create a deferred render target context with mips We need this since we have texture generators that draw the base level but nothing more. Thus we want them to be able to directly draw into a pre allocated mipped target instead of doing a copy later. TBR: bsalomon@google.com Bug: skia: Change-Id: I1dfae0da7153b21b30fdfa51a7061fc255739a1e Reviewed-on: https://skia-review.googlesource.com/54100 Reviewed-by: Brian Salomon Reviewed-by: Robert Phillips Commit-Queue: Greg Daniel --- src/gpu/GrTextureMaker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gpu/GrTextureMaker.cpp') diff --git a/src/gpu/GrTextureMaker.cpp b/src/gpu/GrTextureMaker.cpp index db0f421cd0..8183188f60 100644 --- a/src/gpu/GrTextureMaker.cpp +++ b/src/gpu/GrTextureMaker.cpp @@ -59,7 +59,7 @@ sk_sp GrTextureMaker::refTextureProxyForParams(const GrSamplerSt sk_sp result; if (original) { - result = CopyOnGpu(fContext, std::move(original), nullptr, copyParams); + result = CopyOnGpu(fContext, std::move(original), nullptr, copyParams, willBeMipped); } else { result = this->generateTextureProxyForParams(copyParams, willBeMipped, dstColorSpace); } @@ -134,5 +134,5 @@ sk_sp GrTextureMaker::generateTextureProxyForParams(const CopyPa return nullptr; } - return CopyOnGpu(fContext, std::move(original), nullptr, copyParams); + return CopyOnGpu(fContext, std::move(original), nullptr, copyParams, willBeMipped); } -- cgit v1.2.3