| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrDefaultPathRenderer.h" | 8 #include "GrDefaultPathRenderer.h" |
| 9 | 9 |
| 10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 } else { | 672 } else { |
| 673 if (!viewMatrix.invert(&localMatrix)) { | 673 if (!viewMatrix.invert(&localMatrix)) { |
| 674 return false; | 674 return false; |
| 675 } | 675 } |
| 676 } | 676 } |
| 677 } else { | 677 } else { |
| 678 bounds = path.getBounds(); | 678 bounds = path.getBounds(); |
| 679 } | 679 } |
| 680 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S
kMatrix::I() : | 680 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S
kMatrix::I() : |
| 681 v
iewMatrix; | 681 v
iewMatrix; |
| 682 target->drawRect(pipelineBuilder, color, viewM, bounds, NULL, &local
Matrix); | 682 target->drawBWRect(pipelineBuilder, color, viewM, bounds, NULL, &loc
alMatrix); |
| 683 } else { | 683 } else { |
| 684 if (passCount > 1) { | 684 if (passCount > 1) { |
| 685 pipelineBuilder->setDisableColorXPFactory(); | 685 pipelineBuilder->setDisableColorXPFactory(); |
| 686 } | 686 } |
| 687 | 687 |
| 688 DefaultPathBatch::Geometry geometry; | 688 DefaultPathBatch::Geometry geometry; |
| 689 geometry.fColor = color; | 689 geometry.fColor = color; |
| 690 geometry.fPath = path; | 690 geometry.fPath = path; |
| 691 geometry.fTolerance = srcSpaceTol; | 691 geometry.fTolerance = srcSpaceTol; |
| 692 | 692 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 geometry.fColor = color; | 759 geometry.fColor = color; |
| 760 geometry.fPath = path; | 760 geometry.fPath = path; |
| 761 geometry.fTolerance = srcSpaceTol; | 761 geometry.fTolerance = srcSpaceTol; |
| 762 | 762 |
| 763 viewMatrix.mapRect(&bounds); | 763 viewMatrix.mapRect(&bounds); |
| 764 uint8_t coverage = GrRandomCoverage(random); | 764 uint8_t coverage = GrRandomCoverage(random); |
| 765 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds
); | 765 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds
); |
| 766 } | 766 } |
| 767 | 767 |
| 768 #endif | 768 #endif |
| OLD | NEW |