| Flutter Impeller |

Public Types | Public Member Functions | List of all members
impeller::RenderPipelineHandle< VertexShader_, FragmentShader_ > Class Template Reference

`#include <pipeline.h>`

## Public Types
using | VertexShader = VertexShader_
using | FragmentShader = FragmentShader_
using | Builder = PipelineBuilder< VertexShader, FragmentShader >

## Public Member Functions
| RenderPipelineHandle (const Context &context)
| RenderPipelineHandle (const Context &context, std::optional< PipelineDescriptor > desc)
| RenderPipelineHandle (PipelineFuture< PipelineDescriptor > future)
std::shared_ptr< Pipeline< PipelineDescriptor > > | WaitAndGet ()
std::optional< PipelineDescriptor > | GetDescriptor () const

## Detailed Description

### template<class VertexShader_, class FragmentShader_>
class impeller::RenderPipelineHandle< VertexShader_, FragmentShader_ >

Holds a reference to a Pipeline used for rendering while also maintaining the vertex shader and fragment shader types at compile-time.

See also:

- impeller::ContentContext::Variants - the typical container for RenderPipelineHandles.

Definition at line 99 of file pipeline.h.

## Member Typedef Documentation

## ◆ Builder

template<class VertexShader_ , class FragmentShader_ >

using impeller::RenderPipelineHandle< VertexShader_, FragmentShader_ >::Builder = PipelineBuilder<VertexShader, FragmentShader>

Definition at line 108 of file pipeline.h.

## ◆ FragmentShader

template<class VertexShader_ , class FragmentShader_ >

using impeller::RenderPipelineHandle< VertexShader_, FragmentShader_ >::FragmentShader = FragmentShader_

Definition at line 107 of file pipeline.h.

## ◆ VertexShader

template<class VertexShader_ , class FragmentShader_ >

using impeller::RenderPipelineHandle< VertexShader_, FragmentShader_ >::VertexShader = VertexShader_

Definition at line 106 of file pipeline.h.

## Constructor & Destructor Documentation

## ◆ RenderPipelineHandle() [1/3]

template<class VertexShader_ , class FragmentShader_ >

impeller::RenderPipelineHandle< VertexShader_, FragmentShader_ >::RenderPipelineHandle | ( | const Context & | context | ) |
| inlineexplicit

Definition at line 110 of file pipeline.h.

111 : RenderPipelineHandle(CreatePipelineFuture(
112 context,
113 Builder::MakeDefaultPipelineDescriptor(context))) {}

## ◆ RenderPipelineHandle() [2/3]

template<class VertexShader_ , class FragmentShader_ >

impeller::RenderPipelineHandle< VertexShader_, FragmentShader_ >::RenderPipelineHandle | ( | const Context & | context,
|  | std::optional< PipelineDescriptor > | desc
| ) |  |
| inlineexplicit

Definition at line 115 of file pipeline.h.

117 : RenderPipelineHandle(CreatePipelineFuture(context, desc)) {}

## ◆ RenderPipelineHandle() [3/3]

template<class VertexShader_ , class FragmentShader_ >

impeller::RenderPipelineHandle< VertexShader_, FragmentShader_ >::RenderPipelineHandle | ( | PipelineFuture< PipelineDescriptor > | future | ) |
| inlineexplicit

Definition at line 119 of file pipeline.h.

120 : pipeline_future_(std::move(future)) {}

## Member Function Documentation

## ◆ GetDescriptor()

template<class VertexShader_ , class FragmentShader_ >

std::optional<PipelineDescriptor> impeller::RenderPipelineHandle< VertexShader_, FragmentShader_ >::GetDescriptor | ( |  | ) | const
| inline

Definition at line 133 of file pipeline.h.

133 {
134 return pipeline_future_.descriptor;
135 }

## ◆ WaitAndGet()

template<class VertexShader_ , class FragmentShader_ >

std::shared_ptr<Pipeline<PipelineDescriptor> > impeller::RenderPipelineHandle< VertexShader_, FragmentShader_ >::WaitAndGet | ( |  | ) |
| inline

Definition at line 122 of file pipeline.h.

122 {
123 if (did_wait_) {
124 return pipeline_;
125 }
126 did_wait_ = true;
127 if (pipeline_future_.IsValid()) {
128 pipeline_ = pipeline_future_.Get();
129 }
130 return pipeline_;
131 }

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

- impeller/renderer/pipeline.h

impeller::CreatePipelineFuture
PipelineFuture< PipelineDescriptor > CreatePipelineFuture(const Context &context, std::optional< PipelineDescriptor > desc)
Definition: pipeline.cc:24
impeller::PipelineBuilder::MakeDefaultPipelineDescriptor
static std::optional< PipelineDescriptor > MakeDefaultPipelineDescriptor(const Context &context, const std::vector< Scalar > &constants={})
Create a default pipeline descriptor using the combination reflected shader information....
Definition: pipeline_builder.h:49
impeller::RenderPipelineHandle::RenderPipelineHandle
RenderPipelineHandle(const Context &context)
Definition: pipeline.h:110