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

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

Issue 920423003: Stop lieing about GrBatch color for Rects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 5 years, 10 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/GrOvalRenderer.cpp ('k') | no next file » | 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 17 matching lines...) Expand all
28 out->setUnknownFourComponents(); 28 out->setUnknownFourComponents();
29 } else { 29 } else {
30 out->setKnownFourComponents(fGeometryProcessor->color()); 30 out->setKnownFourComponents(fGeometryProcessor->color());
31 } 31 }
32 } 32 }
33 33
34 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRID E { 34 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRID E {
35 out->setUnknownSingleComponent(); 35 out->setUnknownSingleComponent();
36 } 36 }
37 37
38 void initBatchOpt(const GrBatchOpt& batchOpt) {}
39
40 void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { 38 void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE {
41 // Handle any color overrides 39 // Handle any color overrides
42 if (init.fColorIgnored) { 40 if (init.fColorIgnored) {
43 this->geoData(0)->fColor = GrColor_ILLEGAL; 41 this->geoData(0)->fColor = GrColor_ILLEGAL;
44 } else if (GrColor_ILLEGAL != init.fOverrideColor) { 42 } else if (GrColor_ILLEGAL != init.fOverrideColor) {
45 this->geoData(0)->fColor = init.fOverrideColor; 43 this->geoData(0)->fColor = init.fOverrideColor;
46 } 44 }
47 45
48 // setup batch properties 46 // setup batch properties
49 fBatch.fColorIgnored = init.fColorIgnored; 47 fBatch.fColorIgnored = init.fColorIgnored;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool fUsesLocalCoords; 87 bool fUsesLocalCoords;
90 bool fColorIgnored; 88 bool fColorIgnored;
91 bool fCoverageIgnored; 89 bool fCoverageIgnored;
92 }; 90 };
93 91
94 SkAutoTUnref<const GrGeometryProcessor> fGeometryProcessor; 92 SkAutoTUnref<const GrGeometryProcessor> fGeometryProcessor;
95 BatchTracker fBatch; 93 BatchTracker fBatch;
96 }; 94 };
97 95
98 #endif 96 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698