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

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

Issue 1274513005: Rename GrPipelineInfo to GrPipelineOptimizations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 4 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 | « no previous file | src/gpu/GrAADistanceFieldPathRenderer.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 2012 Google Inc. 3 * Copyright 2012 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 "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 10
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 const char* name() const override { return "AAConvexBatch"; } 754 const char* name() const override { return "AAConvexBatch"; }
755 755
756 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 756 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
757 // When this is called on a batch, there is only one geometry bundle 757 // When this is called on a batch, there is only one geometry bundle
758 out->setKnownFourComponents(fGeoData[0].fColor); 758 out->setKnownFourComponents(fGeoData[0].fColor);
759 } 759 }
760 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 760 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
761 out->setUnknownSingleComponent(); 761 out->setUnknownSingleComponent();
762 } 762 }
763 763
764 void initBatchTracker(const GrPipelineInfo& init) override { 764 void initBatchTracker(const GrPipelineOptimizations& opt) override {
765 // Handle any color overrides 765 // Handle any color overrides
766 if (!init.readsColor()) { 766 if (!opt.readsColor()) {
767 fGeoData[0].fColor = GrColor_ILLEGAL; 767 fGeoData[0].fColor = GrColor_ILLEGAL;
768 } 768 }
769 init.getOverrideColorIfSet(&fGeoData[0].fColor); 769 opt.getOverrideColorIfSet(&fGeoData[0].fColor);
770 770
771 // setup batch properties 771 // setup batch properties
772 fBatch.fColorIgnored = !init.readsColor(); 772 fBatch.fColorIgnored = !opt.readsColor();
773 fBatch.fColor = fGeoData[0].fColor; 773 fBatch.fColor = fGeoData[0].fColor;
774 fBatch.fUsesLocalCoords = init.readsLocalCoords(); 774 fBatch.fUsesLocalCoords = opt.readsLocalCoords();
775 fBatch.fCoverageIgnored = !init.readsCoverage(); 775 fBatch.fCoverageIgnored = !opt.readsCoverage();
776 fBatch.fLinesOnly = SkPath::kLine_SegmentMask == fGeoData[0].fPath.getSe gmentMasks(); 776 fBatch.fLinesOnly = SkPath::kLine_SegmentMask == fGeoData[0].fPath.getSe gmentMasks();
777 fBatch.fCanTweakAlphaForCoverage = init.canTweakAlphaForCoverage(); 777 fBatch.fCanTweakAlphaForCoverage = opt.canTweakAlphaForCoverage();
778 } 778 }
779 779
780 void generateGeometryLinesOnly(GrBatchTarget* batchTarget) { 780 void generateGeometryLinesOnly(GrBatchTarget* batchTarget) {
781 bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage(); 781 bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage();
782 782
783 // Setup GrGeometryProcessor 783 // Setup GrGeometryProcessor
784 SkAutoTUnref<const GrGeometryProcessor> gp(create_fill_gp(canTweakAlphaF orCoverage, 784 SkAutoTUnref<const GrGeometryProcessor> gp(create_fill_gp(canTweakAlphaF orCoverage,
785 this->viewMatr ix(), 785 this->viewMatr ix(),
786 this->usesLoca lCoords(), 786 this->usesLoca lCoords(),
787 this->coverage Ignored())); 787 this->coverage Ignored()));
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 BATCH_TEST_DEFINE(AAConvexPathBatch) { 1015 BATCH_TEST_DEFINE(AAConvexPathBatch) {
1016 AAConvexPathBatch::Geometry geometry; 1016 AAConvexPathBatch::Geometry geometry;
1017 geometry.fColor = GrRandomColor(random); 1017 geometry.fColor = GrRandomColor(random);
1018 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); 1018 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random);
1019 geometry.fPath = GrTest::TestPathConvex(random); 1019 geometry.fPath = GrTest::TestPathConvex(random);
1020 1020
1021 return AAConvexPathBatch::Create(geometry); 1021 return AAConvexPathBatch::Create(geometry);
1022 } 1022 }
1023 1023
1024 #endif 1024 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698