#include <MtlBuffer.h>
Definition at line 20 of file MtlBuffer.h.
◆ freeGpuData()
void skgpu::graphite::MtlBuffer::freeGpuData |
( |
| ) |
|
|
overrideprivatevirtual |
◆ Make()
Definition at line 31 of file MtlBuffer.mm.
35 {
37 return nullptr;
38 }
39
41 if (@available(macOS 10.11, iOS 9.0, tvOS 9.0, *)) {
43#ifdef SK_BUILD_FOR_MAC
45 if (mtlCaps.isMac()) {
46 options |= MTLResourceStorageModeManaged;
47 } else {
49 options |= MTLResourceStorageModeShared;
50 }
51#else
52 options |= MTLResourceStorageModeShared;
53#endif
54 } else {
55 options |= MTLResourceStorageModePrivate;
56 }
57 }
58
61#ifdef SK_ENABLE_MTL_DEBUG_INFO
63#endif
64
68 std::move(label)));
69}
Type::kYUV Type::kRGBA() int(0.7 *637)
const SharedContext * sharedContext() const
static const uint8_t buffer[]
static const char * kBufferTypeNames[kBufferTypeCount]
◆ mtlBuffer()
id< MTLBuffer > skgpu::graphite::MtlBuffer::mtlBuffer |
( |
| ) |
const |
|
inline |
Definition at line 28 of file MtlBuffer.h.
28{ return fBuffer.get(); }
◆ onMap()
void skgpu::graphite::MtlBuffer::onMap |
( |
| ) |
|
|
overrideprivatevirtual |
Implements skgpu::graphite::Buffer.
Definition at line 78 of file MtlBuffer.mm.
78 {
81
82 if ((*fBuffer).storageMode == MTLStorageModePrivate) {
83 return;
84 }
85
86 fMapPtr =
static_cast<char*
>((*fBuffer).contents);
87}
◆ onUnmap()
void skgpu::graphite::MtlBuffer::onUnmap |
( |
| ) |
|
|
overrideprivatevirtual |
Implements skgpu::graphite::Buffer.
Definition at line 89 of file MtlBuffer.mm.
89 {
92#ifdef SK_BUILD_FOR_MAC
93 if ((*fBuffer).storageMode == MTLStorageModeManaged) {
94 [*fBuffer didModifyRange: NSMakeRange(0, this->
size())];
95 }
96#endif
98}
The documentation for this class was generated from the following files: