xref: /aosp_15_r20/external/skia/include/gpu/graphite/LogPriority.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_LogPriority_DEFINED
9 #define skgpu_graphite_LogPriority_DEFINED
10 
11 /**
12  * Note: this file may be included in clients' SkUserConfig.h files, so including any other headers
13  * in this file should be avoided.
14  */
15 
16 namespace skgpu::graphite {
17 /**
18  * SKGPU_GRAPHITE_LOWEST_ACTIVE_LOG_PRIORITY can be defined to one of these values (in
19  * SkUserConfig.h) to control Graphite's logging behavior.
20  *
21  * For example:
22  * ```
23  * #define SKGPU_GRAPHITE_LOWEST_ACTIVE_LOG_PRIORITY skgpu::graphite::LogPriority::kWarning
24  * ```
25  * Would cause Graphite to log warnings, non-fatal errors, and fatal errors.
26  * However, debug logs would be omitted.
27  */
28 enum class LogPriority : int {
29     kFatal = 0,
30     kError = 1,
31     kWarning = 2,
32     kDebug = 3,
33 };
34 };  // namespace skgpu::graphite
35 
36 #endif // skgpu_graphite_LogPriority_DEFINED
37