SkSL description methods are now only present in debug mode
As they are a significant chunk of code, this reduces the size of the
release executable.
Change-Id: Ib764b3ec6244629e50941b0101a540e49d56c320
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261955
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLByteCodeGenerator.cpp b/src/sksl/SkSLByteCodeGenerator.cpp
index e7c214b..961569d 100644
--- a/src/sksl/SkSLByteCodeGenerator.cpp
+++ b/src/sksl/SkSLByteCodeGenerator.cpp
@@ -27,7 +27,7 @@
SkASSERT(type.fName == "float" || type.fName == "half");
return TypeCategory::kFloat;
}
- ABORT("unsupported type: %s\n", type.description().c_str());
+ ABORT("unsupported type: %s\n", type.displayName().c_str());
}
}
@@ -1303,7 +1303,9 @@
this->writeTernaryExpression((TernaryExpression&) e);
break;
default:
+#ifdef SK_DEBUG
printf("unsupported expression %s\n", e.description().c_str());
+#endif
SkASSERT(false);
}
if (discard) {
@@ -1455,7 +1457,9 @@
}
case Expression::kTernary_Kind:
default:
- printf("unsupported lvalue %s\n", e.description().c_str());
+#ifdef SK_DEBUG
+ ABORT("unsupported lvalue %s\n", e.description().c_str());
+#endif
return nullptr;
}
}