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

Unified Diff: src/gpu/GrAAHairLinePathRenderer.cpp

Issue 1132323003: Revert of Preliminary attempt to remove batch tracker (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup5
Patch Set: Created 5 years, 7 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/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAHairLinePathRenderer.cpp
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index 6dcf063974654b9b73cc27fe5bf110c6a76ccf0e..dc035fc77266763354497d6dd632cbdbd4f910b7 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -774,7 +774,6 @@
uint8_t coverage() const { return fBatch.fCoverage; }
bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; }
const SkMatrix& viewMatrix() const { return fGeoData[0].fViewMatrix; }
- bool coverageIgnored() const { return fBatch.fCoverageIgnored; }
struct BatchTracker {
GrColor fColor;
@@ -816,8 +815,6 @@
SkAutoTUnref<const GrGeometryProcessor> lineGP(
GrDefaultGeoProcFactory::Create(gpFlags,
this->color(),
- this->usesLocalCoords(),
- this->coverageIgnored(),
*geometryProcessorViewM,
*geometryProcessorLocalM,
this->coverage()));
@@ -828,7 +825,6 @@
kHairlineAA_GrProcessorEdgeType,
batchTarget->caps(),
*geometryProcessorLocalM,
- this->usesLocalCoords(),
this->coverage()));
SkAutoTUnref<const GrGeometryProcessor> conicGP(
@@ -837,7 +833,6 @@
kHairlineAA_GrProcessorEdgeType,
batchTarget->caps(),
*geometryProcessorLocalM,
- this->usesLocalCoords(),
this->coverage()));
// This is hand inlined for maximum performance.
@@ -864,6 +859,14 @@
ref_lines_index_buffer(batchTarget->resourceProvider()));
batchTarget->initDraw(lineGP, pipeline);
+ // TODO remove this when batch is everywhere
+ GrPipelineInfo init;
+ init.fColorIgnored = fBatch.fColorIgnored;
+ init.fOverrideColor = GrColor_ILLEGAL;
+ init.fCoverageIgnored = fBatch.fCoverageIgnored;
+ init.fUsesLocalCoords = this->usesLocalCoords();
+ lineGP->initBatchTracker(batchTarget->currentBatchTracker(), init);
+
const GrVertexBuffer* vertexBuffer;
int firstVertex;
@@ -925,6 +928,14 @@
if (quadCount > 0) {
batchTarget->initDraw(quadGP, pipeline);
+
+ // TODO remove this when batch is everywhere
+ GrPipelineInfo init;
+ init.fColorIgnored = fBatch.fColorIgnored;
+ init.fOverrideColor = GrColor_ILLEGAL;
+ init.fCoverageIgnored = fBatch.fCoverageIgnored;
+ init.fUsesLocalCoords = this->usesLocalCoords();
+ quadGP->initBatchTracker(batchTarget->currentBatchTracker(), init);
{
GrVertices verts;
@@ -938,6 +949,14 @@
if (conicCount > 0) {
batchTarget->initDraw(conicGP, pipeline);
+
+ // TODO remove this when batch is everywhere
+ GrPipelineInfo init;
+ init.fColorIgnored = fBatch.fColorIgnored;
+ init.fOverrideColor = GrColor_ILLEGAL;
+ init.fCoverageIgnored = fBatch.fCoverageIgnored;
+ init.fUsesLocalCoords = this->usesLocalCoords();
+ conicGP->initBatchTracker(batchTarget->currentBatchTracker(), init);
{
GrVertices verts;
« no previous file with comments | « src/gpu/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698