Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: src/gpu/gl/GrGpuGL.cpp

Issue 672863003: Don't use MIP filter mode on compressed textures (Closed) Base URL: https://skia.googlesource.com/skia.git@skgr
Patch Set: wrap lines Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/downsamplebitmap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 209edaa188462c4b093b66de9fa66b17b6c8f7ef..c83a668ea38cfe6d95dfe3fe9213ac1f9b6d378b 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -2053,14 +2053,18 @@ void GrGpuGL::bindTexture(int unitIdx, const GrTextureParams& params, GrGLTextur
GR_GL_LINEAR
};
GrTextureParams::FilterMode filterMode = params.filterMode();
- if (!this->caps()->mipMapSupport() && GrTextureParams::kMipMap_FilterMode == filterMode) {
- filterMode = GrTextureParams::kBilerp_FilterMode;
+
+ if (GrTextureParams::kMipMap_FilterMode == filterMode) {
+ if (!this->caps()->mipMapSupport() || GrPixelConfigIsCompressed(texture->config())) {
+ filterMode = GrTextureParams::kBilerp_FilterMode;
+ }
}
+
newTexParams.fMinFilter = glMinFilterModes[filterMode];
newTexParams.fMagFilter = glMagFilterModes[filterMode];
if (GrTextureParams::kMipMap_FilterMode == filterMode &&
- texture->texturePriv().mipMapsAreDirty() && !GrPixelConfigIsCompressed(texture->config())) {
+ texture->texturePriv().mipMapsAreDirty()) {
GL_CALL(GenerateMipmap(GR_GL_TEXTURE_2D));
texture->texturePriv().dirtyMipMaps(false);
}
« no previous file with comments | « gm/downsamplebitmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698