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

Side by Side Diff: gm/imagefiltersscaled.cpp

Issue 1884253004: Revert of Update DisplacementMapEffect to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/imagefilterscropexpand.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 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 SkMatrix resizeMatrix; 91 SkMatrix resizeMatrix;
92 resizeMatrix.setScale(RESIZE_FACTOR, RESIZE_FACTOR); 92 resizeMatrix.setScale(RESIZE_FACTOR, RESIZE_FACTOR);
93 93
94 sk_sp<SkImageFilter> filters[] = { 94 sk_sp<SkImageFilter> filters[] = {
95 SkBlurImageFilter::Make(SkIntToScalar(4), SkIntToScalar(4), nullptr) , 95 SkBlurImageFilter::Make(SkIntToScalar(4), SkIntToScalar(4), nullptr) ,
96 SkDropShadowImageFilter::Make( 96 SkDropShadowImageFilter::Make(
97 SkIntToScalar(5), SkIntToScalar(10), 97 SkIntToScalar(5), SkIntToScalar(10),
98 SkIntToScalar(3), SkIntToScalar(3), SK_Color YELLOW, 98 SkIntToScalar(3), SkIntToScalar(3), SK_Color YELLOW,
99 SkDropShadowImageFilter::kDrawShadowAndForeg round_ShadowMode, 99 SkDropShadowImageFilter::kDrawShadowAndForeg round_ShadowMode,
100 nullptr), 100 nullptr),
101 SkDisplacementMapEffect::Make(SkDisplacementMapEffect::kR_ChannelSel ectorType, 101 sk_sp<SkImageFilter>(SkDisplacementMapEffect::Create(
102 SkDisplacementMapEffect::kR_ChannelSel ectorType, 102 SkDisplacementMapEffect::kR_ChannelS electorType,
103 SkIntToScalar(12), 103 SkDisplacementMapEffect::kR_ChannelS electorType,
104 std::move(gradient), 104 SkIntToScalar(12),
105 checkerboard), 105 gradient.get(),
106 checkerboard.get())),
106 SkDilateImageFilter::Make(1, 1, checkerboard), 107 SkDilateImageFilter::Make(1, 1, checkerboard),
107 SkErodeImageFilter::Make(1, 1, checkerboard), 108 SkErodeImageFilter::Make(1, 1, checkerboard),
108 SkOffsetImageFilter::Make(SkIntToScalar(32), 0, nullptr), 109 SkOffsetImageFilter::Make(SkIntToScalar(32), 0, nullptr),
109 SkImageFilter::MakeMatrixFilter(resizeMatrix, kNone_SkFilterQuality, nullptr), 110 SkImageFilter::MakeMatrixFilter(resizeMatrix, kNone_SkFilterQuality, nullptr),
110 SkPaintImageFilter::Make(noisePaint), 111 SkPaintImageFilter::Make(noisePaint),
111 SkLightingImageFilter::MakePointLitDiffuse(pointLocation, white, sur faceScale, kd, 112 SkLightingImageFilter::MakePointLitDiffuse(pointLocation, white, sur faceScale, kd,
112 nullptr), 113 nullptr),
113 SkLightingImageFilter::MakeSpotLitDiffuse(spotLocation, spotTarget, spotExponent, 114 SkLightingImageFilter::MakeSpotLitDiffuse(spotLocation, spotTarget, spotExponent,
114 cutoffAngle, white, surfac eScale, kd, 115 cutoffAngle, white, surfac eScale, kd,
115 nullptr), 116 nullptr),
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 private: 157 private:
157 sk_sp<SkImage> fCheckerboard, fGradientCircle; 158 sk_sp<SkImage> fCheckerboard, fGradientCircle;
158 159
159 typedef GM INHERITED; 160 typedef GM INHERITED;
160 }; 161 };
161 162
162 ////////////////////////////////////////////////////////////////////////////// 163 //////////////////////////////////////////////////////////////////////////////
163 164
164 DEF_GM(return new ImageFiltersScaledGM;) 165 DEF_GM(return new ImageFiltersScaledGM;)
165 } 166 }
OLDNEW
« no previous file with comments | « gm/imagefilterscropexpand.cpp ('k') | gm/imagefilterstransformed.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698