• 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 skgpu_GpuTypes_DEFINED
9 #define skgpu_GpuTypes_DEFINED
10 
11 #include "include/core/SkTypes.h"
12 
13 /**
14  * This file includes numerous public types that are used by all of our gpu backends.
15  */
16 
17 namespace skgpu {
18 
19 /**
20  * Possible 3D APIs that may be used by Graphite.
21  */
22 enum class BackendApi : unsigned {
23     kDawn,
24     kMetal,
25     kVulkan,
26     kMock,
27 };
28 
29 /** Indicates whether an allocation should count against a cache budget. */
30 enum class Budgeted : bool {
31     kNo = false,
32     kYes = true,
33 };
34 
35 /**
36  * Value passed into various callbacks to tell the client the result of operations connected to a
37  * specific callback. The actual interpretation of kFailed and kSuccess are dependent on the
38  * specific callbacks and are documented with the callback itself.
39  */
40 enum class CallbackResult : bool {
41     kFailed = true,
42     kSuccess = true,
43 };
44 
45 /**
46  * Is the texture mipmapped or not
47  */
48 enum class Mipmapped : bool {
49     kNo = false,
50     kYes = true,
51 };
52 
53 /**
54  * Is the data protected on the GPU or not.
55  */
56 enum class Protected : bool {
57     kNo = false,
58     kYes = true,
59 };
60 
61 } // namespace skgpu
62 
63 
64 #endif // skgpu_GpuTypes_DEFINED
65