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

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

Issue 1285973006: Thou shalt use override consistently. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/pdf/SkPDFFontImpl.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 GrDrawPathBatch_DEFINED 8 #ifndef GrDrawPathBatch_DEFINED
9 #define GrDrawPathBatch_DEFINED 9 #define GrDrawPathBatch_DEFINED
10 10
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 const char* name() const override { return "DrawPath"; } 24 const char* name() const override { return "DrawPath"; }
25 25
26 SkString dumpInfo() const override { 26 SkString dumpInfo() const override {
27 SkString string; 27 SkString string;
28 string.printf("PATH: 0x%p", fPath.get()); 28 string.printf("PATH: 0x%p", fPath.get());
29 return string; 29 return string;
30 } 30 }
31 31
32 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const { 32 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
33 fPrimitiveProcessor->getInvariantOutputColor(out); 33 fPrimitiveProcessor->getInvariantOutputColor(out);
34 } 34 }
35 35
36 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const { 36 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
37 fPrimitiveProcessor->getInvariantOutputCoverage(out); 37 fPrimitiveProcessor->getInvariantOutputCoverage(out);
38 } 38 }
39 39
40 void setStencilSettings(const GrStencilSettings& stencil) { fStencilSettings = stencil; } 40 void setStencilSettings(const GrStencilSettings& stencil) { fStencilSettings = stencil; }
41 41
42 private: 42 private:
43 GrBatchTracker* tracker() { return reinterpret_cast<GrBatchTracker*>(&fWhatc hamacallit); } 43 GrBatchTracker* tracker() { return reinterpret_cast<GrBatchTracker*>(&fWhatc hamacallit); }
44 GrDrawPathBatch(const GrPathProcessor* primProc, const GrPath* path) 44 GrDrawPathBatch(const GrPathProcessor* primProc, const GrPath* path)
45 : fPrimitiveProcessor(primProc) 45 : fPrimitiveProcessor(primProc)
46 , fPath(path) { 46 , fPath(path) {
47 fBounds = path->getBounds(); 47 fBounds = path->getBounds();
48 primProc->viewMatrix().mapRect(&fBounds); 48 primProc->viewMatrix().mapRect(&fBounds);
49 this->initClassID<GrDrawPathBatch>(); 49 this->initClassID<GrDrawPathBatch>();
50 } 50 }
51 51
52 virtual void initBatchTracker(const GrPipelineOptimizations& opts) { 52 void initBatchTracker(const GrPipelineOptimizations& opts) override {
53 fPrimitiveProcessor->initBatchTracker(this->tracker(), opts); 53 fPrimitiveProcessor->initBatchTracker(this->tracker(), opts);
54 } 54 }
55 55
56 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f alse; } 56 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f alse; }
57 57
58 void onPrepare(GrBatchFlushState*) override {} 58 void onPrepare(GrBatchFlushState*) override {}
59 59
60 void onDraw(GrBatchFlushState* state) override { 60 void onDraw(GrBatchFlushState* state) override {
61 GrProgramDesc desc; 61 GrProgramDesc desc;
62 state->gpu()->buildProgramDesc(&desc, *fPrimitiveProcessor.get(), 62 state->gpu()->buildProgramDesc(&desc, *fPrimitiveProcessor.get(),
63 *this->pipeline(), *this->tracker()); 63 *this->pipeline(), *this->tracker());
64 GrPathRendering::DrawPathArgs args(fPrimitiveProcessor.get(), this->pipe line(), 64 GrPathRendering::DrawPathArgs args(fPrimitiveProcessor.get(), this->pipe line(),
65 &desc, this->tracker(), &fStencilSett ings); 65 &desc, this->tracker(), &fStencilSett ings);
66 state->gpu()->pathRendering()->drawPath(args, fPath.get()); 66 state->gpu()->pathRendering()->drawPath(args, fPath.get());
67 } 67 }
68 68
69 GrPendingProgramElement<const GrPathProcessor> fPrimitiveProcessor; 69 GrPendingProgramElement<const GrPathProcessor> fPrimitiveProcessor;
70 PathBatchTracker fWhatchamacallit; // TOD O: delete this 70 PathBatchTracker fWhatchamacallit; // TOD O: delete this
71 GrStencilSettings fStencilSettings; 71 GrStencilSettings fStencilSettings;
72 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; 72 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
73 }; 73 };
74 74
75 #endif 75 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFFontImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698