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

Side by Side Diff: samplecode/SampleTiling.cpp

Issue 23701006: Push sigma-based blur interface into our GMs/benches/tests/samplecode (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Cleaned up Created 7 years, 3 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 | Annotate | Revision Log
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 SkBitmap::kRGB_565_Config, 59 SkBitmap::kRGB_565_Config,
60 }; 60 };
61 static const int gWidth = 32; 61 static const int gWidth = 32;
62 static const int gHeight = 32; 62 static const int gHeight = 32;
63 63
64 class TilingView : public SampleView { 64 class TilingView : public SampleView {
65 SkPicture* fTextPicture; 65 SkPicture* fTextPicture;
66 SkBlurDrawLooper fLooper; 66 SkBlurDrawLooper fLooper;
67 public: 67 public:
68 TilingView() 68 TilingView()
69 : fLooper(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2), 69 : fLooper(0x88000000, SkFloatToScalar(1.07735f), SkIntToScalar(2), S kIntToScalar(2)) {
70 0x88000000) {
71 fTextPicture = new SkPicture(); 70 fTextPicture = new SkPicture();
72 for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) { 71 for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) {
73 makebm(&fTexture[i], gConfigs[i], gWidth, gHeight); 72 makebm(&fTexture[i], gConfigs[i], gWidth, gHeight);
74 } 73 }
75 } 74 }
76 75
77 ~TilingView() { 76 ~TilingView() {
78 fTextPicture->unref(); 77 fTextPicture->unref();
79 } 78 }
80 79
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 162 }
164 163
165 private: 164 private:
166 typedef SampleView INHERITED; 165 typedef SampleView INHERITED;
167 }; 166 };
168 167
169 ////////////////////////////////////////////////////////////////////////////// 168 //////////////////////////////////////////////////////////////////////////////
170 169
171 static SkView* MyFactory() { return new TilingView; } 170 static SkView* MyFactory() { return new TilingView; }
172 static SkViewRegister reg(MyFactory); 171 static SkViewRegister reg(MyFactory);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698