Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: src/gpu/batches/GrDrawPathBatch.cpp

Issue 1806983002: Update how we send draws to gpu backend to reduce state setting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrDrawAtlasBatch.cpp ('k') | src/gpu/batches/GrDrawVerticesBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawPathBatch.cpp
diff --git a/src/gpu/batches/GrDrawPathBatch.cpp b/src/gpu/batches/GrDrawPathBatch.cpp
index a99f4ebf4386c963a0ba18a48b01ab2c269cc837..f0c0dd29041c6509a4d6b8575aa29df084c98356 100644
--- a/src/gpu/batches/GrDrawPathBatch.cpp
+++ b/src/gpu/batches/GrDrawPathBatch.cpp
@@ -23,10 +23,8 @@ void GrDrawPathBatch::onDraw(GrBatchFlushState* state) {
SkAutoTUnref<GrPathProcessor> pathProc(GrPathProcessor::Create(this->color(),
this->overrides(),
this->viewMatrix()));
- state->gpu()->buildProgramDesc(&desc, *pathProc, *this->pipeline());
- GrPathRendering::DrawPathArgs args(pathProc, this->pipeline(),
- &desc, &this->stencilSettings());
- state->gpu()->pathRendering()->drawPath(args, fPath.get());
+ state->gpu()->pathRendering()->drawPath(*this->pipeline(), *pathProc, this->stencilSettings(),
+ fPath.get());
}
SkString GrDrawPathRangeBatch::dumpInfo() const {
@@ -123,14 +121,13 @@ void GrDrawPathRangeBatch::onDraw(GrBatchFlushState* state) {
drawMatrix,
localMatrix));
- GrProgramDesc desc;
- state->gpu()->buildProgramDesc(&desc, *pathProc, *this->pipeline());
- GrPathRendering::DrawPathArgs args(pathProc, this->pipeline(),
- &desc, &this->stencilSettings());
-
if (fDraws.count() == 1) {
const InstanceData& instances = *head.fInstanceData;
- state->gpu()->pathRendering()->drawPaths(args, fPathRange.get(), instances.indices(),
+ state->gpu()->pathRendering()->drawPaths(*this->pipeline(),
+ *pathProc,
+ this->stencilSettings(),
+ fPathRange.get(),
+ instances.indices(),
GrPathRange::kU16_PathIndexType,
instances.transformValues(),
instances.transformType(),
@@ -155,9 +152,15 @@ void GrDrawPathRangeBatch::onDraw(GrBatchFlushState* state) {
}
SkASSERT(idx == fTotalPathCount);
- state->gpu()->pathRendering()->drawPaths(args, fPathRange.get(), indexStorage,
- GrPathRange::kU16_PathIndexType, transformStorage,
- this->transformType(), fTotalPathCount);
+ state->gpu()->pathRendering()->drawPaths(*this->pipeline(),
+ *pathProc,
+ this->stencilSettings(),
+ fPathRange.get(),
+ indexStorage,
+ GrPathRange::kU16_PathIndexType,
+ transformStorage,
+ this->transformType(),
+ fTotalPathCount);
}
}
« no previous file with comments | « src/gpu/batches/GrDrawAtlasBatch.cpp ('k') | src/gpu/batches/GrDrawVerticesBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698