std::string ModifierFlags::paddedDescription() const { // SkSL extensions
std::string result; if (*this & ModifierFlag::kExport) {
result += "$export ";
} if (*this & ModifierFlag::kES3) {
result += "$es3 ";
} if (*this & ModifierFlag::kPure) {
result += "$pure ";
} if (*this & ModifierFlag::kInline) {
result += "inline ";
} if (*this & ModifierFlag::kNoInline) {
result += "noinline ";
}
// Real GLSL qualifiers (must be specified in order in GLSL 4.1 and below) if (*this & ModifierFlag::kFlat) {
result += "flat ";
} if (*this & ModifierFlag::kNoPerspective) {
result += "noperspective ";
} if (*this & ModifierFlag::kConst) {
result += "const ";
} if (*this & ModifierFlag::kUniform) {
result += "uniform ";
} if ((*this & ModifierFlag::kIn) && (*this & ModifierFlag::kOut)) {
result += "inout ";
} elseif (*this & ModifierFlag::kIn) {
result += "in ";
} elseif (*this & ModifierFlag::kOut) {
result += "out ";
} if (*this & ModifierFlag::kHighp) {
result += "highp ";
} if (*this & ModifierFlag::kMediump) {
result += "mediump ";
} if (*this & ModifierFlag::kLowp) {
result += "lowp ";
} if (*this & ModifierFlag::kReadOnly) {
result += "readonly ";
} if (*this & ModifierFlag::kWriteOnly) {
result += "writeonly ";
} if (*this & ModifierFlag::kBuffer) {
result += "buffer ";
}
// We're using non-GLSL names for these. if (*this & ModifierFlag::kPixelLocal) { // Roughly equivalent to `__pixel_localEXT`.
result += "pixel_local ";
} if (*this & ModifierFlag::kWorkgroup) { // Equivalent to `shared`.
result += "workgroup ";
}
return result;
}
std::string ModifierFlags::description() const {
std::string s = this->paddedDescription(); if (!s.empty()) {
s.pop_back();
} return s;
}
bool success = true;
ModifierFlags modifierFlags = *this; for (constauto& f : kModifierFlags) { if (modifierFlags & f.flag) { if (!(permittedModifierFlags & f.flag)) {
context.fErrors->error(pos, "'" + std::string(f.name) + "' is not permitted here");
success = false;
}
modifierFlags &= ~f.flag;
}
}
SkASSERT(modifierFlags == ModifierFlag::kNone);
return success;
}
} // namespace SkSL
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:
(vorverarbeitet am 2026-06-06)
¤