#include <capture.h>
Definition at line 269 of file capture.h.
◆ CaptureContext()
impeller::CaptureContext::CaptureContext |
( |
| ) |
|
◆ DoesDocumentExist()
bool impeller::CaptureContext::DoesDocumentExist |
( |
const std::string & |
label | ) |
const |
Definition at line 209 of file capture.cc.
209 {
210#ifdef IMPELLER_ENABLE_CAPTURE
211 if (!active_) {
212 return false;
213 }
214 return documents_.find(label) != documents_.end();
215#else
216 return false;
217#endif
218}
◆ GetDocument()
Capture impeller::CaptureContext::GetDocument |
( |
const std::string & |
label | ) |
|
Definition at line 182 of file capture.cc.
182 {
183#ifdef IMPELLER_ENABLE_CAPTURE
184 if (!active_) {
186 }
187
188 if (allowlist_.has_value()) {
189 if (allowlist_->find(label) == allowlist_->end()) {
191 }
192 }
193
194 auto found = documents_.find(label);
195 if (found != documents_.end()) {
196
197 found->second.Rewind();
198 return found->second;
199 }
200
201 auto new_document = Capture(label);
202 documents_.emplace(label, new_document);
203 return new_document;
204#else
206#endif
207}
static Capture MakeInactive()
◆ IsActive()
bool impeller::CaptureContext::IsActive |
( |
| ) |
const |
Definition at line 164 of file capture.cc.
164 {
165#ifdef IMPELLER_ENABLE_CAPTURE
166 return active_;
167#else
168 return false;
169#endif
170}
◆ MakeAllowlist()
CaptureContext impeller::CaptureContext::MakeAllowlist |
( |
std::initializer_list< std::string > |
allowlist | ) |
|
|
static |
◆ MakeInactive()
◆ Rewind()
void impeller::CaptureContext::Rewind |
( |
| ) |
|
Definition at line 172 of file capture.cc.
172 {
173#ifdef IMPELLER_ENABLE_CAPTURE
174 for (
auto& [
name, capture] : documents_) {
175 capture.GetElement()->Rewind();
176 }
177#else
178 return;
179#endif
180}
The documentation for this class was generated from the following files: