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 "GrAAHairLinePathRenderer.h" | 8 #include "GrAAHairLinePathRenderer.h" |
9 | 9 |
10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 bool antiAlias) const { | 642 bool antiAlias) const { |
643 if (!antiAlias) { | 643 if (!antiAlias) { |
644 return false; | 644 return false; |
645 } | 645 } |
646 | 646 |
647 if (!IsStrokeHairlineOrEquivalent(stroke, viewMatrix, NULL)) { | 647 if (!IsStrokeHairlineOrEquivalent(stroke, viewMatrix, NULL)) { |
648 return false; | 648 return false; |
649 } | 649 } |
650 | 650 |
651 if (SkPath::kLine_SegmentMask == path.getSegmentMasks() || | 651 if (SkPath::kLine_SegmentMask == path.getSegmentMasks() || |
652 target->caps()->shaderDerivativeSupport()) { | 652 target->caps()->shaderCaps()->shaderDerivativeSupport()) { |
653 return true; | 653 return true; |
654 } | 654 } |
655 return false; | 655 return false; |
656 } | 656 } |
657 | 657 |
658 template <class VertexType> | 658 template <class VertexType> |
659 bool check_bounds(const SkMatrix& viewMatrix, const SkRect& devBounds, void* ver
tices, int vCount) | 659 bool check_bounds(const SkMatrix& viewMatrix, const SkRect& devBounds, void* ver
tices, int vCount) |
660 { | 660 { |
661 SkRect tolDevBounds = devBounds; | 661 SkRect tolDevBounds = devBounds; |
662 // The bounds ought to be tight, but in perspective the below code runs the
verts | 662 // The bounds ought to be tight, but in perspective the below code runs the
verts |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 geometry.fPath = path; | 1060 geometry.fPath = path; |
1061 SkDEBUGCODE(geometry.fDevBounds = devRect;) | 1061 SkDEBUGCODE(geometry.fDevBounds = devRect;) |
1062 geometry.fDevClipBounds = devClipBounds; | 1062 geometry.fDevClipBounds = devClipBounds; |
1063 | 1063 |
1064 SkAutoTUnref<GrBatch> batch(AAHairlineBatch::Create(geometry, fLinesIndexBuf
fer, | 1064 SkAutoTUnref<GrBatch> batch(AAHairlineBatch::Create(geometry, fLinesIndexBuf
fer, |
1065 fQuadsIndexBuffer)); | 1065 fQuadsIndexBuffer)); |
1066 target->drawBatch(pipelineBuilder, batch, &devRect); | 1066 target->drawBatch(pipelineBuilder, batch, &devRect); |
1067 | 1067 |
1068 return true; | 1068 return true; |
1069 } | 1069 } |
OLD | NEW |