Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
sksg::InvalidationController Class Reference

#include <SkSGInvalidationController.h>

Public Member Functions

 InvalidationController ()
 
 InvalidationController (const InvalidationController &)=delete
 
InvalidationControlleroperator= (const InvalidationController &)=delete
 
void inval (const SkRect &, const SkMatrix &ctm=SkMatrix::I())
 
const SkRectbounds () const
 
auto begin () const
 
auto end () const
 
void reset ()
 

Detailed Description

Receiver for invalidation events.

Tracks dirty regions for repaint.

Definition at line 24 of file SkSGInvalidationController.h.

Constructor & Destructor Documentation

◆ InvalidationController() [1/2]

sksg::InvalidationController::InvalidationController ( )

Definition at line 15 of file SkSGInvalidationController.cpp.

15: fBounds(SkRect::MakeEmpty()) {}
static constexpr SkRect MakeEmpty()
Definition: SkRect.h:595

◆ InvalidationController() [2/2]

sksg::InvalidationController::InvalidationController ( const InvalidationController )
delete

Member Function Documentation

◆ begin()

auto sksg::InvalidationController::begin ( ) const
inline

Definition at line 34 of file SkSGInvalidationController.h.

34{ return fRects.cbegin(); }

◆ bounds()

const SkRect & sksg::InvalidationController::bounds ( ) const
inline

Definition at line 32 of file SkSGInvalidationController.h.

32{ return fBounds; }

◆ end()

auto sksg::InvalidationController::end ( ) const
inline

Definition at line 35 of file SkSGInvalidationController.h.

35{ return fRects.cend(); }

◆ inval()

void sksg::InvalidationController::inval ( const SkRect r,
const SkMatrix ctm = SkMatrix::I() 
)

Definition at line 17 of file SkSGInvalidationController.cpp.

17 {
18 if (r.isEmpty()) {
19 return;
20 }
21
23
24 if (!ctm.isIdentity()) {
25 ctm.mapRect(rect.writable());
26 }
27
28 fRects.push_back(*rect);
29 fBounds.join(*rect);
30}
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
Definition: SkMatrix.cpp:1141
bool isIdentity() const
Definition: SkMatrix.h:223
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
bool isEmpty() const
Definition: SkRect.h:693
void join(const SkRect &r)
Definition: SkRect.cpp:126

◆ operator=()

InvalidationController & sksg::InvalidationController::operator= ( const InvalidationController )
delete

◆ reset()

void sksg::InvalidationController::reset ( )

Definition at line 32 of file SkSGInvalidationController.cpp.

32 {
33 fRects.clear();
34 fBounds.setEmpty();
35}
void setEmpty()
Definition: SkRect.h:842

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