/* * Copyright 2021 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SKSL_INTRINSIC_LIST_DEFINED #define SKSL_INTRINSIC_LIST_DEFINED #include "src/core/SkTHash.h" #include <cstdint> #include <initializer_list> #include <string_view> // A list of every intrinsic supported by SkSL. // Using an X-Macro (https://en.wikipedia.org/wiki/X_Macro) to manage the list. #define SKSL_INTRINSIC_LIST … namespace SkSL { // The `IntrinsicKind` enum holds every intrinsic supported by SkSL. #define SKSL_INTRINSIC … enum IntrinsicKind : int8_t { … }; #undef SKSL_INTRINSIC // Returns a map which allows IntrinsicKind values to be looked up by name. IntrinsicMap; const IntrinsicMap& GetIntrinsicMap(); // Looks up intrinsic functions by name. IntrinsicKind FindIntrinsicKind(std::string_view functionName); } #endif