Holds all of the data (both required and optional) for a DisplayList drawVertices call. More...
#include <dl_vertices.h>
Classes | |
| class | Builder |
| A utility class to build up a |DlVertices| object one set of data at a time. More... | |
Public Member Functions | |
| size_t | size () const |
| Returns the size of the object including all of the inlined data. | |
| DlRect | GetBounds () const |
| Returns the bounds of the vertices. | |
| DlVertexMode | mode () const |
| int | vertex_count () const |
| const DlPoint * | vertex_data () const |
| Returns a pointer to the vertex information. Should be non-null. | |
| const DlPoint * | texture_coordinate_data () const |
| const DlColor * | colors () const |
| int | index_count () const |
| const uint16_t * | indices () const |
| bool | operator== (DlVertices const &other) const |
Static Public Member Functions | |
| static std::shared_ptr< DlVertices > | Make (DlVertexMode mode, int vertex_count, const DlPoint vertices[], const DlPoint texture_coordinates[], const DlColor colors[], int index_count=0, const uint16_t indices[]=nullptr, const DlRect *bounds=nullptr) |
| Constructs a DlVector with compact inline storage for all of its required and optional lists of data. | |
Friends | |
| class | DisplayListBuilder |
Holds all of the data (both required and optional) for a DisplayList drawVertices call.
There are 4 main pices of data:
Note that each vertex is mapped to exactly 1 texture_coordinate and color even if the DlVertexMode or indices specify that it contributes to more than one output triangle.
Definition at line 69 of file dl_vertices.h.
|
inline |
Returns a pointer to the vertex colors or null if none were provided.
Definition at line 218 of file dl_vertices.h.
Referenced by Make(), operator==(), flutter::DlVertices::Builder::store_colors(), and flutter::DlVertices::Builder::store_colors().
|
inline |
Returns the bounds of the vertices.
Definition at line 195 of file dl_vertices.h.
|
inline |
Returns a pointer to the count of vertex indices or 0 if none were provided.
Definition at line 224 of file dl_vertices.h.
Referenced by flutter::DlVertices::Builder::Builder(), and Make().
|
inline |
Returns a pointer to the vertex indices or null if none were provided.
Definition at line 228 of file dl_vertices.h.
Referenced by Make(), operator==(), and flutter::DlVertices::Builder::store_indices().
|
static |
Constructs a DlVector with compact inline storage for all of its required and optional lists of data.
Vertices are always required. Optional texture coordinates and optional colors are stored if the arguments are non-null. Optional indices will be stored iff the array argument is non-null and the index_count is positive (>0).
Definition at line 39 of file dl_vertices.cc.
References flutter::DlVertices::Builder::build(), colors(), FML_DCHECK, index_count(), indices(), flutter::DlVertices::Builder::kHasColors, flutter::DlVertices::Builder::kHasTextureCoordinates, mode(), flutter::DlVertices::Builder::store_bounds(), flutter::DlVertices::Builder::store_colors(), flutter::DlVertices::Builder::store_indices(), flutter::DlVertices::Builder::store_texture_coordinates(), flutter::DlVertices::Builder::store_vertices(), and vertex_count().
Referenced by flutter::testing::GetTestVertices(), flutter::DlVertexPainter::IntoVertices(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
|
inline |
Returns the vertex mode that defines how the vertices (or the indices) are turned into triangles.
Definition at line 199 of file dl_vertices.h.
Referenced by flutter::DlVertices::Builder::Builder(), and Make().
| bool flutter::DlVertices::operator== | ( | DlVertices const & | other | ) | const |
Definition at line 183 of file dl_vertices.cc.
References colors(), i, indices(), texture_coordinate_data(), and vertex_data().
| size_t flutter::DlVertices::size | ( | ) | const |
Returns the size of the object including all of the inlined data.
Definition at line 86 of file dl_vertices.cc.
References flutter::bytes_needed().
|
inline |
Returns a pointer to the vertex texture coordinate or null if none were provided.
Definition at line 212 of file dl_vertices.h.
Referenced by operator==().
|
inline |
Returns the number of vertices, which also applies to the number of texture coordinate and colors if they are provided.
Definition at line 203 of file dl_vertices.h.
Referenced by flutter::DlVertices::Builder::Builder(), and Make().
|
inline |
Returns a pointer to the vertex information. Should be non-null.
Definition at line 206 of file dl_vertices.h.
Referenced by operator==().
|
friend |
Definition at line 281 of file dl_vertices.h.