Flutter Engine
 
Loading...
Searching...
No Matches
flutter::PaintRegion Class Reference

#include <paint_region.h>

Public Member Functions

 PaintRegion ()=default
 
 PaintRegion (std::shared_ptr< std::vector< DlRect > > rects, size_t from, size_t to, bool has_readback, bool has_texture)
 
std::vector< DlRect >::const_iterator begin () const
 
std::vector< DlRect >::const_iterator end () const
 
DlRect ComputeBounds () const
 
bool is_valid () const
 
bool has_readback () const
 
bool has_texture () const
 

Detailed Description

Definition at line 28 of file paint_region.h.

Constructor & Destructor Documentation

◆ PaintRegion() [1/2]

flutter::PaintRegion::PaintRegion ( )
default

◆ PaintRegion() [2/2]

flutter::PaintRegion::PaintRegion ( std::shared_ptr< std::vector< DlRect > >  rects,
size_t  from,
size_t  to,
bool  has_readback,
bool  has_texture 
)
inline

Definition at line 31 of file paint_region.h.

36 : rects_(std::move(rects)),
37 from_(from),
38 to_(to),
39 has_readback_(has_readback),
40 has_texture_(has_texture) {}
bool has_texture() const
bool has_readback() const

Member Function Documentation

◆ begin()

std::vector< DlRect >::const_iterator flutter::PaintRegion::begin ( ) const
inline

Definition at line 42 of file paint_region.h.

42 {
44 return rects_->begin() + from_;
45 }
bool is_valid() const
#define FML_DCHECK(condition)
Definition logging.h:122

References FML_DCHECK, and is_valid().

Referenced by flutter::DiffContext::AddExistingPaintRegion().

◆ ComputeBounds()

DlRect flutter::PaintRegion::ComputeBounds ( ) const

Definition at line 9 of file paint_region.cc.

9 {
10 DlRect res;
11 for (const auto& r : *this) {
12 res = res.Union(r);
13 }
14 return res;
15}
impeller::Rect DlRect
constexpr TRect Union(const TRect &o) const
Definition rect.h:513

References impeller::TRect< T >::Union().

◆ end()

std::vector< DlRect >::const_iterator flutter::PaintRegion::end ( ) const
inline

Definition at line 47 of file paint_region.h.

47 {
49 return rects_->begin() + to_;
50 }

References FML_DCHECK, and is_valid().

Referenced by flutter::DiffContext::AddExistingPaintRegion().

◆ has_readback()

bool flutter::PaintRegion::has_readback ( ) const
inline

Definition at line 59 of file paint_region.h.

59{ return has_readback_; }

◆ has_texture()

bool flutter::PaintRegion::has_texture ( ) const
inline

Definition at line 63 of file paint_region.h.

63{ return has_texture_; }

◆ is_valid()

bool flutter::PaintRegion::is_valid ( ) const
inline

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