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 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1713 return; | 1713 return; |
1714 } | 1714 } |
1715 } | 1715 } |
1716 if (path.isEmpty()) { | 1716 if (path.isEmpty()) { |
1717 if (path.isInverseFillType()) { | 1717 if (path.isInverseFillType()) { |
1718 this->internalDrawPaint(paint); | 1718 this->internalDrawPaint(paint); |
1719 } | 1719 } |
1720 return; | 1720 return; |
1721 } | 1721 } |
1722 | 1722 |
1723 // if the path is a rect, we can call drawRect to try GrAARectRenderer. | |
bsalomon
2013/08/29 12:49:58
This comment is specific to SkGpuDevice, perhaps i
| |
1724 SkRect rect; | |
1725 if (path.isRect(&rect)) { | |
1726 drawRect(rect, paint); | |
bsalomon
2013/08/29 12:49:58
style-nit:
this->drawRect(...);
| |
1727 return; | |
1728 } | |
1729 | |
1723 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type) | 1730 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type) |
1724 | 1731 |
1725 while (iter.next()) { | 1732 while (iter.next()) { |
1726 iter.fDevice->drawPath(iter, path, looper.paint()); | 1733 iter.fDevice->drawPath(iter, path, looper.paint()); |
1727 } | 1734 } |
1728 | 1735 |
1729 LOOPER_END | 1736 LOOPER_END |
1730 } | 1737 } |
1731 | 1738 |
1732 void SkCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, | 1739 void SkCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2222 return *paint; | 2229 return *paint; |
2223 } | 2230 } |
2224 | 2231 |
2225 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } | 2232 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } |
2226 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } | 2233 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } |
2227 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } | 2234 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } |
2228 | 2235 |
2229 /////////////////////////////////////////////////////////////////////////////// | 2236 /////////////////////////////////////////////////////////////////////////////// |
2230 | 2237 |
2231 SkCanvas::ClipVisitor::~ClipVisitor() { } | 2238 SkCanvas::ClipVisitor::~ClipVisitor() { } |
OLD | NEW |