OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
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 "Test.h" | |
9 #include "SkBicubicImageFilter.h" | 8 #include "SkBicubicImageFilter.h" |
10 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
11 #include "SkBitmapDevice.h" | 10 #include "SkBitmapDevice.h" |
12 #include "SkBitmapSource.h" | 11 #include "SkBitmapSource.h" |
| 12 #include "SkBlurImageFilter.h" |
13 #include "SkCanvas.h" | 13 #include "SkCanvas.h" |
| 14 #include "SkColorFilterImageFilter.h" |
14 #include "SkColorMatrixFilter.h" | 15 #include "SkColorMatrixFilter.h" |
15 #include "SkColorFilterImageFilter.h" | |
16 #include "SkDeviceImageFilterProxy.h" | 16 #include "SkDeviceImageFilterProxy.h" |
17 #include "SkBlurImageFilter.h" | |
18 #include "SkDisplacementMapEffect.h" | 17 #include "SkDisplacementMapEffect.h" |
19 #include "SkDropShadowImageFilter.h" | 18 #include "SkDropShadowImageFilter.h" |
20 #include "SkLightingImageFilter.h" | 19 #include "SkLightingImageFilter.h" |
| 20 #include "SkMatrixConvolutionImageFilter.h" |
21 #include "SkMergeImageFilter.h" | 21 #include "SkMergeImageFilter.h" |
22 #include "SkMorphologyImageFilter.h" | 22 #include "SkMorphologyImageFilter.h" |
23 #include "SkMatrixConvolutionImageFilter.h" | |
24 #include "SkOffsetImageFilter.h" | 23 #include "SkOffsetImageFilter.h" |
| 24 #include "SkRect.h" |
25 #include "SkTileImageFilter.h" | 25 #include "SkTileImageFilter.h" |
26 #include "SkXfermodeImageFilter.h" | 26 #include "SkXfermodeImageFilter.h" |
27 #include "SkRect.h" | 27 #include "Test.h" |
28 | 28 |
29 static const int kBitmapSize = 4; | 29 static const int kBitmapSize = 4; |
30 | 30 |
31 static void make_small_bitmap(SkBitmap& bitmap) { | 31 static void make_small_bitmap(SkBitmap& bitmap) { |
32 bitmap.setConfig(SkBitmap::kARGB_8888_Config, kBitmapSize, kBitmapSize); | 32 bitmap.setConfig(SkBitmap::kARGB_8888_Config, kBitmapSize, kBitmapSize); |
33 bitmap.allocPixels(); | 33 bitmap.allocPixels(); |
34 SkBitmapDevice device(bitmap); | 34 SkBitmapDevice device(bitmap); |
35 SkCanvas canvas(&device); | 35 SkCanvas canvas(&device); |
36 canvas.clear(0x00000000); | 36 canvas.clear(0x00000000); |
37 SkPaint darkPaint; | 37 SkPaint darkPaint; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 SkIPoint offset; | 210 SkIPoint offset; |
211 REPORTER_ASSERT(reporter, filter->filterImage(&proxy, bitmap, SkMatr
ix::I(), &result, &offset)); | 211 REPORTER_ASSERT(reporter, filter->filterImage(&proxy, bitmap, SkMatr
ix::I(), &result, &offset)); |
212 REPORTER_ASSERT(reporter, offset.fX == 20 && offset.fY == 30); | 212 REPORTER_ASSERT(reporter, offset.fX == 20 && offset.fY == 30); |
213 } | 213 } |
214 | 214 |
215 for (size_t i = 0; i < SK_ARRAY_COUNT(filters); ++i) { | 215 for (size_t i = 0; i < SK_ARRAY_COUNT(filters); ++i) { |
216 SkSafeUnref(filters[i]); | 216 SkSafeUnref(filters[i]); |
217 } | 217 } |
218 } | 218 } |
219 } | 219 } |
OLD | NEW |