This was due to wrong indexing into `num_triangles_per_stroke` and `num_vertices_per_stroke`. We were using the the index of the stroke in the drawing instead of the index into the `visible_strokes` mask.
This was due to wrong indexing into `num_triangles_per_stroke` and `num_vertices_per_stroke`. We were using the the index of the stroke in the drawing instead of the index into the `visible_strokes` mask.