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

Side by Side Diff: samplecode/SampleTiling.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 | « samplecode/SampleAll.cpp ('k') | samplecode/SampleUnpremul.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 static const SkColorType gColorTypes[] = { 50 static const SkColorType gColorTypes[] = {
51 kN32_SkColorType, 51 kN32_SkColorType,
52 kRGB_565_SkColorType, 52 kRGB_565_SkColorType,
53 }; 53 };
54 static const int gWidth = 32; 54 static const int gWidth = 32;
55 static const int gHeight = 32; 55 static const int gHeight = 32;
56 56
57 class TilingView : public SampleView { 57 class TilingView : public SampleView {
58 SkAutoTUnref<SkPicture> fTextPicture; 58 SkAutoTUnref<SkPicture> fTextPicture;
59 SkAutoTUnref<SkDrawLooper> fLooper; 59 SkAutoTUnref<SkBlurDrawLooper> fLooper;
60 public: 60 public:
61 TilingView() 61 TilingView()
62 : fLooper(SkBlurDrawLooper::Create(0x88000000, 62 : fLooper(SkBlurDrawLooper::Create(0x88000000,
63 SkBlurMask::ConvertRadiusToSigma( SkIntToScalar(1)), 63 SkBlurMask::ConvertRadiusToSigma( SkIntToScalar(1)),
64 SkIntToScalar(2), SkIntToScalar(2 ))) { 64 SkIntToScalar(2), SkIntToScalar(2 ))) {
65 for (size_t i = 0; i < SK_ARRAY_COUNT(gColorTypes); i++) { 65 for (size_t i = 0; i < SK_ARRAY_COUNT(gColorTypes); i++) {
66 makebm(&fTexture[i], gColorTypes[i], gWidth, gHeight); 66 makebm(&fTexture[i], gColorTypes[i], gWidth, gHeight);
67 } 67 }
68 } 68 }
69 69
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 private: 164 private:
165 typedef SampleView INHERITED; 165 typedef SampleView INHERITED;
166 }; 166 };
167 167
168 ////////////////////////////////////////////////////////////////////////////// 168 //////////////////////////////////////////////////////////////////////////////
169 169
170 static SkView* MyFactory() { return new TilingView; } 170 static SkView* MyFactory() { return new TilingView; }
171 static SkViewRegister reg(MyFactory); 171 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleUnpremul.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698