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

Side by Side Diff: gm/imagefiltersbase.cpp

Issue 407203002: Remove the single-sigma version of SkDropShadowImageFilter::Create(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | gm/imagefiltersclipped.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 2011 Google Inc. 2 * Copyright 2011 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 "gm.h" 8 #include "gm.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorFilter.h" 10 #include "SkColorFilter.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 }; 191 };
192 192
193 SkColorFilter* cf = SkColorFilter::CreateModeFilter(SK_ColorRED, 193 SkColorFilter* cf = SkColorFilter::CreateModeFilter(SK_ColorRED,
194 SkXfermode::kSrcIn_Mode); 194 SkXfermode::kSrcIn_Mode);
195 SkImageFilter* filters[] = { 195 SkImageFilter* filters[] = {
196 NULL, 196 NULL,
197 IdentityImageFilter::Create(), 197 IdentityImageFilter::Create(),
198 FailImageFilter::Create(), 198 FailImageFilter::Create(),
199 SkColorFilterImageFilter::Create(cf), 199 SkColorFilterImageFilter::Create(cf),
200 SkBlurImageFilter::Create(12.0f, 0.0f), 200 SkBlurImageFilter::Create(12.0f, 0.0f),
201 SkDropShadowImageFilter::Create(10.0f, 5.0f, 3.0f, SK_ColorBLUE), 201 SkDropShadowImageFilter::Create(10.0f, 5.0f, 3.0f, 3.0f, SK_ColorBLU E),
202 }; 202 };
203 cf->unref(); 203 cf->unref();
204 204
205 SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64)); 205 SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64));
206 SkScalar MARGIN = SkIntToScalar(16); 206 SkScalar MARGIN = SkIntToScalar(16);
207 SkScalar DX = r.width() + MARGIN; 207 SkScalar DX = r.width() + MARGIN;
208 SkScalar DY = r.height() + MARGIN; 208 SkScalar DY = r.height() + MARGIN;
209 209
210 canvas->translate(MARGIN, MARGIN); 210 canvas->translate(MARGIN, MARGIN);
211 for (size_t i = 0; i < SK_ARRAY_COUNT(drawProc); ++i) { 211 for (size_t i = 0; i < SK_ARRAY_COUNT(drawProc); ++i) {
(...skipping 14 matching lines...) Expand all
226 } 226 }
227 227
228 private: 228 private:
229 typedef GM INHERITED; 229 typedef GM INHERITED;
230 }; 230 };
231 231
232 /////////////////////////////////////////////////////////////////////////////// 232 ///////////////////////////////////////////////////////////////////////////////
233 233
234 static skiagm::GM* MyFactory(void*) { return new ImageFiltersBaseGM; } 234 static skiagm::GM* MyFactory(void*) { return new ImageFiltersBaseGM; }
235 static skiagm::GMRegistry reg(MyFactory); 235 static skiagm::GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « no previous file | gm/imagefiltersclipped.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698