| 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 | |
| 9 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 10 #include "SkBitmapDevice.h" | 9 #include "SkBitmapDevice.h" |
| 11 #include "SkDeviceImageFilterProxy.h" | 10 #include "SkDeviceImageFilterProxy.h" |
| 12 #include "SkDraw.h" | 11 #include "SkDraw.h" |
| 13 #include "SkDrawFilter.h" | 12 #include "SkDrawFilter.h" |
| 14 #include "SkDrawLooper.h" | 13 #include "SkDrawLooper.h" |
| 15 #include "SkMetaData.h" | 14 #include "SkMetaData.h" |
| 16 #include "SkPathOps.h" | 15 #include "SkPathOps.h" |
| 17 #include "SkPicture.h" | 16 #include "SkPicture.h" |
| 18 #include "SkRasterClip.h" | 17 #include "SkRasterClip.h" |
| (...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1766 if (fMCRec->fRasterClip->isEmpty()) { | 1765 if (fMCRec->fRasterClip->isEmpty()) { |
| 1767 return kEmpty_ClipType; | 1766 return kEmpty_ClipType; |
| 1768 } | 1767 } |
| 1769 if (fMCRec->fRasterClip->isRect()) { | 1768 if (fMCRec->fRasterClip->isRect()) { |
| 1770 return kRect_ClipType; | 1769 return kRect_ClipType; |
| 1771 } | 1770 } |
| 1772 return kComplex_ClipType; | 1771 return kComplex_ClipType; |
| 1773 } | 1772 } |
| 1774 #endif | 1773 #endif |
| 1775 | 1774 |
| 1776 #ifdef SK_SUPPORT_LEGACY_GETTOTALCLIP | |
| 1777 const SkRegion& SkCanvas::getTotalClip() const { | |
| 1778 return fMCRec->fRasterClip->forceGetBW(); | |
| 1779 } | |
| 1780 #endif | |
| 1781 | |
| 1782 const SkRegion& SkCanvas::internal_private_getTotalClip() const { | 1775 const SkRegion& SkCanvas::internal_private_getTotalClip() const { |
| 1783 return fMCRec->fRasterClip->forceGetBW(); | 1776 return fMCRec->fRasterClip->forceGetBW(); |
| 1784 } | 1777 } |
| 1785 | 1778 |
| 1786 void SkCanvas::internal_private_getTotalClipAsPath(SkPath* path) const { | 1779 void SkCanvas::internal_private_getTotalClipAsPath(SkPath* path) const { |
| 1787 path->reset(); | 1780 path->reset(); |
| 1788 | 1781 |
| 1789 const SkRegion& rgn = fMCRec->fRasterClip->forceGetBW(); | 1782 const SkRegion& rgn = fMCRec->fRasterClip->forceGetBW(); |
| 1790 if (rgn.isEmpty()) { | 1783 if (rgn.isEmpty()) { |
| 1791 return; | 1784 return; |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2588 if (!supported_for_raster_canvas(info)) { | 2581 if (!supported_for_raster_canvas(info)) { |
| 2589 return NULL; | 2582 return NULL; |
| 2590 } | 2583 } |
| 2591 | 2584 |
| 2592 SkBitmap bitmap; | 2585 SkBitmap bitmap; |
| 2593 if (!bitmap.installPixels(info, pixels, rowBytes)) { | 2586 if (!bitmap.installPixels(info, pixels, rowBytes)) { |
| 2594 return NULL; | 2587 return NULL; |
| 2595 } | 2588 } |
| 2596 return SkNEW_ARGS(SkCanvas, (bitmap)); | 2589 return SkNEW_ARGS(SkCanvas, (bitmap)); |
| 2597 } | 2590 } |
| OLD | NEW |