OLD | NEW |
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 GrTInstanceBatch_DEFINED | 8 #ifndef GrTInstanceBatch_DEFINED |
9 #define GrTInstanceBatch_DEFINED | 9 #define GrTInstanceBatch_DEFINED |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 DEFINE_BATCH_CLASS_ID | 45 DEFINE_BATCH_CLASS_ID |
46 | 46 |
47 typedef typename Impl::Geometry Geometry; | 47 typedef typename Impl::Geometry Geometry; |
48 | 48 |
49 static GrTInstanceBatch* Create() { return new GrTInstanceBatch; } | 49 static GrTInstanceBatch* Create() { return new GrTInstanceBatch; } |
50 | 50 |
51 const char* name() const override { return Impl::Name(); } | 51 const char* name() const override { return Impl::Name(); } |
52 | 52 |
53 SkString dumpInfo() const override { | 53 SkString dumpInfo() const override { |
54 SkString str; | 54 SkString str; |
| 55 str.appendf("# batched: %d\n", fGeoData.count()); |
55 for (int i = 0; i < fGeoData.count(); ++i) { | 56 for (int i = 0; i < fGeoData.count(); ++i) { |
56 str.append(Impl::DumpInfo(fGeoData[i], i)); | 57 str.append(Impl::DumpInfo(fGeoData[i], i)); |
57 } | 58 } |
58 str.append(INHERITED::dumpInfo()); | 59 str.append(INHERITED::dumpInfo()); |
59 return str; | 60 return str; |
60 } | 61 } |
61 | 62 |
62 void computePipelineOptimizations(GrInitInvariantOutput* color, | 63 void computePipelineOptimizations(GrInitInvariantOutput* color, |
63 GrInitInvariantOutput* coverage, | 64 GrInitInvariantOutput* coverage, |
64 GrBatchToXPOverrides* overrides) const ove
rride { | 65 GrBatchToXPOverrides* overrides) const ove
rride { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 return true; | 142 return true; |
142 } | 143 } |
143 | 144 |
144 GrXPOverridesForBatch fOverrides; | 145 GrXPOverridesForBatch fOverrides; |
145 SkSTArray<1, Geometry, true> fGeoData; | 146 SkSTArray<1, Geometry, true> fGeoData; |
146 | 147 |
147 typedef GrVertexBatch INHERITED; | 148 typedef GrVertexBatch INHERITED; |
148 }; | 149 }; |
149 | 150 |
150 #endif | 151 #endif |
OLD | NEW |