Convert GrMesh to a struct
Converts GrMesh to a struct and changes the names/semantics of its
fields to be more inline with their GL counterparts. Also renames the
"instancing" feature to "pattern", to avoid ambiguity with hardware
instancing.
Bug: skia:
Change-Id: Ia0999d4f9c83b5dd31f81b9bf4f36ed9abd26286
Reviewed-on: https://skia-review.googlesource.com/15157
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ops/GrAAFillRectOp.cpp b/src/gpu/ops/GrAAFillRectOp.cpp
index 7bf62ec..ca91e94 100644
--- a/src/gpu/ops/GrAAFillRectOp.cpp
+++ b/src/gpu/ops/GrAAFillRectOp.cpp
@@ -41,7 +41,7 @@
// clang-format on
GR_STATIC_ASSERT(SK_ARRAY_COUNT(gFillAARectIdx) == kIndicesPerAAFillRect);
- return resourceProvider->findOrCreateInstancedIndexBuffer(
+ return resourceProvider->findOrCreatePatternedIndexBuffer(
gFillAARectIdx, kIndicesPerAAFillRect, kNumAAFillRectsInIndexBuffer,
kVertsPerAAFillRect, gAAFillRectIndexBufferKey);
}
@@ -231,7 +231,7 @@
size_t vertexStride = gp->getVertexStride();
sk_sp<const GrBuffer> indexBuffer(get_index_buffer(target->resourceProvider()));
- InstancedHelper helper;
+ PatternHelper helper;
void* vertices =
helper.init(target, kTriangles_GrPrimitiveType, vertexStride, indexBuffer.get(),
kVertsPerAAFillRect, kIndicesPerAAFillRect, fRectCnt);