Provides canvas-like painting methods that actually build vertices. More...
#include <stopwatch_dl.h>
Public Member Functions | |
| DlVertexPainter (std::vector< DlPoint > &vertices_storage, std::vector< DlColor > &color_storage) | |
| void | DrawRect (const DlRect &rect, const DlColor &color) |
| Draws a rectangle with the given color to a buffer. | |
| std::shared_ptr< DlVertices > | IntoVertices (const DlRect &bounds_rect) |
Provides canvas-like painting methods that actually build vertices.
The goal is minimally invasive rendering for the performance monitor.
The methods in this class are intended to be used by |DlStopwatchVisualizer| only. The rationale is the creating lines, rectangles, and paths (while OK for general apps) would cause non-trivial work for the performance monitor due to tessellation per-frame.
Definition at line 47 of file stopwatch_dl.h.
| flutter::DlVertexPainter::DlVertexPainter | ( | std::vector< DlPoint > & | vertices_storage, |
| std::vector< DlColor > & | color_storage | ||
| ) |
Definition at line 123 of file stopwatch_dl.cc.
Draws a rectangle with the given color to a buffer.
Definition at line 127 of file stopwatch_dl.cc.
References FML_DCHECK, impeller::TRect< T >::GetBottom(), impeller::TRect< T >::GetLeft(), impeller::TRect< T >::GetRight(), impeller::TRect< T >::GetTop(), and i.
Referenced by flutter::DlStopwatchVisualizer::Visualize().
| std::shared_ptr< DlVertices > flutter::DlVertexPainter::IntoVertices | ( | const DlRect & | bounds_rect | ) |
Converts the buffered vertices into a |DlVertices| object.
Definition at line 148 of file stopwatch_dl.cc.
References flutter::kTriangles, and flutter::DlVertices::Make().
Referenced by flutter::DlStopwatchVisualizer::Visualize().