Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
flutter::PaintRegion Class Reference

#include <paint_region.h>

Public Member Functions

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

Detailed Description

Definition at line 26 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< SkRect > >  rects,
size_t  from,
size_t  to,
bool  has_readback,
bool  has_texture 
)
inline

Definition at line 29 of file paint_region.h.

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

Member Function Documentation

◆ begin()

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

Definition at line 40 of file paint_region.h.

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

◆ ComputeBounds()

SkRect flutter::PaintRegion::ComputeBounds ( ) const

Definition at line 9 of file paint_region.cc.

9 {
11 for (const auto& r : *this) {
12 res.join(r);
13 }
14 return res;
15}
static constexpr SkRect MakeEmpty()
Definition SkRect.h:595
void join(const SkRect &r)
Definition SkRect.cpp:126

◆ end()

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

Definition at line 45 of file paint_region.h.

45 {
47 return rects_->begin() + to_;
48 }

◆ has_readback()

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

Definition at line 57 of file paint_region.h.

57{ return has_readback_; }

◆ has_texture()

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

Definition at line 61 of file paint_region.h.

61{ return has_texture_; }

◆ is_valid()

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

Definition at line 53 of file paint_region.h.

53{ return rects_ != nullptr; }

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