• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2024 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 skgpu_graphite_InternalDrawTypeFlags_DEFINED
9 #define skgpu_graphite_InternalDrawTypeFlags_DEFINED
10 
11 #include "include/gpu/graphite/GraphiteTypes.h"
12 
13 namespace skgpu::graphite {
14 
15 /*
16  * This enum extends the DrawTypeFlags enum to include 'drawTypes' that are only needed internal
17  * to Graphite.
18  */
19 enum InternalDrawTypeFlags : uint16_t {
20     // Corresponds to the CoverageMaskRenderStep. Used when creating precompile Pipelines for
21     // blur-filtering and raster/compute path atlasing.
22     kCoverageMask  = DrawTypeFlags::kLast << 1,
23     // Corresponds to the AnalyticRRectRenderStep. Used when creating Blur filter
24     // precompile pipelines.
25     kAnalyticRRect = DrawTypeFlags::kLast << 2,
26     // Corresponds to the AnalyticBlurRenderStep. It can perform an analytic blur for rects,
27     // rrects, and circles.
28     kAnalyticBlur = DrawTypeFlags::kLast << 3,
29 
30     kLastInternal = kAnalyticRRect,
31 };
32 static_assert(kLastInternal <= (1 << 15), "DrawTypeFlags do not fit in 16 bits");
33 
34 } // namespace skgpu::graphite
35 
36 #endif // skgpu_graphite_InternalDrawTypeFlags_DEFINED
37