Lines Matching refs:Mesh
82 struct Mesh {
122 SkSTArray<1, Mesh, true> fMeshes;
151 Mesh& mesh = fMeshes.push_back();
152 mesh.fColor = color;
153 mesh.fViewMatrix = viewMatrix;
154 mesh.fVertices = std::move(vertices);
155 mesh.fIgnoreTexCoords = false;
156 mesh.fIgnoreColors = false;
158 if (mesh.fVertices->hasBones() && bones) {
160 mesh.fVertices = mesh.fVertices->applyBones(bones, boneCount);
166 if (mesh.hasPerVertexColors()) {
169 if (mesh.hasExplicitLocalCoords()) {
175 if (!mesh.fVertices->hasBones() && boneCount == 1) {
178 mesh.fViewMatrix.preConcat(worldTransform);
188 this->setTransformedBounds(mesh.fVertices->bounds(),
189 mesh.fViewMatrix,
415 // Get each mesh.
416 const Mesh& mesh = fMeshes[i];
420 int indexCount = mesh.fVertices->indexCount();
422 *indices++ = mesh.fVertices->indices()[j] + vertexOffset;
427 int vertexCount = mesh.fVertices->vertexCount();
428 const SkPoint* positions = mesh.fVertices->positions();
429 const SkColor* colors = mesh.fVertices->colors();
430 const SkPoint* localCoords = mesh.fVertices->texCoords();
432 mesh.fViewMatrix.getType() <= SkMatrix::kTranslate_Mask) &&
433 mesh.hasPerVertexColors();
444 t = Sk2f(mesh.fViewMatrix.getTranslateX(), mesh.fViewMatrix.getTranslateY());
465 GrColor color = mesh.fColor.toBytes_RGBA();
469 mesh.fViewMatrix.mapPoints(((SkPoint*)verts), &positions[j], 1);
474 if (mesh.hasPerVertexColors()) {
481 if (mesh.hasExplicitLocalCoords()) {
500 GrMesh* mesh = target->allocMesh(this->primitiveType());
502 mesh->setIndexed(std::move(indexBuffer), fIndexCount, firstIndex, 0, fVertexCount - 1,
505 mesh->setNonIndexedNonInstanced(fVertexCount);
507 mesh->setVertexData(std::move(vertexBuffer), firstVertex);
508 target->recordDraw(std::move(gp), mesh);
522 // Non-volatile meshes cannot batch, because if a non-volatile mesh batches with another mesh,
523 // then on the next frame, if that non-volatile mesh is drawn, it will draw the other mesh
549 // If either op required explicit local coords or per-vertex colors the combined mesh does. Same
556 // Check whether we are about to acquire a mesh with a different view matrix.