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

Side by Side Diff: gm/imagefiltersscaled.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/imagefilterscropexpand.cpp ('k') | include/core/SkPicture.h » ('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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 SkScalar cutoffAngle = SkIntToScalar(15); 103 SkScalar cutoffAngle = SkIntToScalar(15);
104 SkScalar kd = SkIntToScalar(2); 104 SkScalar kd = SkIntToScalar(2);
105 SkScalar surfaceScale = SkIntToScalar(1); 105 SkScalar surfaceScale = SkIntToScalar(1);
106 SkColor white(0xFFFFFFFF); 106 SkColor white(0xFFFFFFFF);
107 SkMatrix resizeMatrix; 107 SkMatrix resizeMatrix;
108 resizeMatrix.setScale(RESIZE_FACTOR, RESIZE_FACTOR); 108 resizeMatrix.setScale(RESIZE_FACTOR, RESIZE_FACTOR);
109 109
110 SkImageFilter* filters[] = { 110 SkImageFilter* filters[] = {
111 SkBlurImageFilter::Create(SkIntToScalar(4), SkIntToScalar(4)), 111 SkBlurImageFilter::Create(SkIntToScalar(4), SkIntToScalar(4)),
112 SkDropShadowImageFilter::Create(SkIntToScalar(5), SkIntToScalar(10), 112 SkDropShadowImageFilter::Create(SkIntToScalar(5), SkIntToScalar(10),
113 SkIntToScalar(3), SkIntToScalar(3), 113 SkIntToScalar(3), SkIntToScalar(3), SK_ColorYELLOW,
114 SK_ColorYELLOW), 114 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode),
115 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS electorType, 115 SkDisplacementMapEffect::Create(SkDisplacementMapEffect::kR_ChannelS electorType,
116 SkDisplacementMapEffect::kR_ChannelS electorType, 116 SkDisplacementMapEffect::kR_ChannelS electorType,
117 SkIntToScalar(12), 117 SkIntToScalar(12),
118 gradient.get(), 118 gradient.get(),
119 checkerboard.get()), 119 checkerboard.get()),
120 SkDilateImageFilter::Create(1, 1, checkerboard.get()), 120 SkDilateImageFilter::Create(1, 1, checkerboard.get()),
121 SkErodeImageFilter::Create(1, 1, checkerboard.get()), 121 SkErodeImageFilter::Create(1, 1, checkerboard.get()),
122 SkOffsetImageFilter::Create(SkIntToScalar(32), 0), 122 SkOffsetImageFilter::Create(SkIntToScalar(32), 0),
123 SkMatrixImageFilter::Create(resizeMatrix, SkPaint::kNone_FilterLevel ), 123 SkMatrixImageFilter::Create(resizeMatrix, SkPaint::kNone_FilterLevel ),
124 SkRectShaderImageFilter::Create(noise), 124 SkRectShaderImageFilter::Create(noise),
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 SkBitmap fGradientCircle; 175 SkBitmap fGradientCircle;
176 typedef GM INHERITED; 176 typedef GM INHERITED;
177 }; 177 };
178 178
179 ////////////////////////////////////////////////////////////////////////////// 179 //////////////////////////////////////////////////////////////////////////////
180 180
181 static GM* MyFactory(void*) { return new ImageFiltersScaledGM; } 181 static GM* MyFactory(void*) { return new ImageFiltersScaledGM; }
182 static GMRegistry reg(MyFactory); 182 static GMRegistry reg(MyFactory);
183 183
184 } 184 }
OLDNEW
« no previous file with comments | « gm/imagefilterscropexpand.cpp ('k') | include/core/SkPicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698