| 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 "GrBatch.h" | 10 #include "GrBatch.h" |
| (...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(color, path, viewM
, clipBounds)); | 1513 SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(color, path, viewM
, clipBounds)); |
| 1514 target->drawBatch(pipelineBuilder, batch); | 1514 target->drawBatch(pipelineBuilder, batch); |
| 1515 | 1515 |
| 1516 return true; | 1516 return true; |
| 1517 } | 1517 } |
| 1518 | 1518 |
| 1519 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 1519 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 1520 | 1520 |
| 1521 #ifdef GR_TEST_UTILS | 1521 #ifdef GR_TEST_UTILS |
| 1522 | 1522 |
| 1523 BATCH_TEST_DEFINE(TesselatingPathRenderer) { | 1523 BATCH_TEST_DEFINE(TesselatingPathBatch) { |
| 1524 GrColor color = GrRandomColor(random); | 1524 GrColor color = GrRandomColor(random); |
| 1525 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); | 1525 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); |
| 1526 SkPath path = GrTest::TestPath(random); | 1526 SkPath path = GrTest::TestPath(random); |
| 1527 SkRect clipBounds = GrTest::TestRect(random); | 1527 SkRect clipBounds = GrTest::TestRect(random); |
| 1528 SkMatrix vmi; | 1528 SkMatrix vmi; |
| 1529 bool result = viewMatrix.invert(&vmi); | 1529 bool result = viewMatrix.invert(&vmi); |
| 1530 if (!result) { | 1530 if (!result) { |
| 1531 SkFAIL("Cannot invert matrix\n"); | 1531 SkFAIL("Cannot invert matrix\n"); |
| 1532 } | 1532 } |
| 1533 vmi.mapRect(&clipBounds); | 1533 vmi.mapRect(&clipBounds); |
| 1534 return TessellatingPathBatch::Create(color, path, viewMatrix, clipBounds); | 1534 return TessellatingPathBatch::Create(color, path, viewMatrix, clipBounds); |
| 1535 } | 1535 } |
| 1536 | 1536 |
| 1537 #endif | 1537 #endif |
| OLD | NEW |