#include <stopwatch_dl.h>
Public Member Functions | |
| DlStopwatchVisualizer (const Stopwatch &stopwatch, std::vector< DlPoint > &vertices_storage, std::vector< DlColor > &color_storage) | |
| void | Visualize (DlCanvas *canvas, const DlRect &rect) const override |
| Renders the stopwatch as a graph. | |
Public Member Functions inherited from flutter::StopwatchVisualizer | |
| StopwatchVisualizer (const Stopwatch &stopwatch) | |
| virtual | ~StopwatchVisualizer ()=default |
| FML_DISALLOW_COPY_AND_ASSIGN (StopwatchVisualizer) | |
Additional Inherited Members | |
Protected Member Functions inherited from flutter::StopwatchVisualizer | |
| 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 inherited from flutter::StopwatchVisualizer | |
| const Stopwatch & | stopwatch_ |
| fml::Milliseconds | frame_budget_ |
A stopwatch visualizer that uses DisplayList (|DlCanvas|) to draw.
Definition at line 19 of file stopwatch_dl.h.
|
inlineexplicit |
Definition at line 21 of file stopwatch_dl.h.
|
overridevirtual |
Renders the stopwatch as a graph.
| canvas | The canvas to draw on. | |
| [in] | rect | The rectangle to draw in. |
Implements flutter::StopwatchVisualizer.
Definition at line 21 of file stopwatch_dl.cc.
References flutter::DlVertexPainter::DrawRect(), flutter::DlCanvas::DrawVertices(), impeller::TRect< T >::GetBottom(), flutter::Stopwatch::GetCurrentSample(), flutter::StopwatchVisualizer::GetFrameBudget(), impeller::TRect< T >::GetHeight(), flutter::Stopwatch::GetLap(), flutter::Stopwatch::GetLapsCount(), impeller::TRect< T >::GetWidth(), impeller::TRect< T >::GetX(), impeller::TRect< T >::GetY(), height, i, flutter::DlVertexPainter::IntoVertices(), flutter::DlColor::kGreen(), flutter::kMaxFrameMarkers, flutter::kMaxSamples, flutter::DlColor::kRed(), flutter::Stopwatch::LastLap(), impeller::TRect< Scalar >::MakeLTRB(), flutter::DlPaint::setBlendMode(), flutter::StopwatchVisualizer::stopwatch_, fml::TimeDelta::ToMillisecondsF(), flutter::StopwatchVisualizer::UnitFrameInterval(), flutter::StopwatchVisualizer::UnitHeight(), width, x, and y.