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

Side by Side Diff: src/gpu/batches/GrDrawAtlasBatch.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/GrDefaultPathRenderer.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.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 GrDrawAtlasBatch_DEFINED 8 #ifndef GrDrawAtlasBatch_DEFINED
9 #define GrDrawAtlasBatch_DEFINED 9 #define GrDrawAtlasBatch_DEFINED
10 10
(...skipping 27 matching lines...) Expand all
38 } else { 38 } else {
39 color->setKnownFourComponents(fGeoData[0].fColor); 39 color->setKnownFourComponents(fGeoData[0].fColor);
40 } 40 }
41 coverage->setKnownSingleComponent(0xff); 41 coverage->setKnownSingleComponent(0xff);
42 overrides->fUsePLSDstRead = false; 42 overrides->fUsePLSDstRead = false;
43 } 43 }
44 44
45 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 45 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
46 46
47 private: 47 private:
48 void onPrepareDraws(Target*) override; 48 void onPrepareDraws(Target*) const override;
49 49
50 void initBatchTracker(const GrXPOverridesForBatch&) override; 50 void initBatchTracker(const GrXPOverridesForBatch&) override;
51 51
52 GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, int s priteCount, 52 GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, int s priteCount,
53 const SkRSXform* xforms, const SkRect* rects, const SkColor * colors); 53 const SkRSXform* xforms, const SkRect* rects, const SkColor * colors);
54 54
55 GrColor color() const { return fColor; } 55 GrColor color() const { return fColor; }
56 bool colorIgnored() const { return fColorIgnored; } 56 bool colorIgnored() const { return fColorIgnored; }
57 const SkMatrix& viewMatrix() const { return fViewMatrix; } 57 const SkMatrix& viewMatrix() const { return fViewMatrix; }
58 bool hasColors() const { return fHasColors; } 58 bool hasColors() const { return fHasColors; }
59 int quadCount() const { return fQuadCount; } 59 int quadCount() const { return fQuadCount; }
60 bool coverageIgnored() const { return fCoverageIgnored; } 60 bool coverageIgnored() const { return fCoverageIgnored; }
61 61
62 bool onCombineIfPossible(GrBatch* t, const GrCaps&) override; 62 bool onCombineIfPossible(GrBatch* t, const GrCaps&) override;
63 SkSTArray<1, Geometry, true> fGeoData; 63 SkSTArray<1, Geometry, true> fGeoData;
64 64
65 SkMatrix fViewMatrix; 65 SkMatrix fViewMatrix;
66 GrColor fColor; 66 GrColor fColor;
67 int fQuadCount; 67 int fQuadCount;
68 bool fColorIgnored; 68 bool fColorIgnored;
69 bool fCoverageIgnored; 69 bool fCoverageIgnored;
70 bool fHasColors; 70 bool fHasColors;
71 71
72 typedef GrVertexBatch INHERITED; 72 typedef GrVertexBatch INHERITED;
73 }; 73 };
74 74
75 #endif 75 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDefaultPathRenderer.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698