| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2008 The Android Open Source Project | 3 * Copyright 2008 The Android Open Source Project |
| 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 | 9 |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 } | 1588 } |
| 1589 | 1589 |
| 1590 CHECK_SHADER_NOSETCONTEXT(paint); | 1590 CHECK_SHADER_NOSETCONTEXT(paint); |
| 1591 | 1591 |
| 1592 if (paint.canComputeFastBounds()) { | 1592 if (paint.canComputeFastBounds()) { |
| 1593 SkRect r; | 1593 SkRect r; |
| 1594 // special-case 2 points (common for drawing a single line) | 1594 // special-case 2 points (common for drawing a single line) |
| 1595 if (2 == count) { | 1595 if (2 == count) { |
| 1596 r.set(pts[0], pts[1]); | 1596 r.set(pts[0], pts[1]); |
| 1597 } else { | 1597 } else { |
| 1598 r.set(pts, count); | 1598 r.set(pts, SkToInt(count)); |
| 1599 } | 1599 } |
| 1600 SkRect storage; | 1600 SkRect storage; |
| 1601 if (this->quickReject(paint.computeFastStrokeBounds(r, &storage))) { | 1601 if (this->quickReject(paint.computeFastStrokeBounds(r, &storage))) { |
| 1602 return; | 1602 return; |
| 1603 } | 1603 } |
| 1604 } | 1604 } |
| 1605 | 1605 |
| 1606 SkASSERT(pts != NULL); | 1606 SkASSERT(pts != NULL); |
| 1607 | 1607 |
| 1608 LOOPER_BEGIN(paint, SkDrawFilter::kPoint_Type) | 1608 LOOPER_BEGIN(paint, SkDrawFilter::kPoint_Type) |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2188 return *paint; | 2188 return *paint; |
| 2189 } | 2189 } |
| 2190 | 2190 |
| 2191 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } | 2191 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } |
| 2192 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } | 2192 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } |
| 2193 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } | 2193 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } |
| 2194 | 2194 |
| 2195 /////////////////////////////////////////////////////////////////////////////// | 2195 /////////////////////////////////////////////////////////////////////////////// |
| 2196 | 2196 |
| 2197 SkCanvas::ClipVisitor::~ClipVisitor() { } | 2197 SkCanvas::ClipVisitor::~ClipVisitor() { } |
| OLD | NEW |