| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 GrColor fColor; | 260 GrColor fColor; |
| 261 }; | 261 }; |
| 262 | 262 |
| 263 static GrDrawBatch* Create(const Geometry& geometry, SkPaint::Cap cap, DashA
AMode aaMode, | 263 static GrDrawBatch* Create(const Geometry& geometry, SkPaint::Cap cap, DashA
AMode aaMode, |
| 264 bool fullDash) { | 264 bool fullDash) { |
| 265 return new DashBatch(geometry, cap, aaMode, fullDash); | 265 return new DashBatch(geometry, cap, aaMode, fullDash); |
| 266 } | 266 } |
| 267 | 267 |
| 268 const char* name() const override { return "DashBatch"; } | 268 const char* name() const override { return "DashBatch"; } |
| 269 | 269 |
| 270 void computePipelineOptimizations(GrInitInvariantOutput* color, | 270 void computePipelineOptimizations(GrInitInvariantOutput* color, |
| 271 GrInitInvariantOutput* coverage, | 271 GrInitInvariantOutput* coverage, |
| 272 GrBatchToXPOverrides* overrides) const ove
rride { | 272 GrBatchToXPOverrides* overrides) const ove
rride { |
| 273 // When this is called on a batch, there is only one geometry bundle | 273 // When this is called on a batch, there is only one geometry bundle |
| 274 color->setKnownFourComponents(fGeoData[0].fColor); | 274 color->setKnownFourComponents(fGeoData[0].fColor); |
| 275 coverage->setUnknownSingleComponent(); | 275 coverage->setUnknownSingleComponent(); |
| 276 } | 276 } |
| 277 | 277 |
| 278 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 278 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
| 279 | 279 |
| 280 private: | 280 private: |
| (...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 info.fIntervals = intervals; | 1298 info.fIntervals = intervals; |
| 1299 info.fCount = 2; | 1299 info.fCount = 2; |
| 1300 info.fPhase = phase; | 1300 info.fPhase = phase; |
| 1301 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); | 1301 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); |
| 1302 SkASSERT(success); | 1302 SkASSERT(success); |
| 1303 | 1303 |
| 1304 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); | 1304 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); |
| 1305 } | 1305 } |
| 1306 | 1306 |
| 1307 #endif | 1307 #endif |
| OLD | NEW |