aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-12-09 10:04:14 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-09 10:04:14 -0800
commitc0bd6484f621e4a1033be318b1947a5d32157c13 (patch)
treedbc194e9260822ca670afd9d5f1987d65afd58ea /src/gpu/gl/GrGLCaps.cpp
parent17168df7798d0d12684f18df0556dc19e65b32e6 (diff)
Move shader precision out of GrShaderVar
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index a510cb456b..79c99c224a 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -776,13 +776,13 @@ void GrGLCaps::initStencilFormats(const GrGLContextInfo& ctxInfo) {
fStencilVerifiedColorConfigs.push_back_n(fStencilFormats.count());
}
-static GrGLenum precision_to_gl_float_type(GrShaderVar::Precision p) {
+static GrGLenum precision_to_gl_float_type(GrSLPrecision p) {
switch (p) {
- case GrShaderVar::kLow_Precision:
+ case kLow_GrSLPrecision:
return GR_GL_LOW_FLOAT;
- case GrShaderVar::kMedium_Precision:
+ case kMedium_GrSLPrecision:
return GR_GL_MEDIUM_FLOAT;
- case GrShaderVar::kHigh_Precision:
+ case kHigh_GrSLPrecision:
return GR_GL_HIGH_FLOAT;
}
SkFAIL("Unknown precision.");
@@ -811,8 +811,8 @@ void GrGLCaps::initShaderPrecisionTable(const GrGLContextInfo& ctxInfo, const Gr
GrGLenum glShader = shader_type_to_gl_shader(shaderType);
PrecisionInfo* first = NULL;
fShaderPrecisionVaries = false;
- for (int p = 0; p < GrShaderVar::kPrecisionCount; ++p) {
- GrShaderVar::Precision precision = static_cast<GrShaderVar::Precision>(p);
+ for (int p = 0; p < kGrSLPrecisionCount; ++p) {
+ GrSLPrecision precision = static_cast<GrSLPrecision>(p);
GrGLenum glPrecision = precision_to_gl_float_type(precision);
GrGLint range[2];
GrGLint bits;
@@ -835,7 +835,7 @@ void GrGLCaps::initShaderPrecisionTable(const GrGLContextInfo& ctxInfo, const Gr
fShaderPrecisionVaries = false;
for (int s = 0; s < kGrShaderTypeCount; ++s) {
if (kGeometry_GrShaderType != s || fGeometryShaderSupport) {
- for (int p = 0; p < GrShaderVar::kPrecisionCount; ++p) {
+ for (int p = 0; p < kGrSLPrecisionCount; ++p) {
fFloatPrecisions[s][p].fLogRangeLow = 127;
fFloatPrecisions[s][p].fLogRangeHigh = 127;
fFloatPrecisions[s][p].fBits = 23;