| Flutter Impeller |

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

`#include <surface.h>`

Inheritance diagram for impeller::Surface:

## Public Member Functions
| Surface ()
| Surface (const RenderTarget &target_desc)
virtual | ~Surface ()
const ISize & | GetSize () const
bool | IsValid () const
const RenderTarget & | GetRenderTarget () const
virtual bool | Present () const

## Detailed Description

Definition at line 12 of file surface.h.

## Constructor & Destructor Documentation

## ◆ Surface() [1/2]

impeller::Surface::Surface | ( |  | ) |

Definition at line 11 of file surface.cc.

11 : Surface(RenderTarget{}) {}
impeller::Surface::Surface
Surface()
Definition: surface.cc:11

## ◆ Surface() [2/2]

impeller::Surface::Surface | ( | const RenderTarget & | target_desc | ) |
| explicit

Definition at line 13 of file surface.cc.

13 : desc_(target_desc) {
14 if (auto size = desc_.GetColorAttachmentSize(0u); size.has_value()) {
15 size_ = size.value();
16 } else {
17 return;
18 }
19
20 is_valid_ = true;
21 }
impeller::RenderTarget::GetColorAttachmentSize
std::optional< ISize > GetColorAttachmentSize(size_t index) const
Definition: render_target.cc:155

References impeller::RenderTarget::GetColorAttachmentSize().

## ◆ ~Surface()

impeller::Surface::~Surface | ( |  | ) |
| virtualdefault

## Member Function Documentation

## ◆ GetRenderTarget()

const RenderTarget & impeller::Surface::GetRenderTarget | ( |  | ) | const

Definition at line 33 of file surface.cc.

33 {
34 return desc_;
35 }

## ◆ GetSize()

const ISize & impeller::Surface::GetSize | ( |  | ) | const

Definition at line 25 of file surface.cc.

25 {
26 return size_;
27 }

## ◆ IsValid()

bool impeller::Surface::IsValid | ( |  | ) | const

Definition at line 29 of file surface.cc.

29 {
30 return is_valid_;
31 }

## ◆ Present()

bool impeller::Surface::Present | ( |  | ) | const
| virtual

Reimplemented in impeller::SurfaceMTL.

Definition at line 37 of file surface.cc.

37 {
38 return false;
39 };

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

- impeller/renderer/surface.h
- impeller/renderer/surface.cc