aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGpuDevice_drawTexture.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-02-15 10:09:48 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-16 13:39:35 +0000
commitdb78cba957889285604aeacb75e47af4600880c4 (patch)
treebd44a73a8de38497aed8319bc5b880c12d3b2a7a /src/gpu/SkGpuDevice_drawTexture.cpp
parentf6f7b67ac230b14a725fbdabe951c70ea5b4428f (diff)
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 <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/SkGpuDevice_drawTexture.cpp')
-rw-r--r--src/gpu/SkGpuDevice_drawTexture.cpp3
1 files changed, 2 insertions, 1 deletions
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;