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 "GrBatchTarget.h" | 10 #include "GrBatchTarget.h" |
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 return true; | 1353 return true; |
1354 } | 1354 } |
1355 return false; | 1355 return false; |
1356 } | 1356 } |
1357 | 1357 |
1358 }; | 1358 }; |
1359 | 1359 |
1360 GrTessellatingPathRenderer::GrTessellatingPathRenderer() { | 1360 GrTessellatingPathRenderer::GrTessellatingPathRenderer() { |
1361 } | 1361 } |
1362 | 1362 |
1363 GrPathRenderer::StencilSupport GrTessellatingPathRenderer::onGetStencilSupport( | |
1364 const GrDrawTarget*, | |
1365 const GrPipelineBuil
der*, | |
1366 const SkPath&, | |
1367 const GrStrokeInfo&)
const { | |
1368 return GrPathRenderer::kNoSupport_StencilSupport; | |
1369 } | |
1370 | |
1371 namespace { | 1363 namespace { |
1372 | 1364 |
1373 // When the SkPathRef genID changes, invalidate a corresponding GrResource descr
ibed by key. | 1365 // When the SkPathRef genID changes, invalidate a corresponding GrResource descr
ibed by key. |
1374 class PathInvalidator : public SkPathRef::GenIDChangeListener { | 1366 class PathInvalidator : public SkPathRef::GenIDChangeListener { |
1375 public: | 1367 public: |
1376 explicit PathInvalidator(const GrUniqueKey& key) : fMsg(key) {} | 1368 explicit PathInvalidator(const GrUniqueKey& key) : fMsg(key) {} |
1377 private: | 1369 private: |
1378 GrUniqueKeyInvalidatedMessage fMsg; | 1370 GrUniqueKeyInvalidatedMessage fMsg; |
1379 | 1371 |
1380 void onChange() override { | 1372 void onChange() override { |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1651 bool result = viewMatrix.invert(&vmi); | 1643 bool result = viewMatrix.invert(&vmi); |
1652 if (!result) { | 1644 if (!result) { |
1653 SkFAIL("Cannot invert matrix\n"); | 1645 SkFAIL("Cannot invert matrix\n"); |
1654 } | 1646 } |
1655 vmi.mapRect(&clipBounds); | 1647 vmi.mapRect(&clipBounds); |
1656 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); | 1648 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); |
1657 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl
ipBounds); | 1649 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl
ipBounds); |
1658 } | 1650 } |
1659 | 1651 |
1660 #endif | 1652 #endif |
OLD | NEW |