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

Side by Side Diff: src/gpu/batches/GrDrawVerticesBatch.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/GrDrawAtlasBatch.h ('k') | src/gpu/batches/GrStrokeRectBatch.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 GrDrawVerticesBatch_DEFINED 8 #ifndef GrDrawVerticesBatch_DEFINED
9 #define GrDrawVerticesBatch_DEFINED 9 #define GrDrawVerticesBatch_DEFINED
10 10
(...skipping 27 matching lines...) Expand all
38 vertexCount, indices, indexCount , colors, 38 vertexCount, indices, indexCount , colors,
39 localCoords, bounds)); 39 localCoords, bounds));
40 } 40 }
41 41
42 const char* name() const override { return "DrawVerticesBatch"; } 42 const char* name() const override { return "DrawVerticesBatch"; }
43 43
44 void getInvariantOutputColor(GrInitInvariantOutput* out) const override; 44 void getInvariantOutputColor(GrInitInvariantOutput* out) const override;
45 45
46 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override; 46 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override;
47 47
48 void initBatchTracker(const GrPipelineOptimizations&) override;
49
50 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 48 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
51 49
52 private: 50 private:
53 void onPrepareDraws(Target*) override; 51 void onPrepareDraws(Target*) override;
52 void initBatchTracker(const GrPipelineOptimizations&) override;
54 53
55 GrDrawVerticesBatch(const Geometry& geometry, GrPrimitiveType primitiveType, 54 GrDrawVerticesBatch(const Geometry& geometry, GrPrimitiveType primitiveType,
56 const SkMatrix& viewMatrix, 55 const SkMatrix& viewMatrix,
57 const SkPoint* positions, int vertexCount, 56 const SkPoint* positions, int vertexCount,
58 const uint16_t* indices, int indexCount, 57 const uint16_t* indices, int indexCount,
59 const GrColor* colors, const SkPoint* localCoords, const SkRect& bounds); 58 const GrColor* colors, const SkPoint* localCoords, const SkRect& bounds);
60 59
61 GrPrimitiveType primitiveType() const { return fBatch.fPrimitiveType; } 60 GrPrimitiveType primitiveType() const { return fBatch.fPrimitiveType; }
62 bool batchablePrimitiveType() const { 61 bool batchablePrimitiveType() const {
63 return kTriangles_GrPrimitiveType == fBatch.fPrimitiveType || 62 return kTriangles_GrPrimitiveType == fBatch.fPrimitiveType ||
(...skipping 25 matching lines...) Expand all
89 bool fHasLocalCoords; 88 bool fHasLocalCoords;
90 int fVertexCount; 89 int fVertexCount;
91 int fIndexCount; 90 int fIndexCount;
92 }; 91 };
93 92
94 BatchTracker fBatch; 93 BatchTracker fBatch;
95 SkSTArray<1, Geometry, true> fGeoData; 94 SkSTArray<1, Geometry, true> fGeoData;
96 }; 95 };
97 96
98 #endif 97 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawAtlasBatch.h ('k') | src/gpu/batches/GrStrokeRectBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698