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

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

Issue 1353043002: Revert of add a ClassID function to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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/GrTessellatingPathRenderer.cpp ('k') | src/gpu/batches/GrVertexBatch.h » ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 opt.getOverrideColorIfSet(&this->geoData(0)->fColor); 43 opt.getOverrideColorIfSet(&this->geoData(0)->fColor);
44 44
45 // setup batch properties 45 // setup batch properties
46 fBatch.fColorIgnored = !opt.readsColor(); 46 fBatch.fColorIgnored = !opt.readsColor();
47 fBatch.fColor = this->geoData(0)->fColor; 47 fBatch.fColor = this->geoData(0)->fColor;
48 fBatch.fUsesLocalCoords = opt.readsLocalCoords(); 48 fBatch.fUsesLocalCoords = opt.readsLocalCoords();
49 fBatch.fCoverageIgnored = !opt.readsCoverage(); 49 fBatch.fCoverageIgnored = !opt.readsCoverage();
50 } 50 }
51 51
52 protected: 52 protected:
53 GrTestBatch(uint32_t classID, const GrGeometryProcessor* gp, const SkRect& b ounds) 53 GrTestBatch(const GrGeometryProcessor* gp, const SkRect& bounds) {
54 : INHERITED(classID) {
55 fGeometryProcessor.reset(SkRef(gp)); 54 fGeometryProcessor.reset(SkRef(gp));
56 55
57 this->setBounds(bounds); 56 this->setBounds(bounds);
58 } 57 }
59 58
60 const GrGeometryProcessor* geometryProcessor() const { return fGeometryProce ssor; } 59 const GrGeometryProcessor* geometryProcessor() const { return fGeometryProce ssor; }
61 60
62 private: 61 private:
63 void onPrepareDraws(Target* target) override { 62 void onPrepareDraws(Target* target) override {
64 target->initDraw(fGeometryProcessor, this->pipeline()); 63 target->initDraw(fGeometryProcessor, this->pipeline());
(...skipping 11 matching lines...) Expand all
76 75
77 struct BatchTracker { 76 struct BatchTracker {
78 GrColor fColor; 77 GrColor fColor;
79 bool fUsesLocalCoords; 78 bool fUsesLocalCoords;
80 bool fColorIgnored; 79 bool fColorIgnored;
81 bool fCoverageIgnored; 80 bool fCoverageIgnored;
82 }; 81 };
83 82
84 SkAutoTUnref<const GrGeometryProcessor> fGeometryProcessor; 83 SkAutoTUnref<const GrGeometryProcessor> fGeometryProcessor;
85 BatchTracker fBatch; 84 BatchTracker fBatch;
86
87 typedef GrVertexBatch INHERITED;
88 }; 85 };
89 86
90 #endif 87 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrTessellatingPathRenderer.cpp ('k') | src/gpu/batches/GrVertexBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698