| Flutter Impeller |

Public Member Functions | Static Public Member Functions | List of all members
IMPELLER_HPP_NAMESPACE::Surface Class Referencefinal

`#include <impeller.hpp>`

Inheritance diagram for IMPELLER_HPP_NAMESPACE::Surface:

## Public Member Functions
| Surface (ImpellerSurface surface)
| Surface (ImpellerSurface surface, AdoptTag tag)
bool | Draw (const DisplayList &display_list) const
bool | Present () const
Public Member Functions inherited from IMPELLER_HPP_NAMESPACE::Object< ImpellerSurface, ImpellerSurfaceTraits >
| Object ()=default
| Object (ImpellerSurface object)
| Object (ImpellerSurface object, AdoptTag)
| Object (Object &&other)
| Object (const Object &other)
| ~Object ()
Object & | operator= (Object &&other)
Object & | operator= (const Object &other)
ImpellerSurface | Get () const
| operator bool () const

## Static Public Member Functions
static Surface | WrapFBO (const Context &context, uint64_t fbo, ImpellerPixelFormat format, const ImpellerISize &size)
static Surface | WrapMetalDrawable (const Context &context, void *metal_drawable)

## Detailed Description

See also
  ImpellerSurface

Definition at line 1342 of file impeller.hpp.

## Constructor & Destructor Documentation

## ◆ Surface() [1/2]

IMPELLER_HPP_NAMESPACE::Surface::Surface | ( | ImpellerSurface | surface | ) |
| inline explicit

Definition at line 1344 of file impeller.hpp.

1344 : Object(surface) {}
IMPELLER_HPP_NAMESPACE::Object< ImpellerSurface, ImpellerSurfaceTraits >::Object
Object()=default

Referenced by WrapFBO(), and WrapMetalDrawable().

## ◆ Surface() [2/2]

IMPELLER_HPP_NAMESPACE::Surface::Surface | ( | ImpellerSurface | surface,
|  | AdoptTag | tag
| ) |  |
| inline

Definition at line 1346 of file impeller.hpp.

1346 : Object(surface, tag) {}

## Member Function Documentation

## ◆ Draw()

bool IMPELLER_HPP_NAMESPACE::Surface::Draw | ( | const DisplayList & | display_list | ) | const
| inline

See also
  ImpellerSurfaceDrawDisplayList

Definition at line 1378 of file impeller.hpp.

1378 {
1379 return gGlobalProcTable.ImpellerSurfaceDrawDisplayList(Get(),
1380 display_list.Get());
1381 }
IMPELLER_HPP_NAMESPACE::Object< ImpellerSurface, ImpellerSurfaceTraits >::Get
ImpellerSurface Get() const
Definition: impeller.hpp:269
IMPELLER_HPP_NAMESPACE::gGlobalProcTable
ProcTable gGlobalProcTable
Definition: playground_test.cc:25

References IMPELLER_HPP_NAMESPACE::Object< T, Traits >::Get(), IMPELLER_HPP_NAMESPACE::Object< ImpellerSurface, ImpellerSurfaceTraits >::Get(), and IMPELLER_HPP_NAMESPACE::gGlobalProcTable.

## ◆ Present()

bool IMPELLER_HPP_NAMESPACE::Surface::Present | ( |  | ) | const
| inline

See also
  ImpellerSurfacePresent

Definition at line 1386 of file impeller.hpp.

1386 {
1387 return gGlobalProcTable.ImpellerSurfacePresent(Get());
1388 }

References IMPELLER_HPP_NAMESPACE::Object< ImpellerSurface, ImpellerSurfaceTraits >::Get(), and IMPELLER_HPP_NAMESPACE::gGlobalProcTable.

## ◆ WrapFBO()

static Surface IMPELLER_HPP_NAMESPACE::Surface::WrapFBO | ( | const Context & | context,
|  | uint64_t | fbo,
|  | ImpellerPixelFormat | format,
|  | const ImpellerISize & | size
| ) |  |
| inline static

See also
  ImpellerSurfaceCreateWrappedFBONew

Definition at line 1351 of file impeller.hpp.

1354 {
1355 return Surface(
1356 gGlobalProcTable.ImpellerSurfaceCreateWrappedFBONew(context.Get(), //
1357 fbo, //
1358 format, //
1359 &size //
1360 ),
1361 AdoptTag::kAdopt);
1362 }
IMPELLER_HPP_NAMESPACE::Surface::Surface
Surface(ImpellerSurface surface)
Definition: impeller.hpp:1344
IMPELLER_HPP_NAMESPACE::AdoptTag::kAdopt
@ kAdopt

References IMPELLER_HPP_NAMESPACE::Object< T, Traits >::Get(), IMPELLER_HPP_NAMESPACE::gGlobalProcTable, IMPELLER_HPP_NAMESPACE::kAdopt, and Surface().

## ◆ WrapMetalDrawable()

static Surface IMPELLER_HPP_NAMESPACE::Surface::WrapMetalDrawable | ( | const Context & | context,
|  | void * | metal_drawable
| ) |  |
| inline static

See also
  ImpellerSurfaceCreateWrappedMetalDrawableNew

Definition at line 1367 of file impeller.hpp.

1368 {
1369 return Surface(
1370 gGlobalProcTable.ImpellerSurfaceCreateWrappedMetalDrawableNew(
1371 context.Get(), metal_drawable),
1372 AdoptTag::kAdopt);
1373 }

References IMPELLER_HPP_NAMESPACE::Object< T, Traits >::Get(), IMPELLER_HPP_NAMESPACE::gGlobalProcTable, IMPELLER_HPP_NAMESPACE::kAdopt, and Surface().

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

- impeller/toolkit/interop/impeller.hpp