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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkBitmapDevice.h" | 9 #include "SkBitmapDevice.h" |
10 #include "SkBlurImageFilter.h" | 10 #include "SkBlurImageFilter.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 }; | 212 }; |
213 void addFilter(const char* name, SkImageFilter* filter) { | 213 void addFilter(const char* name, SkImageFilter* filter) { |
214 fFilters.push_back(Filter(name, filter)); | 214 fFilters.push_back(Filter(name, filter)); |
215 } | 215 } |
216 | 216 |
217 SkTArray<Filter> fFilters; | 217 SkTArray<Filter> fFilters; |
218 }; | 218 }; |
219 | 219 |
220 } | 220 } |
221 | 221 |
222 SkFlattenable* MatrixTestImageFilter::CreateProc(SkReadBuffer& buffer) { | 222 sk_sp<SkFlattenable> MatrixTestImageFilter::CreateProc(SkReadBuffer& buffer) { |
223 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); | 223 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); |
224 skiatest::Reporter* reporter = (skiatest::Reporter*)buffer.readFunctionPtr()
; | 224 skiatest::Reporter* reporter = (skiatest::Reporter*)buffer.readFunctionPtr()
; |
225 SkMatrix matrix; | 225 SkMatrix matrix; |
226 buffer.readMatrix(&matrix); | 226 buffer.readMatrix(&matrix); |
227 return new MatrixTestImageFilter(reporter, matrix); | 227 return sk_make_sp<MatrixTestImageFilter>(reporter, matrix); |
228 } | 228 } |
229 | 229 |
230 #ifndef SK_IGNORE_TO_STRING | 230 #ifndef SK_IGNORE_TO_STRING |
231 void MatrixTestImageFilter::toString(SkString* str) const { | 231 void MatrixTestImageFilter::toString(SkString* str) const { |
232 str->appendf("MatrixTestImageFilter: ("); | 232 str->appendf("MatrixTestImageFilter: ("); |
233 str->append(")"); | 233 str->append(")"); |
234 } | 234 } |
235 #endif | 235 #endif |
236 | 236 |
237 static sk_sp<SkImage> make_small_image() { | 237 static sk_sp<SkImage> make_small_image() { |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 | 1592 |
1593 test_xfermode_cropped_input(&canvas, reporter); | 1593 test_xfermode_cropped_input(&canvas, reporter); |
1594 } | 1594 } |
1595 | 1595 |
1596 DEF_GPUTEST_FOR_ALL_CONTEXTS(BlurLargeImage_Gpu, reporter, context) { | 1596 DEF_GPUTEST_FOR_ALL_CONTEXTS(BlurLargeImage_Gpu, reporter, context) { |
1597 auto surface(SkSurface::MakeRenderTarget(context, SkBudgeted::kYes, | 1597 auto surface(SkSurface::MakeRenderTarget(context, SkBudgeted::kYes, |
1598 SkImageInfo::MakeN32Premul(100, 100
))); | 1598 SkImageInfo::MakeN32Premul(100, 100
))); |
1599 test_large_blur_input(reporter, surface->getCanvas()); | 1599 test_large_blur_input(reporter, surface->getCanvas()); |
1600 } | 1600 } |
1601 #endif | 1601 #endif |
OLD | NEW |