Add "meshCount" to GrProgramInfo
This improves the encapsulation of the GrProgramInfo class.
Bug: skia:9455
Change-Id: Ic241ba4a2c2edea3e774522065371e5ed8cc2da3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247438
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrOpsRenderPass.cpp b/src/gpu/GrOpsRenderPass.cpp
index 548bbb4..1b8ebea 100644
--- a/src/gpu/GrOpsRenderPass.cpp
+++ b/src/gpu/GrOpsRenderPass.cpp
@@ -45,13 +45,9 @@
SkASSERT(!programInfo.primProc().hasInstanceAttributes() ||
this->gpu()->caps()->instanceAttribSupport());
- for (int i = 0; i < meshCount; ++i) {
- SkASSERT(programInfo.primProc().hasVertexAttributes() == meshes[i].hasVertexData());
- SkASSERT(programInfo.primProc().hasInstanceAttributes() == meshes[i].hasInstanceData());
- }
-
- programInfo.checkAllInstantiated(meshCount);
- programInfo.checkMSAAAndMIPSAreResolved(meshCount);
+ programInfo.compatibleWithMeshes(meshes, meshCount);
+ programInfo.checkAllInstantiated();
+ programInfo.checkMSAAAndMIPSAreResolved();
#endif
if (programInfo.primProc().numVertexAttributes() > this->gpu()->caps()->maxVertexAttributes()) {