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

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

Issue 1301663002: Privatize GrBatch subclass overrides (Closed) Base URL: https://skia.googlesource.com/skia.git@drawsonvb
Patch Set: more 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/GrAAFillRectBatch.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.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 GrAAStrokeRectBatch_DEFINED 8 #ifndef GrAAStrokeRectBatch_DEFINED
9 #define GrAAStrokeRectBatch_DEFINED 9 #define GrAAStrokeRectBatch_DEFINED
10 10
(...skipping 24 matching lines...) Expand all
35 35
36 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 36 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
37 // When this is called on a batch, there is only one geometry bundle 37 // When this is called on a batch, there is only one geometry bundle
38 out->setKnownFourComponents(fGeoData[0].fColor); 38 out->setKnownFourComponents(fGeoData[0].fColor);
39 } 39 }
40 40
41 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 41 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
42 out->setUnknownSingleComponent(); 42 out->setUnknownSingleComponent();
43 } 43 }
44 44
45 void initBatchTracker(const GrPipelineOptimizations&) override;
46
47 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 45 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
48 46
49 private: 47 private:
50 void onPrepareDraws(Target*) override; 48 void onPrepareDraws(Target*) override;
49 void initBatchTracker(const GrPipelineOptimizations&) override;
51 50
52 GrAAStrokeRectBatch(const Geometry& geometry, const SkMatrix& viewMatrix) { 51 GrAAStrokeRectBatch(const Geometry& geometry, const SkMatrix& viewMatrix) {
53 this->initClassID<GrAAStrokeRectBatch>(); 52 this->initClassID<GrAAStrokeRectBatch>();
54 fBatch.fViewMatrix = viewMatrix; 53 fBatch.fViewMatrix = viewMatrix;
55 fGeoData.push_back(geometry); 54 fGeoData.push_back(geometry);
56 55
57 // If we have miterstroke then we inset devOutside and outset devOutside Assist, so we need 56 // If we have miterstroke then we inset devOutside and outset devOutside Assist, so we need
58 // the join for proper bounds 57 // the join for proper bounds
59 fBounds = geometry.fDevOutside; 58 fBounds = geometry.fDevOutside;
60 fBounds.join(geometry.fDevOutsideAssist); 59 fBounds.join(geometry.fDevOutsideAssist);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool fMiterStroke; 102 bool fMiterStroke;
104 bool fCanTweakAlphaForCoverage; 103 bool fCanTweakAlphaForCoverage;
105 }; 104 };
106 105
107 BatchTracker fBatch; 106 BatchTracker fBatch;
108 SkSTArray<1, Geometry, true> fGeoData; 107 SkSTArray<1, Geometry, true> fGeoData;
109 }; 108 };
110 109
111 110
112 #endif 111 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAFillRectBatch.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698