Add GrProgramInfo to centralize management of program information
This is the first step in moving the marshaling of program information earlier in renderTask processing (i.e., to onPrePrepare).
Change-Id: I91e3baed9a128e845bd32f9dbbacd9b21d852a3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244118
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/GrFillRRectOp.cpp b/src/gpu/ops/GrFillRRectOp.cpp
index bbed9f2..c3f86a3 100644
--- a/src/gpu/ops/GrFillRRectOp.cpp
+++ b/src/gpu/ops/GrFillRRectOp.cpp
@@ -13,6 +13,7 @@
#include "src/gpu/GrMemoryPool.h"
#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrOpsRenderPass.h"
+#include "src/gpu/GrProgramInfo.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
#include "src/gpu/glsl/GrGLSLGeometryProcessor.h"
@@ -750,13 +751,19 @@
std::move(fProcessors),
std::move(clip));
+ GrProgramInfo programInfo(flushState->drawOpArgs().numSamples(),
+ flushState->drawOpArgs().origin(),
+ *pipeline,
+ *proc,
+ fixedDynamicState,
+ nullptr);
+
GrMesh* mesh = flushState->allocator()->make<GrMesh>(GrPrimitiveType::kTriangles);
mesh->setIndexedInstanced(
std::move(fIndexBuffer), fIndexCount, std::move(fInstanceBuffer), fInstanceCount,
fBaseInstance, GrPrimitiveRestart::kNo);
mesh->setVertexData(std::move(fVertexBuffer));
- flushState->opsRenderPass()->draw(
- *proc, *pipeline, fixedDynamicState, nullptr, mesh, 1, this->bounds());
+ flushState->opsRenderPass()->draw(programInfo, mesh, 1, this->bounds());
fIndexCount = 0;
}