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

Side by Side Diff: gm/imagefiltersstroked.cpp

Issue 1852743002: Update SkBlurImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT & address code review comments 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 | « gm/imagefiltersscaled.cpp ('k') | gm/imagefilterstransformed.cpp » ('j') | 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 2015 Google Inc. 2 * Copyright 2015 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 "sk_tool_utils.h" 8 #include "sk_tool_utils.h"
9 #include "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkColor.h" 10 #include "SkColor.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void (*drawProc[])(SkCanvas*, const SkRect&, const SkPaint&) = { 51 void (*drawProc[])(SkCanvas*, const SkRect&, const SkPaint&) = {
52 draw_line, draw_rect, draw_circle, 52 draw_line, draw_rect, draw_circle,
53 }; 53 };
54 54
55 canvas->clear(SK_ColorBLACK); 55 canvas->clear(SK_ColorBLACK);
56 56
57 SkMatrix resizeMatrix; 57 SkMatrix resizeMatrix;
58 resizeMatrix.setScale(RESIZE_FACTOR_X, RESIZE_FACTOR_Y); 58 resizeMatrix.setScale(RESIZE_FACTOR_X, RESIZE_FACTOR_Y);
59 59
60 SkImageFilter* filters[] = { 60 SkImageFilter* filters[] = {
61 SkBlurImageFilter::Create(5, 5), 61 SkBlurImageFilter::Make(5, 5, nullptr).release(),
62 SkDropShadowImageFilter::Create(10, 10, 3, 3, SK_ColorGREEN, 62 SkDropShadowImageFilter::Create(10, 10, 3, 3, SK_ColorGREEN,
63 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode), 63 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode),
64 SkOffsetImageFilter::Make(-16, 32, nullptr).release(), 64 SkOffsetImageFilter::Make(-16, 32, nullptr).release(),
65 SkImageFilter::CreateMatrixFilter(resizeMatrix, kNone_SkFilterQualit y), 65 SkImageFilter::CreateMatrixFilter(resizeMatrix, kNone_SkFilterQualit y),
66 }; 66 };
67 67
68 SkRect r = SkRect::MakeWH(64, 64); 68 SkRect r = SkRect::MakeWH(64, 64);
69 SkScalar margin = 32; 69 SkScalar margin = 32;
70 SkPaint paint; 70 SkPaint paint;
71 paint.setColor(SK_ColorWHITE); 71 paint.setColor(SK_ColorWHITE);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 private: 104 private:
105 typedef GM INHERITED; 105 typedef GM INHERITED;
106 }; 106 };
107 107
108 ////////////////////////////////////////////////////////////////////////////// 108 //////////////////////////////////////////////////////////////////////////////
109 109
110 DEF_GM(return new ImageFiltersStrokedGM;) 110 DEF_GM(return new ImageFiltersStrokedGM;)
111 111
112 } 112 }
OLDNEW
« no previous file with comments | « gm/imagefiltersscaled.cpp ('k') | gm/imagefilterstransformed.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698