Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
flutter::Pipeline< R >::ProducerContinuation Class Reference

#include <pipeline.h>

Public Member Functions

 ProducerContinuation ()
 
 ProducerContinuation (ProducerContinuation &&other)
 
ProducerContinuationoperator= (ProducerContinuation &&other)
 
 ~ProducerContinuation ()
 
PipelineProduceResult Complete (ResourcePtr resource)
 Completes the continuation with the specified resource.
 
 operator bool () const
 

Friends

class Pipeline
 

Detailed Description

template<class R>
class flutter::Pipeline< R >::ProducerContinuation

Denotes a spot in the pipeline reserved for the producer to finish preparing a completed pipeline resource.

Definition at line 71 of file pipeline.h.

Constructor & Destructor Documentation

◆ ProducerContinuation() [1/2]

template<class R >
flutter::Pipeline< R >::ProducerContinuation::ProducerContinuation ( )
inline

Definition at line 73 of file pipeline.h.

73: trace_id_(0) {}

◆ ProducerContinuation() [2/2]

template<class R >
flutter::Pipeline< R >::ProducerContinuation::ProducerContinuation ( ProducerContinuation &&  other)
inline

Definition at line 75 of file pipeline.h.

76 : continuation_(other.continuation_), trace_id_(other.trace_id_) {
77 other.continuation_ = nullptr;
78 other.trace_id_ = 0;
79 }

◆ ~ProducerContinuation()

template<class R >
flutter::Pipeline< R >::ProducerContinuation::~ProducerContinuation ( )
inline

Definition at line 87 of file pipeline.h.

87 {
88 if (continuation_) {
89 continuation_(nullptr, trace_id_);
90 TRACE_EVENT_ASYNC_END0("flutter", "PipelineProduce", trace_id_);
91 // The continuation is being dropped on the floor. End the flow.
92 TRACE_FLOW_END("flutter", "PipelineItem", trace_id_);
93 TRACE_EVENT_ASYNC_END0("flutter", "PipelineItem", trace_id_);
94 }
95 }
#define TRACE_EVENT_ASYNC_END0(category_group, name, id)
#define TRACE_FLOW_END(category, name, id)

Member Function Documentation

◆ Complete()

template<class R >
PipelineProduceResult flutter::Pipeline< R >::ProducerContinuation::Complete ( ResourcePtr  resource)
inline

Completes the continuation with the specified resource.

Definition at line 98 of file pipeline.h.

98 {
99 PipelineProduceResult result;
100 if (continuation_) {
101 result = continuation_(std::move(resource), trace_id_);
102 continuation_ = nullptr;
103 TRACE_EVENT_ASYNC_END0("flutter", "PipelineProduce", trace_id_);
104 TRACE_FLOW_STEP("flutter", "PipelineItem", trace_id_);
105 }
106 return result;
107 }
GAsyncResult * result
#define TRACE_FLOW_STEP(category, name, id)

◆ operator bool()

template<class R >
flutter::Pipeline< R >::ProducerContinuation::operator bool ( ) const
inlineexplicit

Definition at line 109 of file pipeline.h.

109{ return continuation_ != nullptr; }

◆ operator=()

template<class R >
ProducerContinuation & flutter::Pipeline< R >::ProducerContinuation::operator= ( ProducerContinuation &&  other)
inline

Definition at line 81 of file pipeline.h.

81 {
82 std::swap(continuation_, other.continuation_);
83 std::swap(trace_id_, other.trace_id_);
84 return *this;
85 }

Friends And Related Symbol Documentation

◆ Pipeline

template<class R >
friend class Pipeline
friend

Definition at line 112 of file pipeline.h.


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