Flutter Engine
The Flutter Engine
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
12
13/**
14 * This file includes numerous public types that are used by all of our gpu backends.
15 */
16
17namespace skgpu {
18
19/**
20 * Possible 3D APIs that may be used by Graphite.
21 */
22enum class BackendApi : unsigned {
23 kDawn,
24 kMetal,
25 kVulkan,
26 kMock,
27
28 /**
29 * Graphite doesn't support some context types (e.g. Direct3D) and will return Unsupported.
30 */
32};
33
34/** Indicates whether an allocation should count against a cache budget. */
35enum class Budgeted : bool {
36 kNo = false,
37 kYes = true,
38};
39
40/**
41 * Value passed into various callbacks to tell the client the result of operations connected to a
42 * specific callback. The actual interpretation of kFailed and kSuccess are dependent on the
43 * specific callbacks and are documented with the callback itself.
44 */
45enum class CallbackResult : bool {
46 kFailed = false,
47 kSuccess = true,
48};
49
50/**
51 * Is the texture mipmapped or not
52 */
53enum class Mipmapped : bool {
54 kNo = false,
55 kYes = true,
56};
57
58/**
59 * Is the data protected on the GPU or not.
60 */
61enum class Protected : bool {
62 kNo = false,
63 kYes = true,
64};
65
66/**
67 * Is a texture renderable or not
68 */
69enum class Renderable : bool {
70 kNo = false,
71 kYes = true,
72};
73
74/**
75 * What is the logical origin of a BackendTexture passed into Skia
76 */
77enum class Origin : unsigned {
80};
81
82} // namespace skgpu
83
84
85#endif // skgpu_GpuTypes_DEFINED
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
@ kVulkan
Definition: embedder.h:86
@ kMetal
Definition: embedder.h:85
@ kSuccess
Definition: embedder.h:73
Definition: GpuTools.h:21
Origin
Definition: GpuTypes.h:77
BackendApi
Definition: GpuTypes.h:22
Budgeted
Definition: GpuTypes.h:35
Renderable
Definition: GpuTypes.h:69
CallbackResult
Definition: GpuTypes.h:45
Mipmapped
Definition: GpuTypes.h:53
Protected
Definition: GpuTypes.h:61