| 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 "GrTessellatingPathRenderer.h" | 8 #include "GrTessellatingPathRenderer.h" |
| 9 | 9 |
| 10 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
| (...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 static GrDrawBatch* Create(const GrColor& color, | 1390 static GrDrawBatch* Create(const GrColor& color, |
| 1391 const SkPath& path, | 1391 const SkPath& path, |
| 1392 const GrStrokeInfo& stroke, | 1392 const GrStrokeInfo& stroke, |
| 1393 const SkMatrix& viewMatrix, | 1393 const SkMatrix& viewMatrix, |
| 1394 SkRect clipBounds) { | 1394 SkRect clipBounds) { |
| 1395 return new TessellatingPathBatch(color, path, stroke, viewMatrix, clipBo
unds); | 1395 return new TessellatingPathBatch(color, path, stroke, viewMatrix, clipBo
unds); |
| 1396 } | 1396 } |
| 1397 | 1397 |
| 1398 const char* name() const override { return "TessellatingPathBatch"; } | 1398 const char* name() const override { return "TessellatingPathBatch"; } |
| 1399 | 1399 |
| 1400 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { | 1400 void computeBatchToXPOverrides(GrInitInvariantOutput* color, GrInitInvariant
Output* coverage, |
| 1401 out->setKnownFourComponents(fColor); | 1401 bool* usePLSDstRead) const { |
| 1402 } | 1402 color->setKnownFourComponents(fColor); |
| 1403 | 1403 coverage->setUnknownSingleComponent(); |
| 1404 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { | 1404 *usePLSDstRead = false; |
| 1405 out->setUnknownSingleComponent(); | |
| 1406 } | 1405 } |
| 1407 | 1406 |
| 1408 private: | 1407 private: |
| 1409 void initBatchTracker(const GrPipelineOptimizations& opt) override { | 1408 void initBatchTracker(const GrPipelineOptimizations& opt) override { |
| 1410 // Handle any color overrides | 1409 // Handle any color overrides |
| 1411 if (!opt.readsColor()) { | 1410 if (!opt.readsColor()) { |
| 1412 fColor = GrColor_ILLEGAL; | 1411 fColor = GrColor_ILLEGAL; |
| 1413 } | 1412 } |
| 1414 opt.getOverrideColorIfSet(&fColor); | 1413 opt.getOverrideColorIfSet(&fColor); |
| 1415 fPipelineInfo = opt; | 1414 fPipelineInfo = opt; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1654 bool result = viewMatrix.invert(&vmi); | 1653 bool result = viewMatrix.invert(&vmi); |
| 1655 if (!result) { | 1654 if (!result) { |
| 1656 SkFAIL("Cannot invert matrix\n"); | 1655 SkFAIL("Cannot invert matrix\n"); |
| 1657 } | 1656 } |
| 1658 vmi.mapRect(&clipBounds); | 1657 vmi.mapRect(&clipBounds); |
| 1659 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); | 1658 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); |
| 1660 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl
ipBounds); | 1659 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl
ipBounds); |
| 1661 } | 1660 } |
| 1662 | 1661 |
| 1663 #endif | 1662 #endif |
| OLD | NEW |