| Flutter Impeller |

Public Member Functions | Static Public Member Functions | List of all members
impeller::Capture Class Reference

`#include <capture.h>`

## Public Member Functions
| Capture (const std::string &label)
| Capture ()
Capture | CreateChild (std::string_view label)
std::shared_ptr< CaptureElement > | GetElement () const
void | Rewind ()

## Static Public Member Functions
static Capture | MakeInactive ()

## Detailed Description

Definition at line 231 of file capture.h.

## Constructor & Destructor Documentation

## ◆ Capture() [1/2]

impeller::Capture::Capture | ( | const std::string & | label | ) |
| explicit

Definition at line 98 of file capture.cc.

98 {}

## ◆ Capture() [2/2]

impeller::Capture::Capture | ( |  | ) |
| default

Capture

Referenced by CreateChild(), and MakeInactive().

## Member Function Documentation

## ◆ CreateChild()

Capture impeller::Capture::CreateChild | ( | std::string_view | label | ) |
| inline

Definition at line 239 of file capture.h.

239 {
240 #ifdef IMPELLER_ENABLE_CAPTURE
241 if (!active_) {
242 return Capture();
243 }
244
245 std::string label_copy = std::string(label);
246 auto new_capture = Capture(label_copy);
247 new_capture.element_ =
248 element_->children.GetNext(new_capture.element_, false);
249 new_capture.element_->Rewind();
250 return new_capture;
251 #else
252 return Capture();
253 #endif
254 }

References Capture().

Referenced by impeller::SolidColorContents::Render(), and impeller::TextureContents::Render().

## ◆ GetElement()

std::shared_ptr< CaptureElement > impeller::Capture::GetElement | ( |  | ) | const

Definition at line 105 of file capture.cc.

105 {
106 #ifdef IMPELLER_ENABLE_CAPTURE
107 return element_;
108 #else
109 return nullptr;
110 #endif
111 }

Referenced by Rewind().

## ◆ MakeInactive()

Capture impeller::Capture::MakeInactive | ( |  | ) |
| static

Definition at line 101 of file capture.cc.

101 {
102 return Capture();
103 }

References Capture().

Referenced by impeller::CaptureContext::GetDocument().

## ◆ Rewind()

void impeller::Capture::Rewind | ( |  | ) |

Definition at line 113 of file capture.cc.

113 {
114 return GetElement()->Rewind();
115 }

References GetElement().

The documentation for this class was generated from the following files:

- impeller/core/capture.h
- impeller/core/capture.cc

impeller::Capture::GetElement
std::shared_ptr< CaptureElement > GetElement() const
Definition: capture.cc:105
impeller::Capture::Capture
Capture()