| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 fIsCoreProfile = false; | 48 fIsCoreProfile = false; |
| 49 fFullClearIsFree = false; | 49 fFullClearIsFree = false; |
| 50 fFBMixedSamplesSupport = false; | 50 fFBMixedSamplesSupport = false; |
| 51 | 51 |
| 52 fReadPixelsSupportedCache.reset(); | 52 fReadPixelsSupportedCache.reset(); |
| 53 | 53 |
| 54 fShaderCaps.reset(SkNEW(GrGLSLCaps)); | 54 fShaderCaps.reset(SkNEW(GrGLSLCaps)); |
| 55 | 55 |
| 56 } | 56 } |
| 57 | 57 |
| 58 GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() { | 58 GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrCaps() { |
| 59 *this = caps; | 59 *this = caps; |
| 60 } | 60 } |
| 61 | 61 |
| 62 GrGLCaps& GrGLCaps::operator= (const GrGLCaps& caps) { | 62 GrGLCaps& GrGLCaps::operator= (const GrGLCaps& caps) { |
| 63 INHERITED::operator=(caps); | 63 INHERITED::operator=(caps); |
| 64 fVerifiedColorConfigs = caps.fVerifiedColorConfigs; | 64 fVerifiedColorConfigs = caps.fVerifiedColorConfigs; |
| 65 fStencilFormats = caps.fStencilFormats; | 65 fStencilFormats = caps.fStencilFormats; |
| 66 fStencilVerifiedColorConfigs = caps.fStencilVerifiedColorConfigs; | 66 fStencilVerifiedColorConfigs = caps.fStencilVerifiedColorConfigs; |
| 67 fLATCAlias = caps.fLATCAlias; | 67 fLATCAlias = caps.fLATCAlias; |
| 68 fMaxFragmentUniformVectors = caps.fMaxFragmentUniformVectors; | 68 fMaxFragmentUniformVectors = caps.fMaxFragmentUniformVectors; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 fES2CompatibilitySupport = ctxInfo.hasExtension("GL_ARB_ES2_compatibilit
y"); | 249 fES2CompatibilitySupport = ctxInfo.hasExtension("GL_ARB_ES2_compatibilit
y"); |
| 250 } | 250 } |
| 251 else { | 251 else { |
| 252 fES2CompatibilitySupport = true; | 252 fES2CompatibilitySupport = true; |
| 253 } | 253 } |
| 254 | 254 |
| 255 this->initFSAASupport(ctxInfo, gli); | 255 this->initFSAASupport(ctxInfo, gli); |
| 256 this->initStencilFormats(ctxInfo); | 256 this->initStencilFormats(ctxInfo); |
| 257 | 257 |
| 258 /************************************************************************** | 258 /************************************************************************** |
| 259 * GrDrawTargetCaps fields | 259 * GrCaps fields |
| 260 **************************************************************************/ | 260 **************************************************************************/ |
| 261 if (kGL_GrGLStandard == standard) { | 261 if (kGL_GrGLStandard == standard) { |
| 262 // we could also look for GL_ATI_separate_stencil extension or | 262 // we could also look for GL_ATI_separate_stencil extension or |
| 263 // GL_EXT_stencil_two_side but they use different function signatures | 263 // GL_EXT_stencil_two_side but they use different function signatures |
| 264 // than GL2.0+ (and than each other). | 264 // than GL2.0+ (and than each other). |
| 265 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0)); | 265 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0)); |
| 266 // supported on GL 1.4 and higher or by extension | 266 // supported on GL 1.4 and higher or by extension |
| 267 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) || | 267 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) || |
| 268 ctxInfo.hasExtension("GL_EXT_stencil_wrap"); | 268 ctxInfo.hasExtension("GL_EXT_stencil_wrap"); |
| 269 } else { | 269 } else { |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 if (fGeometryShaderSupport) { | 1152 if (fGeometryShaderSupport) { |
| 1153 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1153 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
| 1154 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; | 1154 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; |
| 1155 } | 1155 } |
| 1156 } | 1156 } |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 | 1159 |
| 1160 | 1160 |
| 1161 | 1161 |
| OLD | NEW |