| 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 (const std::string &label)
std::shared_ptr< CaptureElement > | GetElement () const
void | Rewind ()

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

## Detailed Description

Definition at line 226 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 | ( | const std::string & | label | ) |
| inline

Definition at line 234 of file capture.h.

234 {
235 #ifdef IMPELLER_ENABLE_CAPTURE
236 if (!active_) {
237 return Capture();
238 }
239
240 auto new_capture = Capture(label);
241 new_capture.element_ =
242 element_->children.GetNext(new_capture.element_, false);
243 new_capture.element_->Rewind();
244 return new_capture;
245 #else
246 return Capture();
247 #endif
248 }

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()