diff options
author | 2016-03-17 11:35:45 -0700 | |
---|---|---|
committer | 2016-03-17 11:35:45 -0700 | |
commit | 0e1853c89615d14d0d03c87c7e0c604e5285cc54 (patch) | |
tree | e0ffc4b77a62d396b548f6e45fc8b335d3e6ecc1 /src/gpu/batches/GrAAStrokeRectBatch.cpp | |
parent | 852f15da7ceb53cfb49b9f728baa6dbc53b27694 (diff) |
Update how we send draws to gpu backend to reduce state setting.
The main change here is that we pull primitive type off of the vertices, we set the gpu state on gpu once per pipeline/prim proc draw batch, and we create the ProgramDescriptor only for the Cache/ProgramBuilder.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1806983002
Review URL: https://codereview.chromium.org/1806983002
Diffstat (limited to 'src/gpu/batches/GrAAStrokeRectBatch.cpp')
-rw-r--r-- | src/gpu/batches/GrAAStrokeRectBatch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/batches/GrAAStrokeRectBatch.cpp b/src/gpu/batches/GrAAStrokeRectBatch.cpp index 8cb1c2441c..54bc495a4d 100644 --- a/src/gpu/batches/GrAAStrokeRectBatch.cpp +++ b/src/gpu/batches/GrAAStrokeRectBatch.cpp @@ -193,7 +193,7 @@ void AAStrokeRectBatch::onPrepareDraws(Target* target) const { return; } - target->initDraw(gp, this->pipeline()); + target->initDraw(gp); size_t vertexStride = gp->getVertexStride(); @@ -210,7 +210,7 @@ void AAStrokeRectBatch::onPrepareDraws(Target* target) const { GetIndexBuffer(target->resourceProvider(), this->miterStroke())); InstancedHelper helper; void* vertices = helper.init(target, kTriangles_GrPrimitiveType, vertexStride, - indexBuffer, verticesPerInstance, indicesPerInstance, + indexBuffer, verticesPerInstance, indicesPerInstance, instanceCount); if (!vertices || !indexBuffer) { SkDebugf("Could not allocate vertices\n"); |