aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLGpu.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-06-08 17:22:23 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-08 23:07:25 +0000
commit8f5bbda0071e5663f454804e370e66f86b87078b (patch)
tree7214467a0ba834ae948b8f108c0ccc5b7cb2dde5 /src/gpu/gl/GrGLGpu.cpp
parent09c9400695c87be11f0ef5268e0f6efce0e62831 (diff)
Fall back to bilerp if we are undable to do a copy for mips.
Bug: skia: Change-Id: I52b86d83aaec1fa245be2ee17bbd56defcb5881f Reviewed-on: https://skia-review.googlesource.com/133587 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r--src/gpu/gl/GrGLGpu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index f37356454a..42291ed571 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2738,7 +2738,8 @@ void GrGLGpu::bindTexture(int unitIdx, const GrSamplerState& samplerState, GrGLT
GrSamplerState::Filter filterMode = samplerState.filter();
if (GrSamplerState::Filter::kMipMap == filterMode) {
- if (!this->caps()->mipMapSupport()) {
+ if (!this->caps()->mipMapSupport() ||
+ texture->texturePriv().mipMapped() == GrMipMapped::kNo) {
filterMode = GrSamplerState::Filter::kBilerp;
}
}
@@ -2849,7 +2850,8 @@ void GrGLGpu::generateMipmaps(const GrSamplerState& params, GrGLTexture* texture
GrSamplerState::Filter filterMode = params.filter();
if (GrSamplerState::Filter::kMipMap == filterMode) {
- if (!this->caps()->mipMapSupport()) {
+ if (!this->caps()->mipMapSupport() ||
+ texture->texturePriv().mipMapped() == GrMipMapped::kNo) {
filterMode = GrSamplerState::Filter::kBilerp;
}
}