| Flutter Impeller |

Public Member Functions | Static Public Member Functions | List of all members
IMPELLER_HPP_NAMESPACE::FragmentProgram Class Reference

`#include <impeller.hpp>`

Inheritance diagram for IMPELLER_HPP_NAMESPACE::FragmentProgram:

## Public Member Functions
| FragmentProgram (ImpellerFragmentProgram program, AdoptTag tag)
Public Member Functions inherited from IMPELLER_HPP_NAMESPACE::Object< ImpellerFragmentProgram, ImpellerFragmentProgramTraits >
| Object ()=default
| Object (ImpellerFragmentProgram object)
| Object (ImpellerFragmentProgram object, AdoptTag)
| Object (Object &&other)
| Object (const Object &other)
| ~Object ()
Object & | operator= (Object &&other)
Object & | operator= (const Object &other)
ImpellerFragmentProgram | Get () const
| operator bool () const

## Static Public Member Functions
static FragmentProgram | WithData (std::unique_ptr< Mapping > data)

## Detailed Description

See also
  ImpellerFragmentProgram

Definition at line 482 of file impeller.hpp.

## Constructor & Destructor Documentation

## ◆ FragmentProgram()

IMPELLER_HPP_NAMESPACE::FragmentProgram::FragmentProgram | ( | ImpellerFragmentProgram | program,
|  | AdoptTag | tag
| ) |  |
| inline

Definition at line 485 of file impeller.hpp.

486 : Object(program, tag) {}
IMPELLER_HPP_NAMESPACE::Object< ImpellerFragmentProgram, ImpellerFragmentProgramTraits >::Object
Object()=default

Referenced by WithData().

## Member Function Documentation

## ◆ WithData()

static FragmentProgram IMPELLER_HPP_NAMESPACE::FragmentProgram::WithData | ( | std::unique_ptr< Mapping > | data | ) |
| inline static

Definition at line 488 of file impeller.hpp.

488 {
489 ImpellerMapping c_mapping = {};
490 c_mapping.data = data->GetMapping();
491 c_mapping.length = data->GetSize();
492 c_mapping.on_release = [](void* user_data) {
493 delete reinterpret_cast<Mapping*>(user_data);
494 };
495 return FragmentProgram(
496 gGlobalProcTable.ImpellerFragmentProgramNew(&c_mapping, data.release()),
497 AdoptTag::kAdopt);
498 }
IMPELLER_HPP_NAMESPACE::FragmentProgram::FragmentProgram
FragmentProgram(ImpellerFragmentProgram program, AdoptTag tag)
Definition: impeller.hpp:485
IMPELLER_HPP_NAMESPACE::AdoptTag::kAdopt
@ kAdopt
IMPELLER_HPP_NAMESPACE::gGlobalProcTable
ProcTable gGlobalProcTable
Definition: playground_test.cc:25
ImpellerMapping
Definition: impeller.h:626
ImpellerMapping::on_release
ImpellerCallback IMPELLER_NULLABLE on_release
Definition: impeller.h:629
ImpellerMapping::length
uint64_t length
Definition: impeller.h:628
ImpellerMapping::data
const uint8_t *IMPELLER_NONNULL data
Definition: impeller.h:627
data
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:69

References data, ImpellerMapping::data, FragmentProgram(), IMPELLER_HPP_NAMESPACE::gGlobalProcTable, IMPELLER_HPP_NAMESPACE::kAdopt, ImpellerMapping::length, and ImpellerMapping::on_release.

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

- impeller/toolkit/interop/impeller.hpp