| 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 29 matching lines...) Expand all Loading... |
| 40 fFragCoordsConventionSupport = false; | 40 fFragCoordsConventionSupport = false; |
| 41 fVertexArrayObjectSupport = false; | 41 fVertexArrayObjectSupport = false; |
| 42 fInstancedDrawingSupport = false; | 42 fInstancedDrawingSupport = false; |
| 43 fDirectStateAccessSupport = false; | 43 fDirectStateAccessSupport = false; |
| 44 fDebugSupport = false; | 44 fDebugSupport = false; |
| 45 fES2CompatibilitySupport = false; | 45 fES2CompatibilitySupport = false; |
| 46 fMultisampleDisableSupport = false; | 46 fMultisampleDisableSupport = false; |
| 47 fUseNonVBOVertexAndIndexDynamicData = false; | 47 fUseNonVBOVertexAndIndexDynamicData = false; |
| 48 fIsCoreProfile = false; | 48 fIsCoreProfile = false; |
| 49 fFullClearIsFree = false; | 49 fFullClearIsFree = false; |
| 50 fBindFragDataLocationSupport = false; |
| 50 | 51 |
| 51 fReadPixelsSupportedCache.reset(); | 52 fReadPixelsSupportedCache.reset(); |
| 52 | 53 |
| 53 fShaderCaps.reset(SkNEW_ARGS(GrGLSLCaps, (contextOptions, | 54 fShaderCaps.reset(SkNEW_ARGS(GrGLSLCaps, (contextOptions, |
| 54 ctxInfo, glInterface, *this))); | 55 ctxInfo, glInterface, *this))); |
| 55 | 56 |
| 56 this->init(contextOptions, ctxInfo, glInterface); | 57 this->init(contextOptions, ctxInfo, glInterface); |
| 57 } | 58 } |
| 58 | 59 |
| 59 void GrGLCaps::init(const GrContextOptions& contextOptions, | 60 void GrGLCaps::init(const GrContextOptions& contextOptions, |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 else { | 264 else { |
| 264 fES2CompatibilitySupport = true; | 265 fES2CompatibilitySupport = true; |
| 265 } | 266 } |
| 266 | 267 |
| 267 if (kGL_GrGLStandard == standard) { | 268 if (kGL_GrGLStandard == standard) { |
| 268 fMultisampleDisableSupport = true; | 269 fMultisampleDisableSupport = true; |
| 269 } else { | 270 } else { |
| 270 fMultisampleDisableSupport = false; | 271 fMultisampleDisableSupport = false; |
| 271 } | 272 } |
| 272 | 273 |
| 274 if (kGL_GrGLStandard == standard && version >= GR_GL_VER(3, 0)) { |
| 275 fBindFragDataLocationSupport = true; |
| 276 } |
| 277 |
| 273 /************************************************************************** | 278 /************************************************************************** |
| 274 * GrShaderCaps fields | 279 * GrShaderCaps fields |
| 275 **************************************************************************/ | 280 **************************************************************************/ |
| 276 | 281 |
| 277 glslCaps->fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering
"); | 282 glslCaps->fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering
"); |
| 278 | 283 |
| 279 if (glslCaps->fPathRenderingSupport) { | 284 if (glslCaps->fPathRenderingSupport) { |
| 280 if (kGL_GrGLStandard == standard) { | 285 if (kGL_GrGLStandard == standard) { |
| 281 // We only support v1.3+ of GL_NV_path_rendering which allows us to | 286 // We only support v1.3+ of GL_NV_path_rendering which allows us to |
| 282 // set individual fragment inputs with ProgramPathFragmentInputGen.
The API | 287 // set individual fragment inputs with ProgramPathFragmentInputGen.
The API |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 if (fGeometryShaderSupport) { | 1190 if (fGeometryShaderSupport) { |
| 1186 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1191 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
| 1187 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; | 1192 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; |
| 1188 } | 1193 } |
| 1189 } | 1194 } |
| 1190 } | 1195 } |
| 1191 | 1196 |
| 1192 | 1197 |
| 1193 | 1198 |
| 1194 | 1199 |
| OLD | NEW |