Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
skgpu::graphite::BruteForceBoundsManager Class Reference

#include <BoundsManager.h>

Inheritance diagram for skgpu::graphite::BruteForceBoundsManager:
skgpu::graphite::BoundsManager

Public Member Functions

 ~BruteForceBoundsManager () override
 
CompressedPaintersOrder getMostRecentDraw (const Rect &bounds) const override
 
void recordDraw (const Rect &bounds, CompressedPaintersOrder order) override
 
void reset () override
 
int count () const
 
void replayDraws (BoundsManager *manager) const
 
- Public Member Functions inherited from skgpu::graphite::BoundsManager
virtual ~BoundsManager ()
 
virtual CompressedPaintersOrder getMostRecentDraw (const Rect &bounds) const =0
 
virtual void recordDraw (const Rect &bounds, CompressedPaintersOrder order)=0
 
virtual void reset ()=0
 

Detailed Description

Definition at line 74 of file BoundsManager.h.

Constructor & Destructor Documentation

◆ ~BruteForceBoundsManager()

skgpu::graphite::BruteForceBoundsManager::~BruteForceBoundsManager ( )
inlineoverride

Definition at line 76 of file BoundsManager.h.

76{}

Member Function Documentation

◆ count()

int skgpu::graphite::BruteForceBoundsManager::count ( ) const
inline

Definition at line 103 of file BoundsManager.h.

103{ return fRects.count(); }

◆ getMostRecentDraw()

CompressedPaintersOrder skgpu::graphite::BruteForceBoundsManager::getMostRecentDraw ( const Rect bounds) const
inlineoverridevirtual

Implements skgpu::graphite::BoundsManager.

Definition at line 78 of file BoundsManager.h.

78 {
79 SkASSERT(fRects.count() == fOrders.count());
80
81 Rect::ComplementRect boundsComplement(bounds);
83 auto orderIter = fOrders.items().begin();
84 for (const Rect& r : fRects.items()) {
85 if (r.intersects(boundsComplement) && max < *orderIter) {
86 max = *orderIter;
87 }
88 ++orderIter;
89 }
90 return max;
91 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
static float max(float r, float g, float b)
Definition: hsl.cpp:49
Optional< SkRect > bounds
Definition: SkRecords.h:189
TRect< Scalar > Rect
Definition: rect.h:769
MonotonicValue< CompressedPaintersOrderSequence > CompressedPaintersOrder
Definition: DrawOrder.h:58

◆ recordDraw()

void skgpu::graphite::BruteForceBoundsManager::recordDraw ( const Rect bounds,
CompressedPaintersOrder  order 
)
inlineoverridevirtual

Implements skgpu::graphite::BoundsManager.

Definition at line 93 of file BoundsManager.h.

93 {
94 fRects.push_back(bounds);
95 fOrders.push_back(order);
96 }

◆ replayDraws()

void skgpu::graphite::BruteForceBoundsManager::replayDraws ( BoundsManager manager) const
inline

Definition at line 105 of file BoundsManager.h.

105 {
106 auto orderIter = fOrders.items().begin();
107 for (const Rect& r : fRects.items()) {
108 manager->recordDraw(r, *orderIter);
109 ++orderIter;
110 }
111 }
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font manager
Definition: switches.h:218

◆ reset()

void skgpu::graphite::BruteForceBoundsManager::reset ( )
inlineoverridevirtual

Implements skgpu::graphite::BoundsManager.

Definition at line 98 of file BoundsManager.h.

98 {
99 fRects.reset();
100 fOrders.reset();
101 }

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