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