| Index: src/gpu/gl/GrGLGpu.cpp
 | 
| diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
 | 
| index 1744e2503636db460b2e1254c7ebe371cbef5199..fe32556823d6208250f9cb5efbb0e31f9d59f70a 100644
 | 
| --- a/src/gpu/gl/GrGLGpu.cpp
 | 
| +++ b/src/gpu/gl/GrGLGpu.cpp
 | 
| @@ -4314,14 +4314,12 @@ bool GrGLGpu::copySurfaceAsBlitFramebuffer(GrSurface* dst,
 | 
|      return true;
 | 
|  }
 | 
|  
 | 
| -bool gManualMipmaps = true;
 | 
| -
 | 
|  // Manual implementation of mipmap generation, to work around driver bugs w/sRGB.
 | 
|  // Uses draw calls to do a series of downsample operations to successive mips.
 | 
|  // If this returns false, then the calling code falls back to using glGenerateMipmap.
 | 
|  bool GrGLGpu::generateMipmap(GrGLTexture* texture, bool gammaCorrect) {
 | 
| -    // Global switch for manual mipmap generation:
 | 
| -    if (!gManualMipmaps) {
 | 
| +    // Our iterative downsample requires the ability to limit which level we're sampling:
 | 
| +    if (!this->glCaps().doManualMipmapping()) {
 | 
|          return false;
 | 
|      }
 | 
|  
 | 
| @@ -4335,11 +4333,6 @@ bool GrGLGpu::generateMipmap(GrGLTexture* texture, bool gammaCorrect) {
 | 
|          return false;
 | 
|      }
 | 
|  
 | 
| -    // Our iterative downsample requires the ability to limit which level we're sampling:
 | 
| -    if (!this->glCaps().mipMapLevelAndLodControlSupport()) {
 | 
| -        return false;
 | 
| -    }
 | 
| -
 | 
|      // If we're mipping an sRGB texture, we need to ensure FB sRGB is correct:
 | 
|      if (GrPixelConfigIsSRGB(texture->config())) {
 | 
|          // If we have write-control, just set the state that we want:
 | 
| 
 |