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

Public Member Functions

 Tally ()
 
template<typename T >
void operator() (const T &)
 
template<typename T >
int count () const
 
void apply (const SkRecord &record)
 

Detailed Description

Definition at line 30 of file RecorderTest.cpp.

Constructor & Destructor Documentation

◆ Tally()

Tally::Tally ( )
inline

Definition at line 32 of file RecorderTest.cpp.

32{ sk_bzero(&fHistogram, sizeof(fHistogram)); }
static void sk_bzero(void *buffer, size_t size)
Definition SkMalloc.h:105

Member Function Documentation

◆ apply()

void Tally::apply ( const SkRecord record)
inline

Definition at line 40 of file RecorderTest.cpp.

40 {
41 for (int i = 0; i < record.count(); i++) {
42 record.visit(i, *this);
43 }
44 }
auto visit(int i, F &&f) const -> decltype(f(SkRecords::NoOp()))
Definition SkRecord.h:45
int count() const
Definition SkRecord.h:38

◆ count()

template<typename T >
int Tally::count ( ) const
inline

Definition at line 38 of file RecorderTest.cpp.

38{ return fHistogram[T::kType]; }

◆ operator()()

template<typename T >
void Tally::operator() ( const T )
inline

Definition at line 35 of file RecorderTest.cpp.

35{ ++fHistogram[T::kType]; }

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