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 "GrAAStrokeRectBatch.h" | 8 #include "GrAAStrokeRectBatch.h" |
9 | 9 |
10 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 coverageType = Coverage::kSolid_Type; | 36 coverageType = Coverage::kSolid_Type; |
37 } else { | 37 } else { |
38 coverageType = Coverage::kAttribute_Type; | 38 coverageType = Coverage::kAttribute_Type; |
39 } | 39 } |
40 Coverage coverage(coverageType); | 40 Coverage coverage(coverageType); |
41 LocalCoords localCoords(usesLocalCoords ? LocalCoords::kUsePosition_Type : | 41 LocalCoords localCoords(usesLocalCoords ? LocalCoords::kUsePosition_Type : |
42 LocalCoords::kUnused_Type); | 42 LocalCoords::kUnused_Type); |
43 return CreateForDeviceSpace(color, coverage, localCoords, viewMatrix); | 43 return CreateForDeviceSpace(color, coverage, localCoords, viewMatrix); |
44 } | 44 } |
45 | 45 |
46 | |
47 void GrAAStrokeRectBatch::initBatchTracker(const GrPipelineOptimizations& opt) { | 46 void GrAAStrokeRectBatch::initBatchTracker(const GrPipelineOptimizations& opt) { |
48 // Handle any color overrides | 47 // Handle any color overrides |
49 if (!opt.readsColor()) { | 48 if (!opt.readsColor()) { |
50 fGeoData[0].fColor = GrColor_ILLEGAL; | 49 fGeoData[0].fColor = GrColor_ILLEGAL; |
51 } | 50 } |
52 opt.getOverrideColorIfSet(&fGeoData[0].fColor); | 51 opt.getOverrideColorIfSet(&fGeoData[0].fColor); |
53 | 52 |
54 // setup batch properties | 53 // setup batch properties |
55 fBatch.fColorIgnored = !opt.readsColor(); | 54 fBatch.fColorIgnored = !opt.readsColor(); |
56 fBatch.fColor = fGeoData[0].fColor; | 55 fBatch.fColor = fGeoData[0].fColor; |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 geo.fColor = GrRandomColor(random); | 372 geo.fColor = GrRandomColor(random); |
374 geo.fDevOutside = outside; | 373 geo.fDevOutside = outside; |
375 geo.fDevOutsideAssist = outsideAssist; | 374 geo.fDevOutsideAssist = outsideAssist; |
376 geo.fDevInside = inside; | 375 geo.fDevInside = inside; |
377 geo.fMiterStroke = miterStroke; | 376 geo.fMiterStroke = miterStroke; |
378 | 377 |
379 return GrAAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random)); | 378 return GrAAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random)); |
380 } | 379 } |
381 | 380 |
382 #endif | 381 #endif |
OLD | NEW |