OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrAtlasTextContext.h" | 9 #include "GrAtlasTextContext.h" |
10 #include "GrBatchTest.h" | 10 #include "GrBatchTest.h" |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 allGoE1 = false; | 649 allGoE1 = false; |
650 } | 650 } |
651 if (!SkScalarNearlyEqual(margin, temp)) { | 651 if (!SkScalarNearlyEqual(margin, temp)) { |
652 allEq = false; | 652 allEq = false; |
653 } | 653 } |
654 } | 654 } |
655 | 655 |
656 return allEq || allGoE1; | 656 return allEq || allGoE1; |
657 } | 657 } |
658 | 658 |
| 659 void GrDrawContext::drawBatch(GrRenderTarget* rt, const GrClip& clip, |
| 660 const GrPaint& paint, GrBatch* batch) { |
| 661 RETURN_IF_ABANDONED |
| 662 |
| 663 AutoCheckFlush acf(fContext); |
| 664 if (!this->prepareToDraw(rt)) { |
| 665 return; |
| 666 } |
| 667 |
| 668 GrPipelineBuilder pipelineBuilder(paint, rt, clip); |
| 669 fDrawTarget->drawBatch(pipelineBuilder, batch); |
| 670 } |
| 671 |
659 void GrDrawContext::drawPath(GrRenderTarget* rt, | 672 void GrDrawContext::drawPath(GrRenderTarget* rt, |
660 const GrClip& clip, | 673 const GrClip& clip, |
661 const GrPaint& paint, | 674 const GrPaint& paint, |
662 const SkMatrix& viewMatrix, | 675 const SkMatrix& viewMatrix, |
663 const SkPath& path, | 676 const SkPath& path, |
664 const GrStrokeInfo& strokeInfo) { | 677 const GrStrokeInfo& strokeInfo) { |
665 RETURN_IF_ABANDONED | 678 RETURN_IF_ABANDONED |
666 if (path.isEmpty()) { | 679 if (path.isEmpty()) { |
667 if (path.isInverseFillType()) { | 680 if (path.isInverseFillType()) { |
668 this->drawPaint(rt, clip, paint, viewMatrix); | 681 this->drawPaint(rt, clip, paint, viewMatrix); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 RETURN_FALSE_IF_ABANDONED | 824 RETURN_FALSE_IF_ABANDONED |
812 | 825 |
813 ASSERT_OWNED_RESOURCE(rt); | 826 ASSERT_OWNED_RESOURCE(rt); |
814 SkASSERT(rt); | 827 SkASSERT(rt); |
815 return true; | 828 return true; |
816 } | 829 } |
817 | 830 |
818 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch
) { | 831 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch
) { |
819 fDrawTarget->drawBatch(*pipelineBuilder, batch); | 832 fDrawTarget->drawBatch(*pipelineBuilder, batch); |
820 } | 833 } |
OLD | NEW |