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

Side by Side Diff: gm/shadows.cpp

Issue 1540203002: Revert of change all factories to return their base-class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/rects.cpp ('k') | include/effects/Sk1DPathEffect.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 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 "SkBlurDrawLooper.h" 9 #include "SkBlurDrawLooper.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 SkString onShortName() override { 48 SkString onShortName() override {
49 return SkString("shadows"); 49 return SkString("shadows");
50 } 50 }
51 51
52 SkISize onISize() override { 52 SkISize onISize() override {
53 return SkISize::Make(200, 200); 53 return SkISize::Make(200, 200);
54 } 54 }
55 55
56 void onDraw(SkCanvas* canvas) override { 56 void onDraw(SkCanvas* canvas) override {
57 SkDrawLooper* shadowLoopers[5]; 57 SkBlurDrawLooper* shadowLoopers[5];
58 shadowLoopers[0] = 58 shadowLoopers[0] =
59 SkBlurDrawLooper::Create(SK_ColorBLUE, 59 SkBlurDrawLooper::Create(SK_ColorBLUE,
60 SkBlurMask::ConvertRadiusToSigma(SkIntToSca lar(10)), 60 SkBlurMask::ConvertRadiusToSigma(SkIntToSca lar(10)),
61 SkIntToScalar(5), SkIntToScalar(10), 61 SkIntToScalar(5), SkIntToScalar(10),
62 SkBlurDrawLooper::kIgnoreTransform_BlurFlag | 62 SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
63 SkBlurDrawLooper::kOverrideColor_BlurFlag | 63 SkBlurDrawLooper::kOverrideColor_BlurFlag |
64 SkBlurDrawLooper::kHighQuality_BlurFlag); 64 SkBlurDrawLooper::kHighQuality_BlurFlag);
65 SkAutoUnref aurL0(shadowLoopers[0]); 65 SkAutoUnref aurL0(shadowLoopers[0]);
66 shadowLoopers[1] = 66 shadowLoopers[1] =
67 SkBlurDrawLooper::Create(SK_ColorBLUE, 67 SkBlurDrawLooper::Create(SK_ColorBLUE,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 private: 143 private:
144 typedef GM INHERITED; 144 typedef GM INHERITED;
145 }; 145 };
146 146
147 /////////////////////////////////////////////////////////////////////////////// 147 ///////////////////////////////////////////////////////////////////////////////
148 148
149 static GM* MyFactory(void*) { return new ShadowsGM; } 149 static GM* MyFactory(void*) { return new ShadowsGM; }
150 static GMRegistry reg(MyFactory); 150 static GMRegistry reg(MyFactory);
151 151
152 } 152 }
OLDNEW
« no previous file with comments | « gm/rects.cpp ('k') | include/effects/Sk1DPathEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698