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 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1449 return true; | 1449 return true; |
1450 } | 1450 } |
1451 return false; | 1451 return false; |
1452 } | 1452 } |
1453 } | 1453 } |
1454 | 1454 |
1455 bool SkCanvas::quickReject(const SkPath& path) const { | 1455 bool SkCanvas::quickReject(const SkPath& path) const { |
1456 return path.isEmpty() || this->quickReject(path.getBounds()); | 1456 return path.isEmpty() || this->quickReject(path.getBounds()); |
1457 } | 1457 } |
1458 | 1458 |
1459 static inline int pinIntForScalar(int x) { | |
1460 return x; | |
1461 } | |
1462 | |
1463 bool SkCanvas::getClipBounds(SkRect* bounds) const { | 1459 bool SkCanvas::getClipBounds(SkRect* bounds) const { |
1464 SkIRect ibounds; | 1460 SkIRect ibounds; |
1465 if (!getClipDeviceBounds(&ibounds)) { | 1461 if (!getClipDeviceBounds(&ibounds)) { |
1466 return false; | 1462 return false; |
1467 } | 1463 } |
1468 | 1464 |
1469 SkMatrix inverse; | 1465 SkMatrix inverse; |
1470 // if we can't invert the CTM, we can't return local clip bounds | 1466 // if we can't invert the CTM, we can't return local clip bounds |
1471 if (!fMCRec->fMatrix->invert(&inverse)) { | 1467 if (!fMCRec->fMatrix->invert(&inverse)) { |
1472 if (bounds) { | 1468 if (bounds) { |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2189 return *paint; | 2185 return *paint; |
2190 } | 2186 } |
2191 | 2187 |
2192 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } | 2188 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } |
2193 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } | 2189 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } |
2194 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } | 2190 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } |
2195 | 2191 |
2196 /////////////////////////////////////////////////////////////////////////////// | 2192 /////////////////////////////////////////////////////////////////////////////// |
2197 | 2193 |
2198 SkCanvas::ClipVisitor::~ClipVisitor() { } | 2194 SkCanvas::ClipVisitor::~ClipVisitor() { } |
OLD | NEW |