Abstract class for visualizing (i.e. drawing) a stopwatch. More...
#include <stopwatch.h>
Public Member Functions | |
| StopwatchVisualizer (const Stopwatch &stopwatch) | |
| virtual | ~StopwatchVisualizer ()=default |
| virtual void | Visualize (DlCanvas *canvas, const DlRect &rect) const =0 |
| Renders the stopwatch as a graph. | |
| FML_DISALLOW_COPY_AND_ASSIGN (StopwatchVisualizer) | |
Protected Member Functions | |
| double | UnitFrameInterval (double time_ms) const |
| Converts a raster time to a unit interval. | |
| double | UnitHeight (double time_ms, double max_height) const |
| Converts a raster time to a unit height. | |
| fml::Milliseconds | GetFrameBudget () const |
Protected Attributes | |
| const Stopwatch & | stopwatch_ |
| fml::Milliseconds | frame_budget_ |
Abstract class for visualizing (i.e. drawing) a stopwatch.
Definition at line 96 of file stopwatch.h.
|
inlineexplicit |
Definition at line 98 of file stopwatch.h.
References frame_budget_, flutter::Stopwatch::GetFrameBudget(), and stopwatch_.
|
virtualdefault |
| flutter::StopwatchVisualizer::FML_DISALLOW_COPY_AND_ASSIGN | ( | StopwatchVisualizer | ) |
|
inlineprotected |
Definition at line 123 of file stopwatch.h.
References frame_budget_.
Referenced by flutter::DlStopwatchVisualizer::Visualize().
|
protected |
Converts a raster time to a unit interval.
Definition at line 54 of file stopwatch.cc.
References frame_budget_.
Referenced by UnitHeight(), and flutter::DlStopwatchVisualizer::Visualize().
|
protected |
Converts a raster time to a unit height.
Definition at line 58 of file stopwatch.cc.
References UnitFrameInterval().
Referenced by flutter::DlStopwatchVisualizer::Visualize().
|
pure virtual |
Renders the stopwatch as a graph.
| canvas | The canvas to draw on. | |
| [in] | rect | The rectangle to draw in. |
Implemented in flutter::DlStopwatchVisualizer.
|
protected |
Definition at line 126 of file stopwatch.h.
Referenced by GetFrameBudget(), StopwatchVisualizer(), and UnitFrameInterval().
|
protected |
Definition at line 125 of file stopwatch.h.
Referenced by StopwatchVisualizer(), and flutter::DlStopwatchVisualizer::Visualize().