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

Side by Side Diff: gm/imagefiltersclipped.cpp

Issue 1842193002: Update SkOffsetImageFilter 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 | « gm/filterfastbounds.cpp ('k') | gm/imagefilterscropexpand.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 2014 Google Inc. 2 * Copyright 2014 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 SkDropShadowImageFilter::Create(SkIntToScalar(10), SkIntToScalar(10) , 101 SkDropShadowImageFilter::Create(SkIntToScalar(10), SkIntToScalar(10) ,
102 SkIntToScalar(3), SkIntToScalar(3), SK_ColorGREEN, 102 SkIntToScalar(3), SkIntToScalar(3), SK_ColorGREEN,
103 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode), 103 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode),
104 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS electorType, 104 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS electorType,
105 SkDisplacementMapEffect::kR_ChannelS electorType, 105 SkDisplacementMapEffect::kR_ChannelS electorType,
106 SkIntToScalar(12), 106 SkIntToScalar(12),
107 gradient.get(), 107 gradient.get(),
108 checkerboard.get()), 108 checkerboard.get()),
109 SkDilateImageFilter::Create(2, 2, checkerboard.get()), 109 SkDilateImageFilter::Create(2, 2, checkerboard.get()),
110 SkErodeImageFilter::Create(2, 2, checkerboard.get()), 110 SkErodeImageFilter::Create(2, 2, checkerboard.get()),
111 SkOffsetImageFilter::Create(SkIntToScalar(-16), SkIntToScalar(32)), 111 SkOffsetImageFilter::Make(SkIntToScalar(-16),
112 SkIntToScalar(32),
113 nullptr).release(),
112 SkImageFilter::CreateMatrixFilter(resizeMatrix, kNone_SkFilterQualit y), 114 SkImageFilter::CreateMatrixFilter(resizeMatrix, kNone_SkFilterQualit y),
113 SkLightingImageFilter::CreatePointLitDiffuse(pointLocation, SK_Color WHITE, SK_Scalar1, SkIntToScalar(2), checkerboard.get()), 115 SkLightingImageFilter::CreatePointLitDiffuse(pointLocation, SK_Color WHITE, SK_Scalar1, SkIntToScalar(2), checkerboard.get()),
114 116
115 }; 117 };
116 118
117 SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64)); 119 SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64));
118 SkScalar margin = SkIntToScalar(16); 120 SkScalar margin = SkIntToScalar(16);
119 SkRect bounds = r; 121 SkRect bounds = r;
120 bounds.outset(margin, margin); 122 bounds.outset(margin, margin);
121 123
(...skipping 28 matching lines...) Expand all
150 private: 152 private:
151 sk_sp<SkImage> fCheckerboard, fGradientCircle; 153 sk_sp<SkImage> fCheckerboard, fGradientCircle;
152 154
153 typedef GM INHERITED; 155 typedef GM INHERITED;
154 }; 156 };
155 157
156 ////////////////////////////////////////////////////////////////////////////// 158 //////////////////////////////////////////////////////////////////////////////
157 159
158 DEF_GM(return new ImageFiltersClippedGM;) 160 DEF_GM(return new ImageFiltersClippedGM;)
159 } 161 }
OLDNEW
« no previous file with comments | « gm/filterfastbounds.cpp ('k') | gm/imagefilterscropexpand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698