Skia
2D Graphics Library
GpuTypes.h
Go to the documentation of this file.
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 
17 namespace skgpu {
18 
22 enum class BackendApi : unsigned {
23  kDawn,
24  kMetal,
25  kVulkan,
26  kMock,
27 
32 };
33 
35 enum class Budgeted : bool {
36  kNo = false,
37  kYes = true,
38 };
39 
45 enum class CallbackResult : bool {
46  kFailed = false,
47  kSuccess = true,
48 };
49 
53 enum class Mipmapped : bool {
54  kNo = false,
55  kYes = true,
56 };
57 
61 enum class Protected : bool {
62  kNo = false,
63  kYes = true,
64 };
65 
69 enum class Renderable : bool {
70  kNo = false,
71  kYes = true,
72 };
73 
77 enum class Origin : unsigned {
78  kTopLeft,
80 };
81 
82 } // namespace skgpu
83 
84 
85 #endif // skgpu_GpuTypes_DEFINED
This file includes numerous public types that are used by all of our gpu backends.
Definition: SkCanvas.h:73
Origin
What is the logical origin of a BackendTexture passed into Skia.
Definition: GpuTypes.h:77
BackendApi
Possible 3D APIs that may be used by Graphite.
Definition: GpuTypes.h:22
@ kUnsupported
Graphite doesn't support some context types (e.g.
Budgeted
Indicates whether an allocation should count against a cache budget.
Definition: GpuTypes.h:35
Renderable
Is a texture renderable or not.
Definition: GpuTypes.h:69
CallbackResult
Value passed into various callbacks to tell the client the result of operations connected to a specif...
Definition: GpuTypes.h:45
Mipmapped
Is the texture mipmapped or not.
Definition: GpuTypes.h:53
Protected
Is the data protected on the GPU or not.
Definition: GpuTypes.h:61