forked from getsentry/sentry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGpu.java
More file actions
137 lines (110 loc) · 3.09 KB
/
Gpu.java
File metadata and controls
137 lines (110 loc) · 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
package io.sentry.protocol;
import io.sentry.IUnknownPropertiesConsumer;
import io.sentry.util.CollectionUtils;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.TestOnly;
public final class Gpu implements IUnknownPropertiesConsumer, Cloneable {
public static final String TYPE = "gpu";
/** The name of the graphics device. */
private String name;
/** The PCI identifier of the graphics device. */
private Integer id;
/** The PCI vendor identifier of the graphics device. */
private Integer vendorId;
/** The vendor name as reported by the graphics device. */
private String vendorName;
/** The total GPU memory available in Megabytes. */
private Integer memorySize;
/**
* The device low-level API type.
*
* <p>Examples: `"Apple Metal"` or `"Direct3D11"`
*/
private String apiType;
/** Whether the GPU has multi-threaded rendering or not. */
private Boolean multiThreadedRendering;
/** The Version of the graphics device. */
private String version;
/** The Non-Power-Of-Two support. */
private String npotSupport;
@SuppressWarnings("unused")
private Map<String, Object> unknown;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getVendorId() {
return vendorId;
}
public void setVendorId(Integer vendorId) {
this.vendorId = vendorId;
}
public String getVendorName() {
return vendorName;
}
public void setVendorName(String vendorName) {
this.vendorName = vendorName;
}
public Integer getMemorySize() {
return memorySize;
}
public void setMemorySize(Integer memorySize) {
this.memorySize = memorySize;
}
public String getApiType() {
return apiType;
}
public void setApiType(String apiType) {
this.apiType = apiType;
}
public Boolean isMultiThreadedRendering() {
return multiThreadedRendering;
}
public void setMultiThreadedRendering(Boolean multiThreadedRendering) {
this.multiThreadedRendering = multiThreadedRendering;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getNpotSupport() {
return npotSupport;
}
public void setNpotSupport(String npotSupport) {
this.npotSupport = npotSupport;
}
@TestOnly
Map<String, Object> getUnknown() {
return unknown;
}
@ApiStatus.Internal
@Override
public void acceptUnknownProperties(Map<String, Object> unknown) {
this.unknown = new ConcurrentHashMap<>(unknown);
}
/**
* Clones a Gpu aka deep copy
*
* @return the cloned Gpu
* @throws CloneNotSupportedException if object is not cloneable
*/
@Override
public @NotNull Gpu clone() throws CloneNotSupportedException {
final Gpu clone = (Gpu) super.clone();
clone.unknown = CollectionUtils.shallowCopy(unknown);
return clone;
}
}