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

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

Issue 2557603006: Skip the sRGB mip-map testing on command buffer (Closed)
Patch Set: Created 4 years 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 | « src/gpu/gl/GrGLCaps.h ('k') | tests/SRGBMipMapTest.cpp » ('j') | 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 fIsCoreProfile = false; 45 fIsCoreProfile = false;
46 fBindFragDataLocationSupport = false; 46 fBindFragDataLocationSupport = false;
47 fRectangleTextureSupport = false; 47 fRectangleTextureSupport = false;
48 fTextureSwizzleSupport = false; 48 fTextureSwizzleSupport = false;
49 fRGBA8888PixelsOpsAreSlow = false; 49 fRGBA8888PixelsOpsAreSlow = false;
50 fPartialFBOReadIsSlow = false; 50 fPartialFBOReadIsSlow = false;
51 fMipMapLevelAndLodControlSupport = false; 51 fMipMapLevelAndLodControlSupport = false;
52 fRGBAToBGRAReadbackConversionsAreSlow = false; 52 fRGBAToBGRAReadbackConversionsAreSlow = false;
53 fDoManualMipmapping = false; 53 fDoManualMipmapping = false;
54 fSRGBDecodeDisableSupport = false; 54 fSRGBDecodeDisableSupport = false;
55 fSRGBDecodeDisableAffectsMipmaps = false;
55 56
56 fBlitFramebufferFlags = kNoSupport_BlitFramebufferFlag; 57 fBlitFramebufferFlags = kNoSupport_BlitFramebufferFlag;
57 58
58 fShaderCaps.reset(new GrShaderCaps(contextOptions)); 59 fShaderCaps.reset(new GrShaderCaps(contextOptions));
59 60
60 this->init(contextOptions, ctxInfo, glInterface); 61 this->init(contextOptions, ctxInfo, glInterface);
61 } 62 }
62 63
63 void GrGLCaps::init(const GrContextOptions& contextOptions, 64 void GrGLCaps::init(const GrContextOptions& contextOptions,
64 const GrGLContextInfo& ctxInfo, 65 const GrGLContextInfo& ctxInfo,
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 // it can be much slower (especially on mobile GPUs), so we opt-in only when necessary: 603 // it can be much slower (especially on mobile GPUs), so we opt-in only when necessary:
603 if (fMipMapLevelAndLodControlSupport && 604 if (fMipMapLevelAndLodControlSupport &&
604 (contextOptions.fDoManualMipmapping || 605 (contextOptions.fDoManualMipmapping ||
605 (kIntel_GrGLVendor == ctxInfo.vendor()) || 606 (kIntel_GrGLVendor == ctxInfo.vendor()) ||
606 (kNVIDIA_GrGLDriver == ctxInfo.driver() && isMAC) || 607 (kNVIDIA_GrGLDriver == ctxInfo.driver() && isMAC) ||
607 (kATI_GrGLVendor == ctxInfo.vendor()))) { 608 (kATI_GrGLVendor == ctxInfo.vendor()))) {
608 fDoManualMipmapping = true; 609 fDoManualMipmapping = true;
609 } 610 }
610 611
611 fSRGBDecodeDisableSupport = ctxInfo.hasExtension("GL_EXT_texture_sRGB_decode "); 612 fSRGBDecodeDisableSupport = ctxInfo.hasExtension("GL_EXT_texture_sRGB_decode ");
613 fSRGBDecodeDisableAffectsMipmaps = fSRGBDecodeDisableSupport &&
614 kChromium_GrGLDriver != ctxInfo.driver();
612 615
613 // Requires fTextureRedSupport, fTextureSwizzleSupport, msaa support, ES com patibility have 616 // Requires fTextureRedSupport, fTextureSwizzleSupport, msaa support, ES com patibility have
614 // already been detected. 617 // already been detected.
615 this->initConfigTable(contextOptions, ctxInfo, gli, shaderCaps); 618 this->initConfigTable(contextOptions, ctxInfo, gli, shaderCaps);
616 619
617 this->applyOptionsOverrides(contextOptions); 620 this->applyOptionsOverrides(contextOptions);
618 shaderCaps->applyOptionsOverrides(contextOptions); 621 shaderCaps->applyOptionsOverrides(contextOptions);
619 } 622 }
620 623
621 const char* get_glsl_version_decl_string(GrGLStandard standard, GrGLSLGeneration generation, 624 const char* get_glsl_version_decl_string(GrGLStandard standard, GrGLSLGeneration generation,
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { 2100 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
2098 if (options.fEnableInstancedRendering) { 2101 if (options.fEnableInstancedRendering) {
2099 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th is); 2102 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th is);
2100 #ifndef SK_BUILD_FOR_MAC 2103 #ifndef SK_BUILD_FOR_MAC
2101 // OS X doesn't seem to write correctly to floating point textures when using 2104 // OS X doesn't seem to write correctly to floating point textures when using
2102 // glDraw*Indirect, regardless of the underlying GPU. 2105 // glDraw*Indirect, regardless of the underlying GPU.
2103 fAvoidInstancedDrawsToFPTargets = true; 2106 fAvoidInstancedDrawsToFPTargets = true;
2104 #endif 2107 #endif
2105 } 2108 }
2106 } 2109 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | tests/SRGBMipMapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698