Fix incorrect vertices colors length check (flutter/engine#8247)

A DCHECK was checking incorrect values, and this corrects it.
This commit is contained in:
Justin McCandless
2019-03-22 06:57:29 -07:00
committed by GitHub
parent bc628fa30f
commit f55eee2dd9

View File

@@ -73,7 +73,7 @@ void Vertices::init(SkVertices::VertexMode vertex_mode,
}
if (colors.data()) {
// SkVertices::Builder assumes equal numbers of elements
FML_DCHECK(positions.num_elements() == colors.num_elements());
FML_DCHECK(positions.num_elements() / 2 == colors.num_elements());
DecodeInts<SkColor>(colors, builder.colors());
}