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

Side by Side Diff: src/gpu/batches/GrTestBatch.h

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 | « src/gpu/batches/GrStrokeRectBatch.cpp ('k') | src/gpu/effects/GrDashingEffect.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 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrTestBatch_DEFINED 8 #ifndef GrTestBatch_DEFINED
9 #define GrTestBatch_DEFINED 9 #define GrTestBatch_DEFINED
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 27 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
28 // When this is called on a batch, there is only one geometry bundle 28 // When this is called on a batch, there is only one geometry bundle
29 out->setKnownFourComponents(this->geoData(0)->fColor); 29 out->setKnownFourComponents(this->geoData(0)->fColor);
30 } 30 }
31 31
32 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 32 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
33 out->setUnknownSingleComponent(); 33 out->setUnknownSingleComponent();
34 } 34 }
35 35
36 void initBatchTracker(const GrPipelineInfo& init) override { 36 void initBatchTracker(const GrPipelineOptimizations& opt) override {
37 // Handle any color overrides 37 // Handle any color overrides
38 if (!init.readsColor()) { 38 if (!opt.readsColor()) {
39 this->geoData(0)->fColor = GrColor_ILLEGAL; 39 this->geoData(0)->fColor = GrColor_ILLEGAL;
40 } 40 }
41 init.getOverrideColorIfSet(&this->geoData(0)->fColor); 41 opt.getOverrideColorIfSet(&this->geoData(0)->fColor);
42 42
43 // setup batch properties 43 // setup batch properties
44 fBatch.fColorIgnored = !init.readsColor(); 44 fBatch.fColorIgnored = !opt.readsColor();
45 fBatch.fColor = this->geoData(0)->fColor; 45 fBatch.fColor = this->geoData(0)->fColor;
46 fBatch.fUsesLocalCoords = init.readsLocalCoords(); 46 fBatch.fUsesLocalCoords = opt.readsLocalCoords();
47 fBatch.fCoverageIgnored = !init.readsCoverage(); 47 fBatch.fCoverageIgnored = !opt.readsCoverage();
48 } 48 }
49 49
50 void generateGeometry(GrBatchTarget* batchTarget) override { 50 void generateGeometry(GrBatchTarget* batchTarget) override {
51 batchTarget->initDraw(fGeometryProcessor, this->pipeline()); 51 batchTarget->initDraw(fGeometryProcessor, this->pipeline());
52 52
53 this->onGenerateGeometry(batchTarget); 53 this->onGenerateGeometry(batchTarget);
54 } 54 }
55 55
56 protected: 56 protected:
57 GrTestBatch(const GrGeometryProcessor* gp, const SkRect& bounds) { 57 GrTestBatch(const GrGeometryProcessor* gp, const SkRect& bounds) {
(...skipping 19 matching lines...) Expand all
77 bool fUsesLocalCoords; 77 bool fUsesLocalCoords;
78 bool fColorIgnored; 78 bool fColorIgnored;
79 bool fCoverageIgnored; 79 bool fCoverageIgnored;
80 }; 80 };
81 81
82 SkAutoTUnref<const GrGeometryProcessor> fGeometryProcessor; 82 SkAutoTUnref<const GrGeometryProcessor> fGeometryProcessor;
83 BatchTracker fBatch; 83 BatchTracker fBatch;
84 }; 84 };
85 85
86 #endif 86 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrStrokeRectBatch.cpp ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698