#include <SkRecord.h>
Definition at line 32 of file SkRecord.h.
◆ SkRecord()
◆ ~SkRecord()
Definition at line 12 of file SkRecord.cpp.
12 {
13 Destroyer destroyer;
14 for (
int i = 0;
i < this->
count();
i++) {
16 }
17}
auto mutate(int i, F &&f) -> decltype(f((SkRecords::NoOp *) nullptr))
◆ alloc()
T * SkRecord::alloc |
( |
size_t |
count = 1 | ) |
|
|
inline |
Definition at line 61 of file SkRecord.h.
61 {
62 struct RawBytes {
63 alignas(
T)
char data[
sizeof(
T)];
64 };
65 fApproxBytesAllocated +=
count *
sizeof(
T) +
alignof(
T);
67 }
T * makeArrayDefault(size_t count)
std::shared_ptr< const fml::Mapping > data
◆ append()
Definition at line 72 of file SkRecord.h.
72 {
73 if (fCount == fReserved) {
74 this->grow();
75 }
76 return fRecords[fCount++].set(this->allocCommand<T>());
77 }
◆ bytesUsed()
size_t SkRecord::bytesUsed |
( |
| ) |
const |
Definition at line 25 of file SkRecord.cpp.
25 {
26 size_t bytes = fApproxBytesAllocated +
sizeof(
SkRecord);
27 return bytes;
28}
◆ count()
int SkRecord::count |
( |
| ) |
const |
|
inline |
◆ defrag()
void SkRecord::defrag |
( |
| ) |
|
Definition at line 30 of file SkRecord.cpp.
30 {
31
32
33
34 Record* noops = std::remove_if(fRecords.
get(), fRecords.
get() + fCount,
35 [](Record op) { return op.type() == SkRecords::NoOp_Type; });
36 fCount = noops - fRecords.
get();
37}
◆ mutate()
auto SkRecord::mutate |
( |
int |
i, |
|
|
F && |
f |
|
) |
| -> decltype(f((SkRecords::NoOp*)nullptr)) |
|
inline |
Definition at line 54 of file SkRecord.h.
54 {
55 return fRecords[
i].mutate(
f);
56 }
◆ replace()
T * SkRecord::replace |
( |
int |
i | ) |
|
|
inline |
Definition at line 83 of file SkRecord.h.
83 {
85
86 Destroyer destroyer;
88
89 return fRecords[
i].set(this->allocCommand<T>());
90 }
◆ visit()
auto SkRecord::visit |
( |
int |
i, |
|
|
F && |
f |
|
) |
| const -> decltype(f(SkRecords::NoOp())) |
|
inline |
Definition at line 45 of file SkRecord.h.
45 {
46 return fRecords[
i].visit(
f);
47 }
The documentation for this class was generated from the following files: