2 * Copyright 2021 Google LLC.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #include "include/sksl/DSLLayout.h"
10 #include "src/sksl/SkSLThreadContext.h"
18 DSLLayout& DSLLayout::flag(SkSL::Layout::Flag mask, const char* name, Position pos) {
19 if (fSkSLLayout.fFlags & mask) {
20 ThreadContext::ReportError(
21 "layout qualifier '" + std::string(name) + "' appears more than once", pos);
23 fSkSLLayout.fFlags |= mask;
27 DSLLayout& DSLLayout::intValue(int* target, int value, SkSL::Layout::Flag flag, const char* name,
29 this->flag(flag, name, pos);