OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 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 "SkImageFilter.h" | 8 #include "SkImageFilter.h" |
9 | 9 |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
11 #include "SkFuzzLogging.h" | 11 #include "SkFuzzLogging.h" |
12 #include "SkImageFilterCache.h" | 12 #include "SkImageFilterCache.h" |
13 #include "SkLocalMatrixImageFilter.h" | 13 #include "SkLocalMatrixImageFilter.h" |
14 #include "SkMatrixImageFilter.h" | 14 #include "SkMatrixImageFilter.h" |
15 #include "SkReadBuffer.h" | 15 #include "SkReadBuffer.h" |
16 #include "SkRect.h" | 16 #include "SkRect.h" |
17 #include "SkSpecialImage.h" | 17 #include "SkSpecialImage.h" |
18 #include "SkSpecialSurface.h" | 18 #include "SkSpecialSurface.h" |
19 #include "SkValidationUtils.h" | 19 #include "SkValidationUtils.h" |
20 #include "SkWriteBuffer.h" | 20 #include "SkWriteBuffer.h" |
21 #if SK_SUPPORT_GPU | 21 #if SK_SUPPORT_GPU |
22 #include "GrContext.h" | 22 #include "GrContext.h" |
23 #include "GrDrawContext.h" | 23 #include "GrDrawContext.h" |
| 24 #include "GrFixedClip.h" |
24 #endif | 25 #endif |
25 | 26 |
26 #ifndef SK_IGNORE_TO_STRING | 27 #ifndef SK_IGNORE_TO_STRING |
27 void SkImageFilter::CropRect::toString(SkString* str) const { | 28 void SkImageFilter::CropRect::toString(SkString* str) const { |
28 if (!fFlags) { | 29 if (!fFlags) { |
29 return; | 30 return; |
30 } | 31 } |
31 | 32 |
32 str->appendf("cropRect ("); | 33 str->appendf("cropRect ("); |
33 if (fFlags & CropRect::kHasLeft_CropEdge) { | 34 if (fFlags & CropRect::kHasLeft_CropEdge) { |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 sk_sp<SkSpecialImage> result(input->filterImage(src, this->mapContext(ctx),
offset)); | 443 sk_sp<SkSpecialImage> result(input->filterImage(src, this->mapContext(ctx),
offset)); |
443 | 444 |
444 SkASSERT(!result || src->isTextureBacked() == result->isTextureBacked()); | 445 SkASSERT(!result || src->isTextureBacked() == result->isTextureBacked()); |
445 | 446 |
446 return result; | 447 return result; |
447 } | 448 } |
448 | 449 |
449 void SkImageFilter::PurgeCache() { | 450 void SkImageFilter::PurgeCache() { |
450 SkImageFilterCache::Get()->purge(); | 451 SkImageFilterCache::Get()->purge(); |
451 } | 452 } |
OLD | NEW |