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 #include "GrRectBatch.h" | 8 #include "GrRectBatch.h" |
9 | 9 |
10 #include "GrBatchTarget.h" | 10 #include "GrBatchTarget.h" |
11 #include "GrDefaultGeoProcFactory.h" | 11 #include "GrDefaultGeoProcFactory.h" |
12 #include "GrPrimitiveProcessor.h" | 12 #include "GrPrimitiveProcessor.h" |
13 | 13 |
14 void GrRectBatch::initBatchTracker(const GrPipelineInfo& init) { | 14 void GrRectBatch::initBatchTracker(const GrPipelineOptimizations& init) { |
15 // Handle any color overrides | 15 // Handle any color overrides |
16 if (!init.readsColor()) { | 16 if (!init.readsColor()) { |
17 fGeoData[0].fColor = GrColor_ILLEGAL; | 17 fGeoData[0].fColor = GrColor_ILLEGAL; |
18 } | 18 } |
19 init.getOverrideColorIfSet(&fGeoData[0].fColor); | 19 init.getOverrideColorIfSet(&fGeoData[0].fColor); |
20 | 20 |
21 // setup batch properties | 21 // setup batch properties |
22 fBatch.fColorIgnored = !init.readsColor(); | 22 fBatch.fColorIgnored = !init.readsColor(); |
23 fBatch.fColor = fGeoData[0].fColor; | 23 fBatch.fColor = fGeoData[0].fColor; |
24 fBatch.fUsesLocalCoords = init.readsLocalCoords(); | 24 fBatch.fUsesLocalCoords = init.readsLocalCoords(); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 geometry.fHasLocalMatrix = random->nextBool(); | 166 geometry.fHasLocalMatrix = random->nextBool(); |
167 if (geometry.fHasLocalMatrix) { | 167 if (geometry.fHasLocalMatrix) { |
168 geometry.fLocalMatrix = GrTest::TestMatrix(random); | 168 geometry.fLocalMatrix = GrTest::TestMatrix(random); |
169 } | 169 } |
170 | 170 |
171 return GrRectBatch::Create(geometry); | 171 return GrRectBatch::Create(geometry); |
172 } | 172 } |
173 | 173 |
174 #endif | 174 #endif |
OLD | NEW |