aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr/GrCCPathProcessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/ccpr/GrCCPathProcessor.cpp')
-rw-r--r--src/gpu/ccpr/GrCCPathProcessor.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gpu/ccpr/GrCCPathProcessor.cpp b/src/gpu/ccpr/GrCCPathProcessor.cpp
index bbc2b811c5..5edc45ff69 100644
--- a/src/gpu/ccpr/GrCCPathProcessor.cpp
+++ b/src/gpu/ccpr/GrCCPathProcessor.cpp
@@ -100,10 +100,6 @@ GrCCPathProcessor::GrCCPathProcessor(GrResourceProvider* resourceProvider,
this->addVertexAttrib("edge_norms", kFloat4_GrVertexAttribType);
- if (resourceProvider->caps()->usePrimitiveRestart()) {
- this->setWillUsePrimitiveRestart();
- }
-
fAtlasAccess.instantiate(resourceProvider);
this->addTextureSampler(&fAtlasAccess);
@@ -146,8 +142,10 @@ void GrCCPathProcessor::drawPaths(GrOpFlushState* flushState, const GrPipeline&
? SK_ARRAY_COUNT(kOctoIndicesAsStrips)
: SK_ARRAY_COUNT(kOctoIndicesAsTris);
GrMesh mesh(primitiveType);
+ auto enablePrimitiveRestart = GrPrimitiveRestart(flushState->caps().usePrimitiveRestart());
+
mesh.setIndexedInstanced(indexBuffer, numIndicesPerInstance, instanceBuffer,
- endInstance - baseInstance, baseInstance);
+ endInstance - baseInstance, baseInstance, enablePrimitiveRestart);
mesh.setVertexData(vertexBuffer);
flushState->rtCommandBuffer()->draw(pipeline, *this, &mesh, nullptr, 1, bounds);