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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 const SkStrokeRec& stroke, | 583 const SkStrokeRec& stroke, |
584 SkRect rects[2]) { | 584 SkRect rects[2]) { |
585 SkASSERT(stroke.isFillStyle()); | 585 SkASSERT(stroke.isFillStyle()); |
586 | 586 |
587 if (path.isInverseFillType()) { | 587 if (path.isInverseFillType()) { |
588 return false; | 588 return false; |
589 } | 589 } |
590 | 590 |
591 // TODO: this restriction could be lifted if we were willing to apply | 591 // TODO: this restriction could be lifted if we were willing to apply |
592 // the matrix to all the points individually rather than just to the rect | 592 // the matrix to all the points individually rather than just to the rect |
593 if (!viewMatrix.preservesAxisAlignment()) { | 593 if (!viewMatrix.rectStaysRect()) { |
594 return false; | 594 return false; |
595 } | 595 } |
596 | 596 |
597 SkPath::Direction dirs[2]; | 597 SkPath::Direction dirs[2]; |
598 if (!path.isNestedFillRects(rects, dirs)) { | 598 if (!path.isNestedFillRects(rects, dirs)) { |
599 return false; | 599 return false; |
600 } | 600 } |
601 | 601 |
602 if (SkPath::kWinding_FillType == path.getFillType() && dirs[0] == dirs[1]) { | 602 if (SkPath::kWinding_FillType == path.getFillType() && dirs[0] == dirs[1]) { |
603 // The two rects need to be wound opposite to each other | 603 // The two rects need to be wound opposite to each other |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 args.fAntiAlias = useCoverageAA; | 796 args.fAntiAlias = useCoverageAA; |
797 pr->drawPath(args); | 797 pr->drawPath(args); |
798 } | 798 } |
799 | 799 |
800 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b
atch) { | 800 void GrDrawContext::drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* b
atch) { |
801 RETURN_IF_ABANDONED | 801 RETURN_IF_ABANDONED |
802 SkDEBUGCODE(this->validate();) | 802 SkDEBUGCODE(this->validate();) |
803 | 803 |
804 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); | 804 this->getDrawTarget()->drawBatch(*pipelineBuilder, batch); |
805 } | 805 } |
OLD | NEW |