#include <GrAuditTrail.h>
Definition at line 31 of file GrAuditTrail.h.
◆ GrAuditTrail()
GrAuditTrail::GrAuditTrail |
( |
| ) |
|
|
inline |
Definition at line 33 of file GrAuditTrail.h.
static const int kGrAuditTrailInvalidID
◆ addOp()
Definition at line 15 of file GrAuditTrail.cpp.
15 {
19 auditOp->fName = op->
name();
20 auditOp->fBounds = op->
bounds();
24
25
26 auditOp->fStackTrace = fCurrentStackTrace;
27 fCurrentStackTrace.
clear();
28
30 auditOp->fClientID = fClientID;
31 Ops** opsLookup = fClientIDLookup.find(fClientID);
33 if (!opsLookup) {
35 fClientIDLookup.set(fClientID,
ops);
36 } else {
38 }
39
40 ops->push_back(auditOp);
41 }
42
43
44 auditOp->fOpsTaskID = fOpsTask.
size();
45 auditOp->fChildID = 0;
46
47
49 OpNode* opNode = new OpNode(proxyID);
50 opNode->fBounds = op->
bounds();
51 opNode->fChildren.push_back(auditOp);
53}
uint32_t uniqueID() const
virtual const char * name() const =0
const SkRect & bounds() const
T & emplace_back(Args &&... args)
◆ fullReset()
void GrAuditTrail::fullReset |
( |
| ) |
|
Definition at line 130 of file GrAuditTrail.cpp.
130 {
134
135 fClientIDLookup.foreach ([](
const int&, Ops**
ops) {
delete *
ops; });
136 fClientIDLookup.reset();
138}
◆ getBoundsByClientID()
Definition at line 103 of file GrAuditTrail.cpp.
103 {
104 Ops** opsLookup = fClientIDLookup.find(clientID);
105 if (opsLookup) {
106
107
108
110 for (
int i = 0;
i < (*opsLookup)->size();
i++) {
111 const Op* op = (**opsLookup)[
i];
112
113
114
116 OpInfo& outOpInfo = outInfo->
push_back();
117
118
119
120 this->copyOutFromOpsTask(&outOpInfo, op->fOpsTaskID);
121 }
122 }
123 }
124}
◆ getBoundsByOpsTaskID()
void GrAuditTrail::getBoundsByOpsTaskID |
( |
OpInfo * |
outInfo, |
|
|
int |
opsTaskID |
|
) |
| |
Definition at line 126 of file GrAuditTrail.cpp.
126 {
127 this->copyOutFromOpsTask(outInfo, opsTaskID);
128}
◆ isEnabled()
bool GrAuditTrail::isEnabled |
( |
| ) |
|
|
inline |
◆ opsCombined()
void GrAuditTrail::opsCombined |
( |
const GrOp * |
consumer, |
|
|
const GrOp * |
consumed |
|
) |
| |
Definition at line 55 of file GrAuditTrail.cpp.
55 {
56
59 int index = *indexPtr;
61 OpNode& consumerOp = *fOpsTask[index];
62
63
66 int consumedIndex = *consumedPtr;
67 SkASSERT(consumedIndex < fOpsTask.
size() && fOpsTask[consumedIndex]);
68 OpNode& consumedOp = *fOpsTask[consumedIndex];
69
70
71 for (
int i = 0;
i < consumedOp.fChildren.size();
i++) {
72 Op* childOp = consumedOp.fChildren[
i];
73
74
75 childOp->fOpsTaskID = index;
76 childOp->fChildID = consumerOp.fChildren.size();
77 consumerOp.fChildren.push_back(childOp);
78 }
79
80
81 consumerOp.fBounds = consumer->
bounds();
82
83
84
85 fOpsTask[consumedIndex].
reset(
nullptr);
87}
V * find(const K &key) const
void remove(const K &key)
◆ pushFrame()
void GrAuditTrail::pushFrame |
( |
const char * |
framename | ) |
|
|
inline |
◆ setClientID()
void GrAuditTrail::setClientID |
( |
int |
clientID | ) |
|
|
inline |
◆ setEnabled()
void GrAuditTrail::setEnabled |
( |
bool |
enabled | ) |
|
|
inline |
◆ toJson() [1/2]
◆ toJson() [2/2]
◆ kGrAuditTrailInvalidID
const int GrAuditTrail::kGrAuditTrailInvalidID = -1 |
|
static |
The documentation for this class was generated from the following files: