OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "GrDashingEffect.h" | 8 #include "GrDashingEffect.h" |
9 | 9 |
10 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 } | 268 } |
269 | 269 |
270 const char* name() const override { return "DashBatch"; } | 270 const char* name() const override { return "DashBatch"; } |
271 | 271 |
272 void computePipelineOptimizations(GrInitInvariantOutput* color, | 272 void computePipelineOptimizations(GrInitInvariantOutput* color, |
273 GrInitInvariantOutput* coverage, | 273 GrInitInvariantOutput* coverage, |
274 GrBatchToXPOverrides* overrides) const ove
rride { | 274 GrBatchToXPOverrides* overrides) const ove
rride { |
275 // When this is called on a batch, there is only one geometry bundle | 275 // When this is called on a batch, there is only one geometry bundle |
276 color->setKnownFourComponents(fGeoData[0].fColor); | 276 color->setKnownFourComponents(fGeoData[0].fColor); |
277 coverage->setUnknownSingleComponent(); | 277 coverage->setUnknownSingleComponent(); |
278 overrides->fUsePLSDstRead = false; | |
279 } | 278 } |
280 | 279 |
281 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 280 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
282 | 281 |
283 private: | 282 private: |
284 DashBatch(const Geometry& geometry, SkPaint::Cap cap, DashAAMode aaMode, boo
l fullDash) | 283 DashBatch(const Geometry& geometry, SkPaint::Cap cap, DashAAMode aaMode, boo
l fullDash) |
285 : INHERITED(ClassID()) { | 284 : INHERITED(ClassID()) { |
286 fGeoData.push_back(geometry); | 285 fGeoData.push_back(geometry); |
287 | 286 |
288 fBatch.fAAMode = aaMode; | 287 fBatch.fAAMode = aaMode; |
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1307 info.fIntervals = intervals; | 1306 info.fIntervals = intervals; |
1308 info.fCount = 2; | 1307 info.fCount = 2; |
1309 info.fPhase = phase; | 1308 info.fPhase = phase; |
1310 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); | 1309 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); |
1311 SkASSERT(success); | 1310 SkASSERT(success); |
1312 | 1311 |
1313 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); | 1312 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); |
1314 } | 1313 } |
1315 | 1314 |
1316 #endif | 1315 #endif |
OLD | NEW |