From e252f08982b0c747cd4d34c00ce413ab1005e99a Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Mon, 23 Oct 2017 16:05:23 -0400 Subject: Add hint to SkSurface::MakeRenderTarget that we will use mips Additionally this changed triggered a cascade of plumbing GrMipMapped down throughout Ganesh. Bug: skia: Change-Id: I4181f44d9046d66139bb491c7abf86703305aaeb Reviewed-on: https://skia-review.googlesource.com/63000 Reviewed-by: Robert Phillips Commit-Queue: Greg Daniel --- src/gpu/GrBackendTextureImageGenerator.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gpu/GrBackendTextureImageGenerator.cpp') diff --git a/src/gpu/GrBackendTextureImageGenerator.cpp b/src/gpu/GrBackendTextureImageGenerator.cpp index 60cbf9c896..7240c7976f 100644 --- a/src/gpu/GrBackendTextureImageGenerator.cpp +++ b/src/gpu/GrBackendTextureImageGenerator.cpp @@ -77,8 +77,7 @@ GrBackendTextureImageGenerator::Make(sk_sp texture, GrSurfaceOrigin o context->getResourceCache()->insertCrossContextGpuResource(texture.get()); GrBackend backend = context->contextPriv().getBackend(); - GrMipMapped mipMapped = texture->texturePriv().hasMipMaps() ? GrMipMapped::kYes - : GrMipMapped::kNo; + GrMipMapped mipMapped = texture->texturePriv().mipMapped(); GrBackendTexture backendTexture = make_backend_texture_from_handle(backend, texture->width(), texture->height(), @@ -177,7 +176,7 @@ sk_sp GrBackendTextureImageGenerator::onGenerateTexture( if (0 == origin.fX && 0 == origin.fY && info.width() == fBackendTexture.width() && info.height() == fBackendTexture.height() && - (!willNeedMipMaps || proxy->isMipMapped())) { + (!willNeedMipMaps || GrMipMapped::kYes == proxy->mipMapped())) { // If the caller wants the entire texture and we have the correct mip support, we're done return proxy; } else { -- cgit v1.2.3