Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::DisplayListEmbedderViewSlice Class Reference

#include <embedded_views.h>

Inheritance diagram for flutter::DisplayListEmbedderViewSlice:
flutter::EmbedderViewSlice

Public Member Functions

 DisplayListEmbedderViewSlice (SkRect view_bounds)
 
 ~DisplayListEmbedderViewSlice () override=default
 
DlCanvascanvas () override
 
void end_recording () override
 
const DlRegiongetRegion () const override
 
void render_into (DlCanvas *canvas) override
 
void dispatch (DlOpReceiver &receiver)
 
bool is_empty ()
 
bool recording_ended ()
 
- Public Member Functions inherited from flutter::EmbedderViewSlice
virtual ~EmbedderViewSlice ()=default
 
virtual DlCanvascanvas ()=0
 
virtual void end_recording ()=0
 
virtual const DlRegiongetRegion () const =0
 
DlRegion region (const SkRect &query) const
 
virtual void render_into (DlCanvas *canvas)=0
 

Detailed Description

Definition at line 349 of file embedded_views.h.

Constructor & Destructor Documentation

◆ DisplayListEmbedderViewSlice()

flutter::DisplayListEmbedderViewSlice::DisplayListEmbedderViewSlice ( SkRect  view_bounds)
explicit

Definition at line 9 of file embedded_views.cc.

9 {
10 builder_ = std::make_unique<DisplayListBuilder>(
11 /*bounds=*/view_bounds,
12 /*prepare_rtree=*/true);
13}

◆ ~DisplayListEmbedderViewSlice()

flutter::DisplayListEmbedderViewSlice::~DisplayListEmbedderViewSlice ( )
overridedefault

Member Function Documentation

◆ canvas()

DlCanvas * flutter::DisplayListEmbedderViewSlice::canvas ( )
overridevirtual

Implements flutter::EmbedderViewSlice.

Definition at line 15 of file embedded_views.cc.

15 {
16 return builder_ ? builder_.get() : nullptr;
17}

◆ dispatch()

void flutter::DisplayListEmbedderViewSlice::dispatch ( DlOpReceiver receiver)

Definition at line 33 of file embedded_views.cc.

33 {
34 display_list_->Dispatch(receiver);
35}

◆ end_recording()

void flutter::DisplayListEmbedderViewSlice::end_recording ( )
overridevirtual

Implements flutter::EmbedderViewSlice.

Definition at line 19 of file embedded_views.cc.

19 {
20 display_list_ = builder_->Build();
21 FML_DCHECK(display_list_->has_rtree());
22 builder_ = nullptr;
23}
#define FML_DCHECK(condition)
Definition: logging.h:103

◆ getRegion()

const DlRegion & flutter::DisplayListEmbedderViewSlice::getRegion ( ) const
overridevirtual

Implements flutter::EmbedderViewSlice.

Definition at line 25 of file embedded_views.cc.

25 {
26 return display_list_->rtree()->region();
27}

◆ is_empty()

bool flutter::DisplayListEmbedderViewSlice::is_empty ( )

Definition at line 37 of file embedded_views.cc.

37 {
38 return display_list_->bounds().isEmpty();
39}

◆ recording_ended()

bool flutter::DisplayListEmbedderViewSlice::recording_ended ( )

Definition at line 41 of file embedded_views.cc.

41 {
42 return builder_ == nullptr;
43}

◆ render_into()

void flutter::DisplayListEmbedderViewSlice::render_into ( DlCanvas canvas)
overridevirtual

Implements flutter::EmbedderViewSlice.

Definition at line 29 of file embedded_views.cc.

29 {
30 canvas->DrawDisplayList(display_list_);
31}
virtual void DrawDisplayList(const sk_sp< DisplayList > display_list, SkScalar opacity=SK_Scalar1)=0

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