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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 // GetShaderPrecisionFormat doesn't accept GL_GEOMETRY_SHADER as a shader ty
pe. Assume they're | 1190 // GetShaderPrecisionFormat doesn't accept GL_GEOMETRY_SHADER as a shader ty
pe. Assume they're |
1191 // the same as the vertex shader. Only fragment shaders were ever allowed to
omit support for | 1191 // the same as the vertex shader. Only fragment shaders were ever allowed to
omit support for |
1192 // highp. GS was added after GetShaderPrecisionFormat was added to the list
of features that | 1192 // highp. GS was added after GetShaderPrecisionFormat was added to the list
of features that |
1193 // are recommended against. | 1193 // are recommended against. |
1194 if (glslCaps->fGeometryShaderSupport) { | 1194 if (glslCaps->fGeometryShaderSupport) { |
1195 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1195 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
1196 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = | 1196 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = |
1197 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; | 1197 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; |
1198 } | 1198 } |
1199 } | 1199 } |
| 1200 glslCaps->initEffectiveFloatPrecisionTable(); |
1200 } | 1201 } |
1201 | 1202 |
1202 bool GrGLCaps::bgraIsInternalFormat() const { | 1203 bool GrGLCaps::bgraIsInternalFormat() const { |
1203 return fConfigTable[kBGRA_8888_GrPixelConfig].fFormats.fBaseInternalFormat =
= GR_GL_BGRA; | 1204 return fConfigTable[kBGRA_8888_GrPixelConfig].fFormats.fBaseInternalFormat =
= GR_GL_BGRA; |
1204 } | 1205 } |
1205 | 1206 |
1206 bool GrGLCaps::getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig ext
ernalConfig, | 1207 bool GrGLCaps::getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig ext
ernalConfig, |
1207 GrGLenum* internalFormat, GrGLenum* externalFo
rmat, | 1208 GrGLenum* internalFormat, GrGLenum* externalFo
rmat, |
1208 GrGLenum* externalType) const { | 1209 GrGLenum* externalType) const { |
1209 if (!this->getExternalFormat(surfaceConfig, externalConfig, kTexImage_Extern
alFormatUsage, | 1210 if (!this->getExternalFormat(surfaceConfig, externalConfig, kTexImage_Extern
alFormatUsage, |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1875 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
1875 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1876 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
1876 fConfigTable[i].fFormats.fExternalFormat[j]); | 1877 fConfigTable[i].fFormats.fExternalFormat[j]); |
1877 } | 1878 } |
1878 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1879 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
1879 } | 1880 } |
1880 #endif | 1881 #endif |
1881 } | 1882 } |
1882 | 1883 |
1883 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1884 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
OLD | NEW |