• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Google LLC
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkBuiltInCodeSnippetID_DEFINED
9 #define SkBuiltInCodeSnippetID_DEFINED
10 
11 #include "include/core/SkTypes.h"
12 
13 // TODO: this needs to be expanded into a more flexible dictionary (esp. for user-supplied SkSL)
14 enum class SkBuiltInCodeSnippetID : uint8_t {
15     // TODO: It seems like this requires some refinement. Fundamentally this doesn't seem like a
16     // draw that originated from a PaintParams.
17     kDepthStencilOnlyDraw,
18 
19     kError,
20 
21     // SkShader code snippets
22     kSolidColorShader,
23     kLinearGradientShader,
24     kRadialGradientShader,
25     kSweepGradientShader,
26     kConicalGradientShader,
27 
28     kImageShader,
29     kBlendShader,     // aka ComposeShader
30 
31     // BlendMode code snippets
32     kSimpleBlendMode,
33 
34     kLast = kSimpleBlendMode
35 };
36 static constexpr int kBuiltInCodeSnippetIDCount = static_cast<int>(SkBuiltInCodeSnippetID::kLast)+1;
37 
38 #endif // SkBuiltInCodeSnippetID_DEFINED
39