| 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 | 9 |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 SkPaint paint; | 194 SkPaint paint; |
| 195 paint.setFilterQuality(fFilterQuality); | 195 paint.setFilterQuality(fFilterQuality); |
| 196 | 196 |
| 197 localImg->draw(canvas, | 197 localImg->draw(canvas, |
| 198 SkIntToScalar(localIBounds.fLeft), | 198 SkIntToScalar(localIBounds.fLeft), |
| 199 SkIntToScalar(localIBounds.fTop), | 199 SkIntToScalar(localIBounds.fTop), |
| 200 &paint); | 200 &paint); |
| 201 } | 201 } |
| 202 } | 202 } |
| 203 | 203 |
| 204 int SkPictureImageFilter::numSlowPaths() const { |
| 205 return fPicture ? fPicture->numSlowPaths() : 0; |
| 206 } |
| 207 |
| 204 #ifndef SK_IGNORE_TO_STRING | 208 #ifndef SK_IGNORE_TO_STRING |
| 205 void SkPictureImageFilter::toString(SkString* str) const { | 209 void SkPictureImageFilter::toString(SkString* str) const { |
| 206 str->appendf("SkPictureImageFilter: ("); | 210 str->appendf("SkPictureImageFilter: ("); |
| 207 str->appendf("crop: (%f,%f,%f,%f) ", | 211 str->appendf("crop: (%f,%f,%f,%f) ", |
| 208 fCropRect.fLeft, fCropRect.fTop, fCropRect.fRight, fCropRect.fB
ottom); | 212 fCropRect.fLeft, fCropRect.fTop, fCropRect.fRight, fCropRect.fB
ottom); |
| 209 if (fPicture) { | 213 if (fPicture) { |
| 210 str->appendf("picture: (%f,%f,%f,%f)", | 214 str->appendf("picture: (%f,%f,%f,%f)", |
| 211 fPicture->cullRect().fLeft, fPicture->cullRect().fTop, | 215 fPicture->cullRect().fLeft, fPicture->cullRect().fTop, |
| 212 fPicture->cullRect().fRight, fPicture->cullRect().fBottom); | 216 fPicture->cullRect().fRight, fPicture->cullRect().fBottom); |
| 213 } | 217 } |
| 214 str->append(")"); | 218 str->append(")"); |
| 215 } | 219 } |
| 216 #endif | 220 #endif |
| OLD | NEW |