Chromium Code Reviews| Index: src/gpu/gl/GrGpuGL.cpp |
| diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp |
| index 4b5221c31b52f68f6f1af05923c0fb850098afbe..d27d5f6a05d5ae40cda72b4786375cf7a726427c 100644 |
| --- a/src/gpu/gl/GrGpuGL.cpp |
| +++ b/src/gpu/gl/GrGpuGL.cpp |
| @@ -110,7 +110,7 @@ bool GrGpuGL::BlendCoeffReferencesConstant(GrBlendCoeff coeff) { |
| /////////////////////////////////////////////////////////////////////////////// |
|
robertphillips
2013/12/19 14:24:33
Don't think we want to land this.
bsalomon
2013/12/19 15:03:35
haha right
|
| -static bool gPrintStartupSpew; |
| +static bool gPrintStartupSpew = 1; |
| GrGpuGL::GrGpuGL(const GrGLContext& ctx, GrContext* context) |
| : GrGpu(context) |
| @@ -2028,11 +2028,14 @@ void GrGpuGL::bindTexture(int unitIdx, const GrTextureParams& params, GrGLTextur |
| GR_GL_LINEAR, |
| GR_GL_LINEAR |
| }; |
| - newTexParams.fMinFilter = glMinFilterModes[params.filterMode()]; |
| - newTexParams.fMagFilter = glMagFilterModes[params.filterMode()]; |
| + GrTextureParams::FilterMode filterMode = params.filterMode(); |
| + if (!this->caps()->mipMapSupport() && GrTextureParams::kMipMap_FilterMode == filterMode) { |
| + filterMode = GrTextureParams::kBilerp_FilterMode; |
| + } |
| + newTexParams.fMinFilter = glMinFilterModes[filterMode]; |
| + newTexParams.fMagFilter = glMagFilterModes[filterMode]; |
| - if (params.filterMode() == GrTextureParams::kMipMap_FilterMode && |
| - texture->mipMapsAreDirty()) { |
| + if (GrTextureParams::kMipMap_FilterMode == filterMode && texture->mipMapsAreDirty()) { |
| // GL_CALL(Hint(GR_GL_GENERATE_MIPMAP_HINT,GR_GL_NICEST)); |
| GL_CALL(GenerateMipmap(GR_GL_TEXTURE_2D)); |
| texture->dirtyMipMaps(false); |