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

Side by Side Diff: src/gpu/GrAADistanceFieldPathRenderer.cpp

Issue 1213013003: Revert of Rework GrPipelineInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrAADistanceFieldPathRenderer.h" 9 #include "GrAADistanceFieldPathRenderer.h"
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 150 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
151 out->setKnownFourComponents(fBatch.fColor); 151 out->setKnownFourComponents(fBatch.fColor);
152 } 152 }
153 153
154 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 154 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
155 out->setUnknownSingleComponent(); 155 out->setUnknownSingleComponent();
156 } 156 }
157 157
158 void initBatchTracker(const GrPipelineInfo& init) override { 158 void initBatchTracker(const GrPipelineInfo& init) override {
159 // Handle any color overrides 159 // Handle any color overrides
160 if (!init.readsColor()) { 160 if (init.fColorIgnored) {
161 fBatch.fColor = GrColor_ILLEGAL; 161 fBatch.fColor = GrColor_ILLEGAL;
162 } else if (GrColor_ILLEGAL != init.fOverrideColor) {
163 fBatch.fColor = init.fOverrideColor;
162 } 164 }
163 init.getOverrideColorIfSet(&fBatch.fColor);
164 165
165 // setup batch properties 166 // setup batch properties
166 fBatch.fColorIgnored = !init.readsColor(); 167 fBatch.fColorIgnored = init.fColorIgnored;
167 fBatch.fUsesLocalCoords = init.readsLocalCoords(); 168 fBatch.fUsesLocalCoords = init.fUsesLocalCoords;
168 fBatch.fCoverageIgnored = !init.readsCoverage(); 169 fBatch.fCoverageIgnored = init.fCoverageIgnored;
169 } 170 }
170 171
171 struct FlushInfo { 172 struct FlushInfo {
172 SkAutoTUnref<const GrVertexBuffer> fVertexBuffer; 173 SkAutoTUnref<const GrVertexBuffer> fVertexBuffer;
173 SkAutoTUnref<const GrIndexBuffer> fIndexBuffer; 174 SkAutoTUnref<const GrIndexBuffer> fIndexBuffer;
174 int fVertexOffset; 175 int fVertexOffset;
175 int fInstancesToFlush; 176 int fInstancesToFlush;
176 }; 177 };
177 178
178 void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline ) override { 179 void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline ) override {
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 geometry.fPath = GrTest::TestPath(random); 652 geometry.fPath = GrTest::TestPath(random);
652 geometry.fAntiAlias = random->nextBool(); 653 geometry.fAntiAlias = random->nextBool();
653 654
654 return AADistanceFieldPathBatch::Create(geometry, color, viewMatrix, 655 return AADistanceFieldPathBatch::Create(geometry, color, viewMatrix,
655 gTestStruct.fAtlas, 656 gTestStruct.fAtlas,
656 &gTestStruct.fPathCache, 657 &gTestStruct.fPathCache,
657 &gTestStruct.fPathList); 658 &gTestStruct.fPathList);
658 } 659 }
659 660
660 #endif 661 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698