senorblanco@chromium.org | 194d775 | 2013-07-24 22:19:24 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
commit-bot@chromium.org | 4b681bc | 2013-09-13 12:40:02 +0000 | [diff] [blame] | 8 | #include "SkBicubicImageFilter.h" |
| 9 | #include "SkBitmap.h" |
| 10 | #include "SkBitmapDevice.h" |
| 11 | #include "SkBitmapSource.h" |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 12 | #include "SkBlurImageFilter.h" |
tfarina@chromium.org | 8f6884a | 2014-01-24 20:56:26 +0000 | [diff] [blame] | 13 | #include "SkCanvas.h" |
| 14 | #include "SkColorFilterImageFilter.h" |
| 15 | #include "SkColorMatrixFilter.h" |
| 16 | #include "SkDeviceImageFilterProxy.h" |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 17 | #include "SkDisplacementMapEffect.h" |
| 18 | #include "SkDropShadowImageFilter.h" |
senorblanco@chromium.org | 5251e2b | 2014-02-05 22:36:31 +0000 | [diff] [blame^] | 19 | #include "SkFlattenableBuffers.h" |
commit-bot@chromium.org | 4b681bc | 2013-09-13 12:40:02 +0000 | [diff] [blame] | 20 | #include "SkLightingImageFilter.h" |
tfarina@chromium.org | 8f6884a | 2014-01-24 20:56:26 +0000 | [diff] [blame] | 21 | #include "SkMatrixConvolutionImageFilter.h" |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 22 | #include "SkMergeImageFilter.h" |
| 23 | #include "SkMorphologyImageFilter.h" |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 24 | #include "SkOffsetImageFilter.h" |
senorblanco@chromium.org | 5251e2b | 2014-02-05 22:36:31 +0000 | [diff] [blame^] | 25 | #include "SkPicture.h" |
tfarina@chromium.org | 8f6884a | 2014-01-24 20:56:26 +0000 | [diff] [blame] | 26 | #include "SkRect.h" |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 27 | #include "SkTileImageFilter.h" |
| 28 | #include "SkXfermodeImageFilter.h" |
tfarina@chromium.org | 8f6884a | 2014-01-24 20:56:26 +0000 | [diff] [blame] | 29 | #include "Test.h" |
senorblanco@chromium.org | 194d775 | 2013-07-24 22:19:24 +0000 | [diff] [blame] | 30 | |
senorblanco@chromium.org | aba651c | 2014-02-03 22:22:16 +0000 | [diff] [blame] | 31 | #if SK_SUPPORT_GPU |
| 32 | #include "GrContextFactory.h" |
| 33 | #include "SkGpuDevice.h" |
| 34 | #endif |
| 35 | |
tfarina@chromium.org | 9f9d582 | 2013-12-18 22:15:12 +0000 | [diff] [blame] | 36 | static const int kBitmapSize = 4; |
commit-bot@chromium.org | 4b681bc | 2013-09-13 12:40:02 +0000 | [diff] [blame] | 37 | |
senorblanco@chromium.org | 5251e2b | 2014-02-05 22:36:31 +0000 | [diff] [blame^] | 38 | namespace { |
| 39 | |
| 40 | class MatrixTestImageFilter : public SkImageFilter { |
| 41 | public: |
| 42 | MatrixTestImageFilter(skiatest::Reporter* reporter, const SkMatrix& expectedMatrix) |
| 43 | : SkImageFilter(0), fReporter(reporter), fExpectedMatrix(expectedMatrix) { |
| 44 | } |
| 45 | |
| 46 | virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix& ctm, |
| 47 | SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { |
| 48 | REPORTER_ASSERT(fReporter, ctm == fExpectedMatrix); |
| 49 | return true; |
| 50 | } |
| 51 | |
| 52 | SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(MatrixTestImageFilter) |
| 53 | |
| 54 | protected: |
| 55 | explicit MatrixTestImageFilter(SkReadBuffer& buffer) : SkImageFilter(0) { |
| 56 | fReporter = static_cast<skiatest::Reporter*>(buffer.readFunctionPtr()); |
| 57 | buffer.readMatrix(&fExpectedMatrix); |
| 58 | } |
| 59 | |
| 60 | virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { |
| 61 | buffer.writeFunctionPtr(fReporter); |
| 62 | buffer.writeMatrix(fExpectedMatrix); |
| 63 | } |
| 64 | |
| 65 | private: |
| 66 | skiatest::Reporter* fReporter; |
| 67 | SkMatrix fExpectedMatrix; |
| 68 | }; |
| 69 | |
| 70 | } |
| 71 | |
tfarina@chromium.org | 9f9d582 | 2013-12-18 22:15:12 +0000 | [diff] [blame] | 72 | static void make_small_bitmap(SkBitmap& bitmap) { |
| 73 | bitmap.setConfig(SkBitmap::kARGB_8888_Config, kBitmapSize, kBitmapSize); |
| 74 | bitmap.allocPixels(); |
| 75 | SkBitmapDevice device(bitmap); |
| 76 | SkCanvas canvas(&device); |
| 77 | canvas.clear(0x00000000); |
| 78 | SkPaint darkPaint; |
| 79 | darkPaint.setColor(0xFF804020); |
| 80 | SkPaint lightPaint; |
| 81 | lightPaint.setColor(0xFF244484); |
| 82 | const int i = kBitmapSize / 4; |
| 83 | for (int y = 0; y < kBitmapSize; y += i) { |
| 84 | for (int x = 0; x < kBitmapSize; x += i) { |
| 85 | canvas.save(); |
| 86 | canvas.translate(SkIntToScalar(x), SkIntToScalar(y)); |
| 87 | canvas.drawRect(SkRect::MakeXYWH(0, 0, |
| 88 | SkIntToScalar(i), |
| 89 | SkIntToScalar(i)), darkPaint); |
| 90 | canvas.drawRect(SkRect::MakeXYWH(SkIntToScalar(i), |
| 91 | 0, |
| 92 | SkIntToScalar(i), |
| 93 | SkIntToScalar(i)), lightPaint); |
| 94 | canvas.drawRect(SkRect::MakeXYWH(0, |
| 95 | SkIntToScalar(i), |
| 96 | SkIntToScalar(i), |
| 97 | SkIntToScalar(i)), lightPaint); |
| 98 | canvas.drawRect(SkRect::MakeXYWH(SkIntToScalar(i), |
| 99 | SkIntToScalar(i), |
| 100 | SkIntToScalar(i), |
| 101 | SkIntToScalar(i)), darkPaint); |
| 102 | canvas.restore(); |
commit-bot@chromium.org | 4b681bc | 2013-09-13 12:40:02 +0000 | [diff] [blame] | 103 | } |
| 104 | } |
tfarina@chromium.org | 9f9d582 | 2013-12-18 22:15:12 +0000 | [diff] [blame] | 105 | } |
senorblanco@chromium.org | 194d775 | 2013-07-24 22:19:24 +0000 | [diff] [blame] | 106 | |
tfarina@chromium.org | 9f9d582 | 2013-12-18 22:15:12 +0000 | [diff] [blame] | 107 | static SkImageFilter* make_scale(float amount, SkImageFilter* input = NULL) { |
| 108 | SkScalar s = amount; |
| 109 | SkScalar matrix[20] = { s, 0, 0, 0, 0, |
| 110 | 0, s, 0, 0, 0, |
| 111 | 0, 0, s, 0, 0, |
| 112 | 0, 0, 0, s, 0 }; |
| 113 | SkAutoTUnref<SkColorFilter> filter(new SkColorMatrixFilter(matrix)); |
| 114 | return SkColorFilterImageFilter::Create(filter, input); |
| 115 | } |
| 116 | |
| 117 | static SkImageFilter* make_grayscale(SkImageFilter* input = NULL, const SkImageFilter::CropRect* cropRect = NULL) { |
| 118 | SkScalar matrix[20]; |
| 119 | memset(matrix, 0, 20 * sizeof(SkScalar)); |
| 120 | matrix[0] = matrix[5] = matrix[10] = 0.2126f; |
| 121 | matrix[1] = matrix[6] = matrix[11] = 0.7152f; |
| 122 | matrix[2] = matrix[7] = matrix[12] = 0.0722f; |
| 123 | matrix[18] = 1.0f; |
| 124 | SkAutoTUnref<SkColorFilter> filter(new SkColorMatrixFilter(matrix)); |
| 125 | return SkColorFilterImageFilter::Create(filter, input, cropRect); |
| 126 | } |
| 127 | |
| 128 | DEF_TEST(ImageFilter, reporter) { |
| 129 | { |
| 130 | // Check that two non-clipping color matrices concatenate into a single filter. |
| 131 | SkAutoTUnref<SkImageFilter> halfBrightness(make_scale(0.5f)); |
| 132 | SkAutoTUnref<SkImageFilter> quarterBrightness(make_scale(0.5f, halfBrightness)); |
| 133 | REPORTER_ASSERT(reporter, NULL == quarterBrightness->getInput(0)); |
senorblanco@chromium.org | 194d775 | 2013-07-24 22:19:24 +0000 | [diff] [blame] | 134 | } |
| 135 | |
tfarina@chromium.org | 9f9d582 | 2013-12-18 22:15:12 +0000 | [diff] [blame] | 136 | { |
| 137 | // Check that a clipping color matrix followed by a grayscale does not concatenate into a single filter. |
| 138 | SkAutoTUnref<SkImageFilter> doubleBrightness(make_scale(2.0f)); |
| 139 | SkAutoTUnref<SkImageFilter> halfBrightness(make_scale(0.5f, doubleBrightness)); |
| 140 | REPORTER_ASSERT(reporter, NULL != halfBrightness->getInput(0)); |
senorblanco@chromium.org | 194d775 | 2013-07-24 22:19:24 +0000 | [diff] [blame] | 141 | } |
| 142 | |
tfarina@chromium.org | 9f9d582 | 2013-12-18 22:15:12 +0000 | [diff] [blame] | 143 | { |
| 144 | // Check that a color filter image filter without a crop rect can be |
| 145 | // expressed as a color filter. |
| 146 | SkAutoTUnref<SkImageFilter> gray(make_grayscale()); |
| 147 | REPORTER_ASSERT(reporter, true == gray->asColorFilter(NULL)); |
senorblanco@chromium.org | 194d775 | 2013-07-24 22:19:24 +0000 | [diff] [blame] | 148 | } |
| 149 | |
tfarina@chromium.org | 9f9d582 | 2013-12-18 22:15:12 +0000 | [diff] [blame] | 150 | { |
| 151 | // Check that a color filter image filter with a crop rect cannot |
| 152 | // be expressed as a color filter. |
| 153 | SkImageFilter::CropRect cropRect(SkRect::MakeXYWH(0, 0, 100, 100)); |
| 154 | SkAutoTUnref<SkImageFilter> grayWithCrop(make_grayscale(NULL, &cropRect)); |
| 155 | REPORTER_ASSERT(reporter, false == grayWithCrop->asColorFilter(NULL)); |
| 156 | } |
| 157 | |
| 158 | { |
| 159 | // Tests pass by not asserting |
| 160 | SkBitmap bitmap, result; |
| 161 | make_small_bitmap(bitmap); |
| 162 | result.setConfig(SkBitmap::kARGB_8888_Config, kBitmapSize, kBitmapSize); |
| 163 | result.allocPixels(); |
| 164 | |
senorblanco@chromium.org | 194d775 | 2013-07-24 22:19:24 +0000 | [diff] [blame] | 165 | { |
tfarina@chromium.org | 9f9d582 | 2013-12-18 22:15:12 +0000 | [diff] [blame] | 166 | // This tests for : |
| 167 | // 1 ) location at (0,0,1) |
| 168 | SkPoint3 location(0, 0, SK_Scalar1); |
| 169 | // 2 ) location and target at same value |
| 170 | SkPoint3 target(location.fX, location.fY, location.fZ); |
| 171 | // 3 ) large negative specular exponent value |
| 172 | SkScalar specularExponent = -1000; |
| 173 | |
| 174 | SkAutoTUnref<SkImageFilter> bmSrc(new SkBitmapSource(bitmap)); |
| 175 | SkPaint paint; |
| 176 | paint.setImageFilter(SkLightingImageFilter::CreateSpotLitSpecular( |
| 177 | location, target, specularExponent, 180, |
| 178 | 0xFFFFFFFF, SK_Scalar1, SK_Scalar1, SK_Scalar1, |
| 179 | bmSrc))->unref(); |
| 180 | SkCanvas canvas(result); |
| 181 | SkRect r = SkRect::MakeWH(SkIntToScalar(kBitmapSize), |
| 182 | SkIntToScalar(kBitmapSize)); |
| 183 | canvas.drawRect(r, paint); |
senorblanco@chromium.org | 194d775 | 2013-07-24 22:19:24 +0000 | [diff] [blame] | 184 | } |
skia.committer@gmail.com | 5c561cb | 2013-07-25 07:01:00 +0000 | [diff] [blame] | 185 | |
senorblanco@chromium.org | 194d775 | 2013-07-24 22:19:24 +0000 | [diff] [blame] | 186 | { |
tfarina@chromium.org | 9f9d582 | 2013-12-18 22:15:12 +0000 | [diff] [blame] | 187 | // This tests for scale bringing width to 0 |
| 188 | SkSize scale = SkSize::Make(-0.001f, SK_Scalar1); |
| 189 | SkAutoTUnref<SkImageFilter> bmSrc(new SkBitmapSource(bitmap)); |
| 190 | SkAutoTUnref<SkBicubicImageFilter> bicubic( |
| 191 | SkBicubicImageFilter::CreateMitchell(scale, bmSrc)); |
| 192 | SkBitmapDevice device(bitmap); |
| 193 | SkDeviceImageFilterProxy proxy(&device); |
| 194 | SkIPoint loc = SkIPoint::Make(0, 0); |
| 195 | // An empty input should early return and return false |
| 196 | REPORTER_ASSERT(reporter, |
| 197 | !bicubic->filterImage(&proxy, bitmap, SkMatrix::I(), &result, &loc)); |
commit-bot@chromium.org | 4b681bc | 2013-09-13 12:40:02 +0000 | [diff] [blame] | 198 | } |
senorblanco@chromium.org | 194d775 | 2013-07-24 22:19:24 +0000 | [diff] [blame] | 199 | } |
senorblanco@chromium.org | aba651c | 2014-02-03 22:22:16 +0000 | [diff] [blame] | 200 | } |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 201 | |
senorblanco@chromium.org | aba651c | 2014-02-03 22:22:16 +0000 | [diff] [blame] | 202 | static void test_crop_rects(SkBaseDevice* device, skiatest::Reporter* reporter) { |
| 203 | // Check that all filters offset to their absolute crop rect, |
| 204 | // unaffected by the input crop rect. |
| 205 | // Tests pass by not asserting. |
| 206 | SkBitmap bitmap; |
| 207 | bitmap.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); |
| 208 | bitmap.allocPixels(); |
| 209 | bitmap.eraseARGB(0, 0, 0, 0); |
| 210 | SkDeviceImageFilterProxy proxy(device); |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 211 | |
senorblanco@chromium.org | aba651c | 2014-02-03 22:22:16 +0000 | [diff] [blame] | 212 | SkImageFilter::CropRect inputCropRect(SkRect::MakeXYWH(8, 13, 80, 80)); |
| 213 | SkImageFilter::CropRect cropRect(SkRect::MakeXYWH(20, 30, 60, 60)); |
| 214 | SkAutoTUnref<SkImageFilter> input(make_grayscale(NULL, &inputCropRect)); |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 215 | |
senorblanco@chromium.org | aba651c | 2014-02-03 22:22:16 +0000 | [diff] [blame] | 216 | SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(SK_ColorRED, SkXfermode::kSrcIn_Mode)); |
| 217 | SkPoint3 location(0, 0, SK_Scalar1); |
| 218 | SkPoint3 target(SK_Scalar1, SK_Scalar1, SK_Scalar1); |
| 219 | SkScalar kernel[9] = { |
| 220 | SkIntToScalar( 1), SkIntToScalar( 1), SkIntToScalar( 1), |
| 221 | SkIntToScalar( 1), SkIntToScalar(-7), SkIntToScalar( 1), |
| 222 | SkIntToScalar( 1), SkIntToScalar( 1), SkIntToScalar( 1), |
| 223 | }; |
| 224 | SkISize kernelSize = SkISize::Make(3, 3); |
| 225 | SkScalar gain = SK_Scalar1, bias = 0; |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 226 | |
senorblanco@chromium.org | aba651c | 2014-02-03 22:22:16 +0000 | [diff] [blame] | 227 | SkImageFilter* filters[] = { |
| 228 | SkColorFilterImageFilter::Create(cf.get(), input.get(), &cropRect), |
| 229 | new SkDisplacementMapEffect(SkDisplacementMapEffect::kR_ChannelSelectorType, |
| 230 | SkDisplacementMapEffect::kB_ChannelSelectorType, |
| 231 | 40.0f, input.get(), input.get(), &cropRect), |
| 232 | new SkBlurImageFilter(SK_Scalar1, SK_Scalar1, input.get(), &cropRect), |
| 233 | new SkDropShadowImageFilter(SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_Scalar1, SK_ColorGREEN, input.get(), &cropRect), |
| 234 | SkLightingImageFilter::CreatePointLitDiffuse(location, SK_ColorGREEN, 0, 0, input.get(), &cropRect), |
| 235 | SkLightingImageFilter::CreatePointLitSpecular(location, SK_ColorGREEN, 0, 0, 0, input.get(), &cropRect), |
| 236 | new SkMatrixConvolutionImageFilter(kernelSize, kernel, gain, bias, SkIPoint::Make(1, 1), SkMatrixConvolutionImageFilter::kRepeat_TileMode, false, input.get(), &cropRect), |
| 237 | new SkMergeImageFilter(input.get(), input.get(), SkXfermode::kSrcOver_Mode, &cropRect), |
| 238 | new SkOffsetImageFilter(SK_Scalar1, SK_Scalar1, input.get(), &cropRect), |
| 239 | new SkOffsetImageFilter(SK_Scalar1, SK_Scalar1, input.get(), &cropRect), |
| 240 | new SkDilateImageFilter(3, 2, input.get(), &cropRect), |
| 241 | new SkErodeImageFilter(2, 3, input.get(), &cropRect), |
| 242 | new SkTileImageFilter(inputCropRect.rect(), cropRect.rect(), input.get()), |
| 243 | new SkXfermodeImageFilter(SkXfermode::Create(SkXfermode::kSrcOver_Mode), input.get(), input.get(), &cropRect), |
| 244 | }; |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 245 | |
senorblanco@chromium.org | aba651c | 2014-02-03 22:22:16 +0000 | [diff] [blame] | 246 | for (size_t i = 0; i < SK_ARRAY_COUNT(filters); ++i) { |
| 247 | SkImageFilter* filter = filters[i]; |
| 248 | SkBitmap result; |
| 249 | SkIPoint offset; |
| 250 | SkString str; |
senorblanco@chromium.org | f4e1a76 | 2014-02-04 00:28:46 +0000 | [diff] [blame] | 251 | str.printf("filter %d", static_cast<int>(i)); |
senorblanco@chromium.org | aba651c | 2014-02-03 22:22:16 +0000 | [diff] [blame] | 252 | REPORTER_ASSERT_MESSAGE(reporter, filter->filterImage(&proxy, bitmap, SkMatrix::I(), &result, &offset), str.c_str()); |
| 253 | REPORTER_ASSERT_MESSAGE(reporter, offset.fX == 20 && offset.fY == 30, str.c_str()); |
senorblanco@chromium.org | 6776b82 | 2014-01-03 21:48:22 +0000 | [diff] [blame] | 254 | } |
senorblanco@chromium.org | aba651c | 2014-02-03 22:22:16 +0000 | [diff] [blame] | 255 | |
| 256 | for (size_t i = 0; i < SK_ARRAY_COUNT(filters); ++i) { |
| 257 | SkSafeUnref(filters[i]); |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | DEF_TEST(ImageFilterCropRect, reporter) { |
| 262 | SkBitmap temp; |
| 263 | temp.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); |
| 264 | temp.allocPixels(); |
| 265 | SkBitmapDevice device(temp); |
| 266 | test_crop_rects(&device, reporter); |
| 267 | } |
| 268 | |
senorblanco@chromium.org | 5251e2b | 2014-02-05 22:36:31 +0000 | [diff] [blame^] | 269 | DEF_TEST(ImageFilterMatrixTest, reporter) { |
| 270 | SkBitmap temp; |
| 271 | temp.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); |
| 272 | temp.allocPixels(); |
| 273 | SkBitmapDevice device(temp); |
| 274 | SkCanvas canvas(&device); |
| 275 | canvas.scale(SkIntToScalar(2), SkIntToScalar(2)); |
| 276 | |
| 277 | SkMatrix expectedMatrix = canvas.getTotalMatrix(); |
| 278 | |
| 279 | SkPicture picture; |
| 280 | SkCanvas* recordingCanvas = picture.beginRecording(100, 100, |
| 281 | SkPicture::kOptimizeForClippedPlayback_RecordingFlag); |
| 282 | |
| 283 | SkPaint paint; |
| 284 | SkAutoTUnref<MatrixTestImageFilter> imageFilter( |
| 285 | new MatrixTestImageFilter(reporter, expectedMatrix)); |
| 286 | paint.setImageFilter(imageFilter.get()); |
| 287 | SkCanvas::SaveFlags saveFlags = static_cast<SkCanvas::SaveFlags>( |
| 288 | SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kFullColorLayer_SaveFlag); |
| 289 | recordingCanvas->saveLayer(NULL, &paint, saveFlags); |
| 290 | SkPaint solidPaint; |
| 291 | solidPaint.setColor(0xFFFFFFFF); |
| 292 | recordingCanvas->save(); |
| 293 | recordingCanvas->scale(SkIntToScalar(10), SkIntToScalar(10)); |
| 294 | recordingCanvas->drawRect(SkRect::Make(SkIRect::MakeWH(100, 100)), solidPaint); |
| 295 | recordingCanvas->restore(); // scale |
| 296 | recordingCanvas->restore(); // saveLayer |
| 297 | picture.endRecording(); |
| 298 | |
| 299 | canvas.drawPicture(picture); |
| 300 | } |
| 301 | |
senorblanco@chromium.org | 58d1466 | 2014-02-03 22:36:39 +0000 | [diff] [blame] | 302 | #if SK_SUPPORT_GPU |
senorblanco@chromium.org | aba651c | 2014-02-03 22:22:16 +0000 | [diff] [blame] | 303 | DEF_GPUTEST(ImageFilterCropRectGPU, reporter, factory) { |
| 304 | GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0)); |
| 305 | SkGpuDevice device(context, SkBitmap::kARGB_8888_Config, 100, 100); |
| 306 | test_crop_rects(&device, reporter); |
tfarina@chromium.org | 9f9d582 | 2013-12-18 22:15:12 +0000 | [diff] [blame] | 307 | } |
senorblanco@chromium.org | 58d1466 | 2014-02-03 22:36:39 +0000 | [diff] [blame] | 308 | #endif |