OLD | NEW |
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 Loading... |
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 Loading... |
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) {} |
OLD | NEW |