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

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

Issue 2026393004: Add a caps bit to enable/disable the new manual mip-mapper (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « src/gpu/gl/GrGLCaps.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/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:
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698