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

Side by Side Diff: src/gpu/gl/GrGLCaps.cpp

Issue 2050373002: Revert of Add control of manual mipmapping to GrContextOptions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "GrGLCaps.h" 9 #include "GrGLCaps.h"
10 10
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 } 544 }
545 } else if (ctxInfo.hasExtension("GL_OES_sample_shading")) { 545 } else if (ctxInfo.hasExtension("GL_OES_sample_shading")) {
546 fSampleShadingSupport = true; 546 fSampleShadingSupport = true;
547 } 547 }
548 548
549 // We support manual mip-map generation (via iterative downsampling draw cal ls). This fixes 549 // We support manual mip-map generation (via iterative downsampling draw cal ls). This fixes
550 // bugs on some cards/drivers that produce incorrect mip-maps for sRGB textu res when using 550 // bugs on some cards/drivers that produce incorrect mip-maps for sRGB textu res when using
551 // glGenerateMipmap. Our implementation requires mip-level sampling control. Additionally, 551 // glGenerateMipmap. Our implementation requires mip-level sampling control. Additionally,
552 // it can be much slower (especially on mobile GPUs), so we opt-in only when necessary: 552 // it can be much slower (especially on mobile GPUs), so we opt-in only when necessary:
553 if (fMipMapLevelAndLodControlSupport && 553 if (fMipMapLevelAndLodControlSupport &&
554 (contextOptions.fDoManualMipmapping || 554 ((kIntel_GrGLVendor == ctxInfo.vendor()) ||
555 (kIntel_GrGLVendor == ctxInfo.vendor()) ||
556 (kNVIDIA_GrGLDriver == ctxInfo.driver() && isMAC) || 555 (kNVIDIA_GrGLDriver == ctxInfo.driver() && isMAC) ||
557 (kATI_GrGLVendor == ctxInfo.vendor()))) { 556 (kATI_GrGLVendor == ctxInfo.vendor()))) {
558 fDoManualMipmapping = true; 557 fDoManualMipmapping = true;
559 } 558 }
560 559
561 // Requires fTextureRedSupport, fTextureSwizzleSupport, msaa support, ES com patibility have 560 // Requires fTextureRedSupport, fTextureSwizzleSupport, msaa support, ES com patibility have
562 // already been detected. 561 // already been detected.
563 this->initConfigTable(ctxInfo, gli, glslCaps); 562 this->initConfigTable(ctxInfo, gli, glslCaps);
564 563
565 this->applyOptionsOverrides(contextOptions); 564 this->applyOptionsOverrides(contextOptions);
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1924 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1926 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1925 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1927 fConfigTable[i].fFormats.fExternalFormat[j]); 1926 fConfigTable[i].fFormats.fExternalFormat[j]);
1928 } 1927 }
1929 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1928 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1930 } 1929 }
1931 #endif 1930 #endif
1932 } 1931 }
1933 1932
1934 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1933 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698