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

Side by Side Diff: gm/imagefiltersclipped.cpp

Issue 646213004: Adding an option to render only the shadow in SkDropShadowImageFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added dropshadowimagefilter to ignored-tests Created 6 years, 1 month 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/imagefiltersbase.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 "gm.h" 8 #include "gm.h"
9 #include "SkColor.h" 9 #include "SkColor.h"
10 #include "SkBitmapSource.h" 10 #include "SkBitmapSource.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 SkAutoTUnref<SkImageFilter> gradient(SkBitmapSource::Create(fGradientCir cle)); 94 SkAutoTUnref<SkImageFilter> gradient(SkBitmapSource::Create(fGradientCir cle));
95 SkAutoTUnref<SkImageFilter> checkerboard(SkBitmapSource::Create(fChecker board)); 95 SkAutoTUnref<SkImageFilter> checkerboard(SkBitmapSource::Create(fChecker board));
96 SkAutoTUnref<SkShader> noise(SkPerlinNoiseShader::CreateFractalNoise( 96 SkAutoTUnref<SkShader> noise(SkPerlinNoiseShader::CreateFractalNoise(
97 SkDoubleToScalar(0.1), SkDoubleToScalar(0.05), 1, 0)); 97 SkDoubleToScalar(0.1), SkDoubleToScalar(0.05), 1, 0));
98 SkMatrix resizeMatrix; 98 SkMatrix resizeMatrix;
99 resizeMatrix.setScale(RESIZE_FACTOR_X, RESIZE_FACTOR_Y); 99 resizeMatrix.setScale(RESIZE_FACTOR_X, RESIZE_FACTOR_Y);
100 100
101 SkImageFilter* filters[] = { 101 SkImageFilter* filters[] = {
102 SkBlurImageFilter::Create(SkIntToScalar(12), SkIntToScalar(12)), 102 SkBlurImageFilter::Create(SkIntToScalar(12), SkIntToScalar(12)),
103 SkDropShadowImageFilter::Create(SkIntToScalar(10), SkIntToScalar(10) , 103 SkDropShadowImageFilter::Create(SkIntToScalar(10), SkIntToScalar(10) ,
104 SkIntToScalar(3), SkIntToScalar(3), 104 SkIntToScalar(3), SkIntToScalar(3), SK_ColorGREEN,
105 SK_ColorGREEN), 105 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode),
106 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS electorType, 106 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS electorType,
107 SkDisplacementMapEffect::kR_ChannelS electorType, 107 SkDisplacementMapEffect::kR_ChannelS electorType,
108 SkIntToScalar(12), 108 SkIntToScalar(12),
109 gradient.get(), 109 gradient.get(),
110 checkerboard.get()), 110 checkerboard.get()),
111 SkDilateImageFilter::Create(2, 2, checkerboard.get()), 111 SkDilateImageFilter::Create(2, 2, checkerboard.get()),
112 SkErodeImageFilter::Create(2, 2, checkerboard.get()), 112 SkErodeImageFilter::Create(2, 2, checkerboard.get()),
113 SkOffsetImageFilter::Create(SkIntToScalar(-16), SkIntToScalar(32)), 113 SkOffsetImageFilter::Create(SkIntToScalar(-16), SkIntToScalar(32)),
114 SkMatrixImageFilter::Create(resizeMatrix, SkPaint::kNone_FilterLevel ), 114 SkMatrixImageFilter::Create(resizeMatrix, SkPaint::kNone_FilterLevel ),
115 SkRectShaderImageFilter::Create(noise), 115 SkRectShaderImageFilter::Create(noise),
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 SkBitmap fGradientCircle; 156 SkBitmap fGradientCircle;
157 typedef GM INHERITED; 157 typedef GM INHERITED;
158 }; 158 };
159 159
160 ////////////////////////////////////////////////////////////////////////////// 160 //////////////////////////////////////////////////////////////////////////////
161 161
162 static GM* MyFactory(void*) { return new ImageFiltersClippedGM; } 162 static GM* MyFactory(void*) { return new ImageFiltersClippedGM; }
163 static GMRegistry reg(MyFactory); 163 static GMRegistry reg(MyFactory);
164 164
165 } 165 }
OLDNEW
« no previous file with comments | « gm/imagefiltersbase.cpp ('k') | gm/imagefilterscropexpand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698