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

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

Issue 1213383005: Rework GrPipelineInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixed 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.fColorIgnored) { 160 if (!init.readsColor()) {
161 fBatch.fColor = GrColor_ILLEGAL; 161 fBatch.fColor = GrColor_ILLEGAL;
162 } else if (GrColor_ILLEGAL != init.fOverrideColor) {
163 fBatch.fColor = init.fOverrideColor;
164 } 162 }
163 init.getOverrideColorIfSet(&fBatch.fColor);
165 164
166 // setup batch properties 165 // setup batch properties
167 fBatch.fColorIgnored = init.fColorIgnored; 166 fBatch.fColorIgnored = !init.readsColor();
168 fBatch.fUsesLocalCoords = init.fUsesLocalCoords; 167 fBatch.fUsesLocalCoords = init.readsLocalCoords();
169 fBatch.fCoverageIgnored = init.fCoverageIgnored; 168 fBatch.fCoverageIgnored = !init.readsCoverage();
170 } 169 }
171 170
172 struct FlushInfo { 171 struct FlushInfo {
173 SkAutoTUnref<const GrVertexBuffer> fVertexBuffer; 172 SkAutoTUnref<const GrVertexBuffer> fVertexBuffer;
174 SkAutoTUnref<const GrIndexBuffer> fIndexBuffer; 173 SkAutoTUnref<const GrIndexBuffer> fIndexBuffer;
175 int fVertexOffset; 174 int fVertexOffset;
176 int fInstancesToFlush; 175 int fInstancesToFlush;
177 }; 176 };
178 177
179 void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline ) override { 178 void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline ) override {
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 geometry.fPath = GrTest::TestPath(random); 651 geometry.fPath = GrTest::TestPath(random);
653 geometry.fAntiAlias = random->nextBool(); 652 geometry.fAntiAlias = random->nextBool();
654 653
655 return AADistanceFieldPathBatch::Create(geometry, color, viewMatrix, 654 return AADistanceFieldPathBatch::Create(geometry, color, viewMatrix,
656 gTestStruct.fAtlas, 655 gTestStruct.fAtlas,
657 &gTestStruct.fPathCache, 656 &gTestStruct.fPathCache,
658 &gTestStruct.fPathList); 657 &gTestStruct.fPathList);
659 } 658 }
660 659
661 #endif 660 #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