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 "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 } else { | 679 } else { |
680 if (!viewMatrix.invert(&localMatrix)) { | 680 if (!viewMatrix.invert(&localMatrix)) { |
681 return false; | 681 return false; |
682 } | 682 } |
683 } | 683 } |
684 } else { | 684 } else { |
685 bounds = path.getBounds(); | 685 bounds = path.getBounds(); |
686 } | 686 } |
687 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S
kMatrix::I() : | 687 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S
kMatrix::I() : |
688 v
iewMatrix; | 688 v
iewMatrix; |
689 target->drawBWRect(*pipelineBuilder, color, viewM, bounds, localMatr
ix); | 689 target->drawNonAARect(*pipelineBuilder, color, viewM, bounds, localM
atrix); |
690 } else { | 690 } else { |
691 if (passCount > 1) { | 691 if (passCount > 1) { |
692 pipelineBuilder->setDisableColorXPFactory(); | 692 pipelineBuilder->setDisableColorXPFactory(); |
693 } | 693 } |
694 | 694 |
695 DefaultPathBatch::Geometry geometry; | 695 DefaultPathBatch::Geometry geometry; |
696 geometry.fColor = color; | 696 geometry.fColor = color; |
697 geometry.fPath = path; | 697 geometry.fPath = path; |
698 geometry.fTolerance = srcSpaceTol; | 698 geometry.fTolerance = srcSpaceTol; |
699 | 699 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 geometry.fColor = color; | 753 geometry.fColor = color; |
754 geometry.fPath = path; | 754 geometry.fPath = path; |
755 geometry.fTolerance = srcSpaceTol; | 755 geometry.fTolerance = srcSpaceTol; |
756 | 756 |
757 viewMatrix.mapRect(&bounds); | 757 viewMatrix.mapRect(&bounds); |
758 uint8_t coverage = GrRandomCoverage(random); | 758 uint8_t coverage = GrRandomCoverage(random); |
759 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds
); | 759 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds
); |
760 } | 760 } |
761 | 761 |
762 #endif | 762 #endif |
OLD | NEW |