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

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

Issue 1483103003: Make onPrepareDraws const (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: merge Created 5 years 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.cpp ('k') | src/gpu/batches/GrDrawVerticesBatch.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 GrDrawVerticesBatch_DEFINED 8 #ifndef GrDrawVerticesBatch_DEFINED
9 #define GrDrawVerticesBatch_DEFINED 9 #define GrDrawVerticesBatch_DEFINED
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 const char* name() const override { return "DrawVerticesBatch"; } 43 const char* name() const override { return "DrawVerticesBatch"; }
44 44
45 void computePipelineOptimizations(GrInitInvariantOutput* color, 45 void computePipelineOptimizations(GrInitInvariantOutput* color,
46 GrInitInvariantOutput* coverage, 46 GrInitInvariantOutput* coverage,
47 GrBatchToXPOverrides* overrides) const ove rride; 47 GrBatchToXPOverrides* overrides) const ove rride;
48 48
49 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 49 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
50 50
51 private: 51 private:
52 void onPrepareDraws(Target*) override; 52 void onPrepareDraws(Target*) const override;
53 void initBatchTracker(const GrXPOverridesForBatch&) override; 53 void initBatchTracker(const GrXPOverridesForBatch&) override;
54 54
55 GrDrawVerticesBatch(const Geometry& geometry, GrPrimitiveType primitiveType, 55 GrDrawVerticesBatch(const Geometry& geometry, GrPrimitiveType primitiveType,
56 const SkMatrix& viewMatrix, 56 const SkMatrix& viewMatrix,
57 const SkPoint* positions, int vertexCount, 57 const SkPoint* positions, int vertexCount,
58 const uint16_t* indices, int indexCount, 58 const uint16_t* indices, int indexCount,
59 const GrColor* colors, const SkPoint* localCoords, const SkRect& bounds); 59 const GrColor* colors, const SkPoint* localCoords, const SkRect& bounds);
60 60
61 GrPrimitiveType primitiveType() const { return fPrimitiveType; } 61 GrPrimitiveType primitiveType() const { return fPrimitiveType; }
62 bool batchablePrimitiveType() const { 62 bool batchablePrimitiveType() const {
(...skipping 10 matching lines...) Expand all
73 int fVertexCount; 73 int fVertexCount;
74 int fIndexCount; 74 int fIndexCount;
75 bool fCoverageIgnored; // comes from initBatchTracker. 75 bool fCoverageIgnored; // comes from initBatchTracker.
76 76
77 SkSTArray<1, Geometry, true> fGeoData; 77 SkSTArray<1, Geometry, true> fGeoData;
78 78
79 typedef GrVertexBatch INHERITED; 79 typedef GrVertexBatch INHERITED;
80 }; 80 };
81 81
82 #endif 82 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawAtlasBatch.cpp ('k') | src/gpu/batches/GrDrawVerticesBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698