chromium/third_party/skia/src/sksl/SkSLCompiler.h

/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SKSL_COMPILER
#define SKSL_COMPILER

#include "include/core/SkSize.h"
#include "include/core/SkTypes.h"
#include "src/sksl/SkSLContext.h"  // IWYU pragma: keep
#include "src/sksl/SkSLErrorReporter.h"
#include "src/sksl/SkSLPosition.h"

#include <array>
#include <cstdint>
#include <memory>
#include <string>
#include <string_view>
#include <type_traits>
#include <vector>

constexpr int SK_FRAGCOLOR_BUILTIN =;
constexpr int SK_LASTFRAGCOLOR_BUILTIN =;
constexpr int SK_SECONDARYFRAGCOLOR_BUILTIN =;
constexpr int SK_FRAGCOORD_BUILTIN =;
constexpr int SK_CLOCKWISE_BUILTIN =;
constexpr int SK_SAMPLEMASKIN_BUILTIN =;
constexpr int SK_SAMPLEMASK_BUILTIN =;

constexpr int SK_VERTEXID_BUILTIN =;
constexpr int SK_INSTANCEID_BUILTIN =;
constexpr int SK_POSITION_BUILTIN =;
constexpr int SK_POINTSIZE_BUILTIN =;

constexpr int SK_NUMWORKGROUPS_BUILTIN =;
constexpr int SK_WORKGROUPID_BUILTIN =;
constexpr int SK_LOCALINVOCATIONID_BUILTIN =;
constexpr int SK_GLOBALINVOCATIONID_BUILTIN =;
constexpr int SK_LOCALINVOCATIONINDEX_BUILTIN =;

namespace SkSL {

class Inliner;
struct Module;
enum class ModuleType : int8_t;
class Pool;
struct ProgramConfig;
class ProgramUsage;
enum class ProgramKind : int8_t;
struct Program;
class ProgramElement;
struct ProgramSettings;
class SymbolTable;

/**
 * Main compiler entry point. The compiler parses the SkSL text directly into a tree of IRNodes,
 * while performing basic optimizations such as constant-folding and dead-code elimination. Then the
 * Program is passed into a CodeGenerator to produce compiled output.
 *
 * See the README for information about SkSL.
 */
class SK_API Compiler {};

}  // namespace SkSL

#endif