From db78cba957889285604aeacb75e47af4600880c4 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Thu, 15 Feb 2018 10:09:48 -0500 Subject: Avoid creating MIPs until necessary when MIP bias is active With sharpened mips, the scale at which we begin to sample level 1 is (obviously) less than 1. This change avoids creation of mips for images that are only slightly downscaled (and for which we wouldn't have sampled those MIPs anyway). Change-Id: If8ffc79c2ce2ff1f3aae7f5732d8a50aca0e26be Reviewed-on: https://skia-review.googlesource.com/107801 Reviewed-by: Brian Salomon Commit-Queue: Brian Osman --- src/gpu/SkGpuDevice_drawTexture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gpu/SkGpuDevice_drawTexture.cpp') diff --git a/src/gpu/SkGpuDevice_drawTexture.cpp b/src/gpu/SkGpuDevice_drawTexture.cpp index b6b1e619c0..c91d7a4569 100644 --- a/src/gpu/SkGpuDevice_drawTexture.cpp +++ b/src/gpu/SkGpuDevice_drawTexture.cpp @@ -258,7 +258,8 @@ void SkGpuDevice::drawTextureProducerImpl(GrTextureProducer* producer, bool doBicubic; GrSamplerState::Filter fm = GrSkFilterQualityToGrFilterMode( - paint.getFilterQuality(), viewMatrix, srcToDstMatrix, &doBicubic); + paint.getFilterQuality(), viewMatrix, srcToDstMatrix, + fContext->contextPriv().sharpenMipmappedTextures(), &doBicubic); const GrSamplerState::Filter* filterMode = doBicubic ? nullptr : &fm; GrTextureProducer::FilterConstraint constraintMode; -- cgit v1.2.3