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

Unified Diff: src/gpu/GrAARectRenderer.cpp

Issue 1120023003: Refugee from Dead Machine 13: New version of the convex AA tessellator Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 8 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/GrAAConvexTessellator.cpp ('k') | tests/PDFPrimitivesTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAARectRenderer.cpp
diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp
index 569466f23793d70d4cbef373705e2e3ff591dc31..bff154601171b870a283e3cba1a520ab10ec127c 100644
--- a/src/gpu/GrAARectRenderer.cpp
+++ b/src/gpu/GrAARectRenderer.cpp
@@ -157,11 +157,10 @@ public:
GrDrawTarget::DrawInfo drawInfo;
drawInfo.setPrimitiveType(kTriangles_GrPrimitiveType);
- drawInfo.setStartVertex(0);
+ drawInfo.setStartVertex(firstVertex);
drawInfo.setStartIndex(0);
drawInfo.setVerticesPerInstance(kVertsPerAAFillRect);
drawInfo.setIndicesPerInstance(kIndicesPerAAFillRect);
- drawInfo.adjustStartVertex(firstVertex);
drawInfo.setVertexBuffer(vertexBuffer);
drawInfo.setIndexBuffer(fIndexBuffer);
@@ -590,11 +589,11 @@ public:
fBatch.fUsesLocalCoords = init.fUsesLocalCoords;
fBatch.fCoverageIgnored = init.fCoverageIgnored;
fBatch.fMiterStroke = fGeoData[0].fMiterStroke;
- fBatch.fCanTweakAlphaForCoverage = init.fCanTweakAlphaForCoverage;
+ fBatch.fCanTweakAlphaForCoverage1 = init.fCanTweakAlphaForCoverage;
}
void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override {
- bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage();
+ bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage1();
// Local matrix is ignored if we don't have local coords. If we have localcoords we only
// batch with identical view matrices
@@ -697,7 +696,7 @@ private:
GrColor color() const { return fBatch.fColor; }
bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; }
- bool canTweakAlphaForCoverage() const { return fBatch.fCanTweakAlphaForCoverage; }
+ bool canTweakAlphaForCoverage1() const { return fBatch.fCanTweakAlphaForCoverage1; }
bool colorIgnored() const { return fBatch.fColorIgnored; }
const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; }
bool miterStroke() const { return fBatch.fMiterStroke; }
@@ -719,8 +718,8 @@ private:
// In the event of two batches, one who can tweak, one who cannot, we just fall back to
// not tweaking
- if (this->canTweakAlphaForCoverage() != that->canTweakAlphaForCoverage()) {
- fBatch.fCanTweakAlphaForCoverage = false;
+ if (this->canTweakAlphaForCoverage1() != that->canTweakAlphaForCoverage1()) {
+ fBatch.fCanTweakAlphaForCoverage1 = false;
}
if (this->color() != that->color()) {
@@ -850,7 +849,7 @@ private:
bool fColorIgnored;
bool fCoverageIgnored;
bool fMiterStroke;
- bool fCanTweakAlphaForCoverage;
+ bool fCanTweakAlphaForCoverage1;
};
BatchTracker fBatch;
« no previous file with comments | « src/gpu/GrAAConvexTessellator.cpp ('k') | tests/PDFPrimitivesTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698