Move SkSLSampleMatrix to include/private
Switch it to use std::string (not SkSL::String). Along these lines,
remove SkSL::String's operator SkString, and instead add an explicit
SkString constructor from std::string.
Other changes aren't strictly necessary, but I wanted to clean up some
of the other SkSL vs. Skia code barriers. VS (since 2015) has had
vsnprintf that conforms to the C99 standard, the only difference with
_vsnprintf is a different (nonstandard) return value for overflowing
calls. Remove the special-case (the only use of SKSL_BUILD_FOR_WIN).
Change-Id: I8826af10c8e78a8d935c601d00b8ae9ba0640041
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298816
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/sksl/SkSLHCodeGenerator.cpp b/src/sksl/SkSLHCodeGenerator.cpp
index 7fe9cf6..3bb7d6d 100644
--- a/src/sksl/SkSLHCodeGenerator.cpp
+++ b/src/sksl/SkSLHCodeGenerator.cpp
@@ -7,8 +7,8 @@
#include "src/sksl/SkSLHCodeGenerator.h"
+#include "include/private/SkSLSampleMatrix.h"
#include "src/sksl/SkSLParser.h"
-#include "src/sksl/SkSLSampleMatrix.h"
#include "src/sksl/SkSLUtil.h"
#include "src/sksl/ir/SkSLEnum.h"
#include "src/sksl/ir/SkSLFunctionDeclaration.h"
@@ -314,7 +314,7 @@
matrix.fHasPerspective ? "true" : "false");
break;
case SampleMatrix::Kind::kConstantOrUniform: {
- String perspExpression = matrix.fHasPerspective ? "true" : "false";
+ std::string perspExpression = matrix.fHasPerspective ? "true" : "false";
for (const Variable* p : fSectionAndParameterHelper.getParameters()) {
if ((p->fModifiers.fFlags & Modifiers::kIn_Flag) &&
matrix.fExpression == String(p->fName)) {