Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 777443003: Move shader precision out of GrShaderVar (Closed) Base URL: https://skia.googlesource.com/skia.git@prec
Patch Set: rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrCoordTransform.cpp ('k') | src/gpu/GrDrawTargetCaps.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index ed54bf9514ae201ccc13e10919e1f852ccc3956f..0d6a38860957400d13c8c7f010f9128fa63ed987 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -1046,7 +1046,7 @@ GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) {
fShaderPrecisionVaries = other.fShaderPrecisionVaries;
for (int s = 0; s < kGrShaderTypeCount; ++s) {
- for (int p = 0; p < GrShaderVar::kPrecisionCount; ++p) {
+ for (int p = 0; p < kGrSLPrecisionCount; ++p) {
fFloatPrecisions[s][p] = other.fFloatPrecisions[s][p];
}
}
@@ -1085,13 +1085,13 @@ static const char* shader_type_to_string(GrShaderType type) {
return "";
}
-static const char* precision_to_string(GrShaderVar::Precision p) {
+static const char* precision_to_string(GrSLPrecision p) {
switch (p) {
- case GrShaderVar::kLow_Precision:
+ case kLow_GrSLPrecision:
return "low";
- case GrShaderVar::kMedium_Precision:
+ case kMedium_GrSLPrecision:
return "medium";
- case GrShaderVar::kHigh_Precision:
+ case kHigh_GrSLPrecision:
return "high";
}
return "";
@@ -1177,9 +1177,9 @@ SkString GrDrawTargetCaps::dump() const {
for (int s = 0; s < kGrShaderTypeCount; ++s) {
GrShaderType shaderType = static_cast<GrShaderType>(s);
r.appendf("\t%s:\n", shader_type_to_string(shaderType));
- for (int p = 0; p < GrShaderVar::kPrecisionCount; ++p) {
+ for (int p = 0; p < kGrSLPrecisionCount; ++p) {
if (fFloatPrecisions[s][p].supported()) {
- GrShaderVar::Precision precision = static_cast<GrShaderVar::Precision>(p);
+ GrSLPrecision precision = static_cast<GrSLPrecision>(p);
r.appendf("\t\t%s: log_low: %d log_high: %d bits: %d\n",
precision_to_string(precision),
fFloatPrecisions[s][p].fLogRangeLow,
« no previous file with comments | « src/gpu/GrCoordTransform.cpp ('k') | src/gpu/GrDrawTargetCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698