Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Side by Side Diff: tests/ImageFilterTest.cpp

Issue 1882113002: Update TileImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/effects/SkTileImageFilter.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 this->addFilter("merge with disjoint inputs", SkMergeImageFilter::Ma ke( 215 this->addFilter("merge with disjoint inputs", SkMergeImageFilter::Ma ke(
216 std::move(paintFilterLeft), std::move(paintFilterRight), 216 std::move(paintFilterLeft), std::move(paintFilterRight),
217 SkXfermode::kSrcOver_Mode, cropRect)); 217 SkXfermode::kSrcOver_Mode, cropRect));
218 } 218 }
219 219
220 this->addFilter("offset", 220 this->addFilter("offset",
221 SkOffsetImageFilter::Make(SK_Scalar1, SK_Scalar1, input, 221 SkOffsetImageFilter::Make(SK_Scalar1, SK_Scalar1, input,
222 cropRect)); 222 cropRect));
223 this->addFilter("dilate", SkDilateImageFilter::Make(3, 2, input, cropRec t)); 223 this->addFilter("dilate", SkDilateImageFilter::Make(3, 2, input, cropRec t));
224 this->addFilter("erode", SkErodeImageFilter::Make(2, 3, input, cropRect) ); 224 this->addFilter("erode", SkErodeImageFilter::Make(2, 3, input, cropRect) );
225 this->addFilter("tile", sk_sp<SkImageFilter>(SkTileImageFilter::Create( 225 this->addFilter("tile", SkTileImageFilter::Make(
226 SkRect::MakeXYWH(0, 0, 50, 50), 226 SkRect::MakeXYWH(0, 0, 50, 50),
227 cropRect ? cropRect->rect() : SkRect::MakeXYWH(0, 0, 100, 100), 227 cropRect ? cropRect->rect() : SkRect::MakeXY WH(0, 0, 100, 100),
228 input.get()))); 228 input));
229 229
230 if (!cropRect) { 230 if (!cropRect) {
231 SkMatrix matrix; 231 SkMatrix matrix;
232 232
233 matrix.setTranslate(SK_Scalar1, SK_Scalar1); 233 matrix.setTranslate(SK_Scalar1, SK_Scalar1);
234 matrix.postRotate(SkIntToScalar(45), SK_Scalar1, SK_Scalar1); 234 matrix.postRotate(SkIntToScalar(45), SK_Scalar1, SK_Scalar1);
235 235
236 this->addFilter("matrix", 236 this->addFilter("matrix",
237 SkImageFilter::MakeMatrixFilter(matrix, kLow_SkFilterQuality, in put)); 237 SkImageFilter::MakeMatrixFilter(matrix, kLow_SkFilterQuality, in put));
238 } 238 }
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 1767
1768 test_xfermode_cropped_input(&canvas, reporter); 1768 test_xfermode_cropped_input(&canvas, reporter);
1769 } 1769 }
1770 1770
1771 DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(ImageFilterBlurLargeImage_Gpu, reporter, ctxInfo ) { 1771 DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(ImageFilterBlurLargeImage_Gpu, reporter, ctxInfo ) {
1772 auto surface(SkSurface::MakeRenderTarget(ctxInfo.fGrContext, SkBudgeted::kYe s, 1772 auto surface(SkSurface::MakeRenderTarget(ctxInfo.fGrContext, SkBudgeted::kYe s,
1773 SkImageInfo::MakeN32Premul(100, 100 ))); 1773 SkImageInfo::MakeN32Premul(100, 100 )));
1774 test_large_blur_input(reporter, surface->getCanvas()); 1774 test_large_blur_input(reporter, surface->getCanvas());
1775 } 1775 }
1776 #endif 1776 #endif
OLDNEW
« no previous file with comments | « src/effects/SkTileImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698