Store the correct number of samples in GrProgramInfo
Bug: skia:11396
Change-Id: I9480b89635bd7a6bdff8ab4876c8eeafdbc27c8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442096
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ops/AAHairLinePathRenderer.cpp b/src/gpu/ops/AAHairLinePathRenderer.cpp
index a008e87..59794d8 100644
--- a/src/gpu/ops/AAHairLinePathRenderer.cpp
+++ b/src/gpu/ops/AAHairLinePathRenderer.cpp
@@ -828,18 +828,21 @@
private:
void makeLineProgramInfo(const GrCaps&, SkArenaAlloc*, const GrPipeline*,
const GrSurfaceProxyView& writeView,
+ bool usesMSAASurface,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers,
GrLoadOp colorLoadOp);
void makeQuadProgramInfo(const GrCaps&, SkArenaAlloc*, const GrPipeline*,
const GrSurfaceProxyView& writeView,
+ bool usesMSAASurface,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers,
GrLoadOp colorLoadOp);
void makeConicProgramInfo(const GrCaps&, SkArenaAlloc*, const GrPipeline*,
const GrSurfaceProxyView& writeView,
+ bool usesMSAASurface,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers,
@@ -946,6 +949,7 @@
void AAHairlineOp::makeLineProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
const GrPipeline* pipeline,
const GrSurfaceProxyView& writeView,
+ bool usesMSAASurface,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers,
@@ -972,13 +976,14 @@
}
fProgramInfos[0] = GrSimpleMeshDrawOpHelper::CreateProgramInfo(
- arena, pipeline, writeView, lineGP, GrPrimitiveType::kTriangles,
+ &caps, arena, pipeline, writeView, usesMSAASurface, lineGP, GrPrimitiveType::kTriangles,
renderPassXferBarriers, colorLoadOp, fHelper.stencilSettings());
}
void AAHairlineOp::makeQuadProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
const GrPipeline* pipeline,
const GrSurfaceProxyView& writeView,
+ bool usesMSAASurface,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers,
@@ -997,13 +1002,14 @@
SkASSERT(sizeof(BezierVertex) == quadGP->vertexStride());
fProgramInfos[1] = GrSimpleMeshDrawOpHelper::CreateProgramInfo(
- arena, pipeline, writeView, quadGP, GrPrimitiveType::kTriangles,
+ &caps, arena, pipeline, writeView, usesMSAASurface, quadGP, GrPrimitiveType::kTriangles,
renderPassXferBarriers, colorLoadOp, fHelper.stencilSettings());
}
void AAHairlineOp::makeConicProgramInfo(const GrCaps& caps, SkArenaAlloc* arena,
const GrPipeline* pipeline,
const GrSurfaceProxyView& writeView,
+ bool usesMSAASurface,
const SkMatrix* geometryProcessorViewM,
const SkMatrix* geometryProcessorLocalM,
GrXferBarrierFlags renderPassXferBarriers,
@@ -1022,8 +1028,9 @@
SkASSERT(sizeof(BezierVertex) == conicGP->vertexStride());
fProgramInfos[2] = GrSimpleMeshDrawOpHelper::CreateProgramInfo(
- arena, pipeline, writeView, conicGP, GrPrimitiveType::kTriangles,
- renderPassXferBarriers, colorLoadOp, fHelper.stencilSettings());
+ &caps, arena, pipeline, writeView, usesMSAASurface, conicGP,
+ GrPrimitiveType::kTriangles, renderPassXferBarriers, colorLoadOp,
+ fHelper.stencilSettings());
}
AAHairlineOp::Program AAHairlineOp::predictPrograms(const GrCaps* caps) const {
@@ -1079,17 +1086,17 @@
std::move(appliedClip), dstProxyView);
if (fCharacterization & Program::kLine) {
- this->makeLineProgramInfo(*caps, arena, pipeline, writeView,
+ this->makeLineProgramInfo(*caps, arena, pipeline, writeView, usesMSAASurface,
geometryProcessorViewM, geometryProcessorLocalM,
renderPassXferBarriers, colorLoadOp);
}
if (fCharacterization & Program::kQuad) {
- this->makeQuadProgramInfo(*caps, arena, pipeline, writeView,
+ this->makeQuadProgramInfo(*caps, arena, pipeline, writeView, usesMSAASurface,
geometryProcessorViewM, geometryProcessorLocalM,
renderPassXferBarriers, colorLoadOp);
}
if (fCharacterization & Program::kConic) {
- this->makeConicProgramInfo(*caps, arena, pipeline, writeView,
+ this->makeConicProgramInfo(*caps, arena, pipeline, writeView, usesMSAASurface,
geometryProcessorViewM, geometryProcessorLocalM,
renderPassXferBarriers, colorLoadOp);