xref: /aosp_15_r20/external/skia/src/gpu/graphite/InternalDrawTypeFlags.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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     kCoverageMask  = DrawTypeFlags::kLast << 1,
21     kAnalyticRRect = DrawTypeFlags::kLast << 2,
22 
23     kLastInternal = kAnalyticRRect,
24 };
25 static_assert(kLastInternal <= (1 << 15), "DrawTypeFlags do not fit in 16 bits");
26 
27 } // namespace skgpu::graphite
28 
29 #endif // skgpu_graphite_InternalDrawTypeFlags_DEFINED
30