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

Side by Side Diff: gm/imagefiltersclipped.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/displacement.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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 resizeMatrix.setScale(RESIZE_FACTOR_X, RESIZE_FACTOR_Y); 93 resizeMatrix.setScale(RESIZE_FACTOR_X, RESIZE_FACTOR_Y);
94 SkPoint3 pointLocation = SkPoint3::Make(32, 32, SkIntToScalar(10)); 94 SkPoint3 pointLocation = SkPoint3::Make(32, 32, SkIntToScalar(10));
95 95
96 sk_sp<SkImageFilter> filters[] = { 96 sk_sp<SkImageFilter> filters[] = {
97 SkBlurImageFilter::Make(SkIntToScalar(12), SkIntToScalar(12), nullpt r), 97 SkBlurImageFilter::Make(SkIntToScalar(12), SkIntToScalar(12), nullpt r),
98 SkDropShadowImageFilter::Make( 98 SkDropShadowImageFilter::Make(
99 SkIntToScalar(10), SkIntToScalar(10), 99 SkIntToScalar(10), SkIntToScalar(10),
100 SkIntToScalar(3), SkIntToScalar(3), SK_Color GREEN, 100 SkIntToScalar(3), SkIntToScalar(3), SK_Color GREEN,
101 SkDropShadowImageFilter::kDrawShadowAndForeg round_ShadowMode, 101 SkDropShadowImageFilter::kDrawShadowAndForeg round_ShadowMode,
102 nullptr), 102 nullptr),
103 SkDisplacementMapEffect::Make(SkDisplacementMapEffect::kR_ChannelSel ectorType, 103 sk_sp<SkImageFilter>(SkDisplacementMapEffect::Create(
104 SkDisplacementMapEffect::kR_ChannelSel ectorType, 104 SkDisplacementMapEffect::kR_ChannelS electorType,
105 SkIntToScalar(12), 105 SkDisplacementMapEffect::kR_ChannelS electorType,
106 std::move(gradient), 106 SkIntToScalar(12),
107 checkerboard), 107 gradient.get(),
108 checkerboard.get())),
108 SkDilateImageFilter::Make(2, 2, checkerboard), 109 SkDilateImageFilter::Make(2, 2, checkerboard),
109 SkErodeImageFilter::Make(2, 2, checkerboard), 110 SkErodeImageFilter::Make(2, 2, checkerboard),
110 SkOffsetImageFilter::Make(SkIntToScalar(-16), SkIntToScalar(32), nul lptr), 111 SkOffsetImageFilter::Make(SkIntToScalar(-16), SkIntToScalar(32), nul lptr),
111 SkImageFilter::MakeMatrixFilter(resizeMatrix, kNone_SkFilterQuality, nullptr), 112 SkImageFilter::MakeMatrixFilter(resizeMatrix, kNone_SkFilterQuality, nullptr),
112 SkLightingImageFilter::MakePointLitDiffuse(pointLocation, SK_ColorWH ITE, SK_Scalar1, 113 SkLightingImageFilter::MakePointLitDiffuse(pointLocation, SK_ColorWH ITE, SK_Scalar1,
113 SkIntToScalar(2), checker board), 114 SkIntToScalar(2), checker board),
114 115
115 }; 116 };
116 117
117 SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64)); 118 SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64));
(...skipping 29 matching lines...) Expand all
147 private: 148 private:
148 sk_sp<SkImage> fCheckerboard, fGradientCircle; 149 sk_sp<SkImage> fCheckerboard, fGradientCircle;
149 150
150 typedef GM INHERITED; 151 typedef GM INHERITED;
151 }; 152 };
152 153
153 ////////////////////////////////////////////////////////////////////////////// 154 //////////////////////////////////////////////////////////////////////////////
154 155
155 DEF_GM(return new ImageFiltersClippedGM;) 156 DEF_GM(return new ImageFiltersClippedGM;)
156 } 157 }
OLDNEW
« no previous file with comments | « gm/displacement.cpp ('k') | gm/imagefilterscropexpand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698