OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 The Android Open Source Project |
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 | 8 |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkCanvasPriv.h" | 10 #include "SkCanvasPriv.h" |
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1675 } | 1675 } |
1676 | 1676 |
1677 const SkMatrix& SkCanvas::getTotalMatrix() const { | 1677 const SkMatrix& SkCanvas::getTotalMatrix() const { |
1678 return fMCRec->fMatrix; | 1678 return fMCRec->fMatrix; |
1679 } | 1679 } |
1680 | 1680 |
1681 const SkRegion& SkCanvas::internal_private_getTotalClip() const { | 1681 const SkRegion& SkCanvas::internal_private_getTotalClip() const { |
1682 return fMCRec->fRasterClip.forceGetBW(); | 1682 return fMCRec->fRasterClip.forceGetBW(); |
1683 } | 1683 } |
1684 | 1684 |
1685 void SkCanvas::internal_private_getTotalClipAsPath(SkPath* path) const { | |
1686 path->reset(); | |
1687 | |
1688 const SkRegion& rgn = fMCRec->fRasterClip.forceGetBW(); | |
1689 if (rgn.isEmpty()) { | |
1690 return; | |
1691 } | |
1692 (void)rgn.getBoundaryPath(path); | |
1693 } | |
1694 | |
1695 GrRenderTarget* SkCanvas::internal_private_accessTopLayerRenderTarget() { | 1685 GrRenderTarget* SkCanvas::internal_private_accessTopLayerRenderTarget() { |
1696 SkBaseDevice* dev = this->getTopDevice(); | 1686 SkBaseDevice* dev = this->getTopDevice(); |
1697 return dev ? dev->accessRenderTarget() : NULL; | 1687 return dev ? dev->accessRenderTarget() : NULL; |
1698 } | 1688 } |
1699 | 1689 |
1700 SkBaseDevice* SkCanvas::createLayerDevice(const SkImageInfo& info) { | 1690 SkBaseDevice* SkCanvas::createLayerDevice(const SkImageInfo& info) { |
1701 SkBaseDevice* device = this->getTopDevice(); | 1691 SkBaseDevice* device = this->getTopDevice(); |
1702 return device ? device->createCompatibleDeviceForSaveLayer(info) : NULL; | 1692 return device ? device->createCompatibleDeviceForSaveLayer(info) : NULL; |
1703 } | 1693 } |
1704 | 1694 |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2572 } | 2562 } |
2573 | 2563 |
2574 if (NULL != matrix) { | 2564 if (NULL != matrix) { |
2575 canvas->concat(*matrix); | 2565 canvas->concat(*matrix); |
2576 } | 2566 } |
2577 } | 2567 } |
2578 | 2568 |
2579 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2569 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
2580 fCanvas->restoreToCount(fSaveCount); | 2570 fCanvas->restoreToCount(fSaveCount); |
2581 } | 2571 } |
OLD | NEW |