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

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

Issue 1332923003: Remove batchtracker (Closed) Base URL: https://skia.googlesource.com/skia.git@latecreatepathprocessor
Patch Set: tweaks 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/GrAAConvexPathRenderer.cpp ('k') | src/gpu/batches/GrDrawPathBatch.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 GrDrawPathBatch_DEFINED 8 #ifndef GrDrawPathBatch_DEFINED
9 #define GrDrawPathBatch_DEFINED 9 #define GrDrawPathBatch_DEFINED
10 10
(...skipping 21 matching lines...) Expand all
32 protected: 32 protected:
33 GrDrawPathBatchBase(const SkMatrix& viewMatrix, GrColor initialColor) 33 GrDrawPathBatchBase(const SkMatrix& viewMatrix, GrColor initialColor)
34 : fViewMatrix(viewMatrix) 34 : fViewMatrix(viewMatrix)
35 , fColor(initialColor) {} 35 , fColor(initialColor) {}
36 36
37 const GrStencilSettings& stencilSettings() const { return fStencilSettings; } 37 const GrStencilSettings& stencilSettings() const { return fStencilSettings; }
38 const GrPipelineOptimizations& opts() const { return fOpts; } 38 const GrPipelineOptimizations& opts() const { return fOpts; }
39 const SkMatrix& viewMatrix() const { return fViewMatrix; } 39 const SkMatrix& viewMatrix() const { return fViewMatrix; }
40 GrColor color() const { return fColor; } 40 GrColor color() const { return fColor; }
41 41
42 // TODO delete
43 const GrBatchTracker* tracker() const { return &fBatchTracker; }
44
45 private: 42 private:
46 void initBatchTracker(const GrPipelineOptimizations& opts) override { 43 void initBatchTracker(const GrPipelineOptimizations& opts) override {
47 opts.getOverrideColorIfSet(&fColor); 44 opts.getOverrideColorIfSet(&fColor);
48 fOpts = opts; 45 fOpts = opts;
49 } 46 }
50 47
51 SkMatrix fViewMatrix; 48 SkMatrix fViewMatrix;
52 GrColor fColor; 49 GrColor fColor;
53 GrStencilSettings fStencilSettings; 50 GrStencilSettings fStencilSettings;
54 GrPipelineOptimizations fOpts; 51 GrPipelineOptimizations fOpts;
55 52
56 // TODO delete
57 GrBatchTracker fBatchTracker;
58
59 typedef GrDrawBatch INHERITED; 53 typedef GrDrawBatch INHERITED;
60 }; 54 };
61 55
62 class GrDrawPathBatch final : public GrDrawPathBatchBase { 56 class GrDrawPathBatch final : public GrDrawPathBatchBase {
63 public: 57 public:
64 // This can't return a more abstract type because we install the stencil set tings late :( 58 // This can't return a more abstract type because we install the stencil set tings late :(
65 static GrDrawPathBatchBase* Create(const SkMatrix& viewMatrix, GrColor color , 59 static GrDrawPathBatchBase* Create(const SkMatrix& viewMatrix, GrColor color ,
66 const GrPath* path) { 60 const GrPath* path) {
67 return new GrDrawPathBatch(viewMatrix, color, path); 61 return new GrDrawPathBatch(viewMatrix, color, path);
68 } 62 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 173
180 typedef SkTLList<GrPathRangeDraw*> DrawList; 174 typedef SkTLList<GrPathRangeDraw*> DrawList;
181 DrawList fDraws; 175 DrawList fDraws;
182 int fTotalPathCount; 176 int fTotalPathCount;
183 SkMatrix fLocalMatrix; 177 SkMatrix fLocalMatrix;
184 178
185 typedef GrDrawPathBatchBase INHERITED; 179 typedef GrDrawPathBatchBase INHERITED;
186 }; 180 };
187 181
188 #endif 182 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAAConvexPathRenderer.cpp ('k') | src/gpu/batches/GrDrawPathBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698