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

#include <dl_complexity.h>

Inheritance diagram for flutter::DisplayListNaiveComplexityCalculator:
flutter::DisplayListComplexityCalculator

Public Member Functions

unsigned int Compute (const DisplayList *display_list) override
 
bool ShouldBeCached (unsigned int complexity_score) override
 
void SetComplexityCeiling (unsigned int ceiling) override
 
- Public Member Functions inherited from flutter::DisplayListComplexityCalculator
virtual ~DisplayListComplexityCalculator ()=default
 
virtual unsigned int Compute (const DisplayList *display_list)=0
 
virtual bool ShouldBeCached (unsigned int complexity_score)=0
 
virtual void SetComplexityCeiling (unsigned int ceiling)=0
 

Static Public Member Functions

static DisplayListComplexityCalculatorGetInstance ()
 
- Static Public Member Functions inherited from flutter::DisplayListComplexityCalculator
static DisplayListComplexityCalculatorGetForSoftware ()
 
static DisplayListComplexityCalculatorGetForBackend (GrBackendApi backend)
 

Detailed Description

Definition at line 36 of file dl_complexity.h.

Member Function Documentation

◆ Compute()

unsigned int flutter::DisplayListNaiveComplexityCalculator::Compute ( const DisplayList display_list)
inlineoverridevirtual

Implements flutter::DisplayListComplexityCalculator.

Definition at line 41 of file dl_complexity.h.

41 {
42 return display_list->op_count(true);
43 }

◆ GetInstance()

DisplayListComplexityCalculator * flutter::DisplayListNaiveComplexityCalculator::GetInstance ( )
static

Definition at line 18 of file dl_complexity.cc.

18 {
19 if (instance_ == nullptr) {
20 instance_ = new DisplayListNaiveComplexityCalculator();
21 }
22 return instance_;
23}

◆ SetComplexityCeiling()

void flutter::DisplayListNaiveComplexityCalculator::SetComplexityCeiling ( unsigned int  ceiling)
inlineoverridevirtual

Implements flutter::DisplayListComplexityCalculator.

Definition at line 49 of file dl_complexity.h.

49{}

◆ ShouldBeCached()

bool flutter::DisplayListNaiveComplexityCalculator::ShouldBeCached ( unsigned int  complexity_score)
inlineoverridevirtual

Implements flutter::DisplayListComplexityCalculator.

Definition at line 45 of file dl_complexity.h.

45 {
46 return complexity_score > 5u;
47 }

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