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/GrOpFlushState.cpp b/src/gpu/GrOpFlushState.cpp
index 8e10019..93a6026 100644
--- a/src/gpu/GrOpFlushState.cpp
+++ b/src/gpu/GrOpFlushState.cpp
@@ -13,6 +13,7 @@
#include "src/gpu/GrDrawOpAtlas.h"
#include "src/gpu/GrGpu.h"
#include "src/gpu/GrImageInfo.h"
+#include "src/gpu/GrProgramInfo.h"
#include "src/gpu/GrResourceProvider.h"
//////////////////////////////////////////////////////////////////////////////
@@ -52,10 +53,16 @@
this->opsRenderPass()->inlineUpload(this, fCurrUpload->fUpload);
++fCurrUpload;
}
- this->opsRenderPass()->draw(
- *fCurrDraw->fGeometryProcessor, *pipeline, fCurrDraw->fFixedDynamicState,
- fCurrDraw->fDynamicStateArrays, fCurrDraw->fMeshes, fCurrDraw->fMeshCnt,
- chainBounds);
+
+ GrProgramInfo programInfo(this->proxy()->numSamples(),
+ this->proxy()->origin(),
+ *pipeline,
+ *fCurrDraw->fGeometryProcessor,
+ fCurrDraw->fFixedDynamicState,
+ fCurrDraw->fDynamicStateArrays);
+
+ this->opsRenderPass()->draw(programInfo, fCurrDraw->fMeshes,
+ fCurrDraw->fMeshCnt, chainBounds);
fTokenTracker->flushToken();
++fCurrDraw;
}