OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The Android Open Source Project | 2 * Copyright 2013 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 #include "SkPictureImageFilter.h" | 8 #include "SkPictureImageFilter.h" |
9 #include "SkDevice.h" | 9 #include "SkDevice.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
11 #include "SkReadBuffer.h" | 11 #include "SkReadBuffer.h" |
12 #include "SkWriteBuffer.h" | 12 #include "SkWriteBuffer.h" |
13 #include "SkValidationUtils.h" | 13 #include "SkValidationUtils.h" |
14 | 14 |
15 SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, uint32_t un
iqueID) | 15 SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, uint32_t un
iqueID) |
16 : INHERITED(0, 0, NULL, uniqueID) | 16 : INHERITED(0, 0, NULL, uniqueID) |
17 , fPicture(SkSafeRef(picture)) | 17 , fPicture(SkSafeRef(picture)) |
18 , fCropRect(NULL != picture ? picture->cullRect() : SkRect::MakeEmpty()) { | 18 , fCropRect(picture ? picture->cullRect() : SkRect::MakeEmpty()) { |
19 } | 19 } |
20 | 20 |
21 SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, const SkRec
t& cropRect, | 21 SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, const SkRec
t& cropRect, |
22 uint32_t uniqueID) | 22 uint32_t uniqueID) |
23 : INHERITED(0, 0, NULL, uniqueID) | 23 : INHERITED(0, 0, NULL, uniqueID) |
24 , fPicture(SkSafeRef(picture)) | 24 , fPicture(SkSafeRef(picture)) |
25 , fCropRect(cropRect) { | 25 , fCropRect(cropRect) { |
26 } | 26 } |
27 | 27 |
28 SkPictureImageFilter::~SkPictureImageFilter() { | 28 SkPictureImageFilter::~SkPictureImageFilter() { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 offset->fY = bounds.fTop; | 110 offset->fY = bounds.fTop; |
111 return true; | 111 return true; |
112 } | 112 } |
113 | 113 |
114 bool SkPictureImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ct
m, | 114 bool SkPictureImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ct
m, |
115 SkIRect* dst) const { | 115 SkIRect* dst) const { |
116 *dst = src; | 116 *dst = src; |
117 return true; | 117 return true; |
118 } | 118 } |
119 | 119 |
OLD | NEW |