OLD | NEW |
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2), |
70 0x88000000) { | 70 0x88000000, SkBlurDrawLooper::kNone_BlurFlag) { |
71 fTextPicture = new SkPicture(); | 71 fTextPicture = new SkPicture(); |
72 for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) { | 72 for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) { |
73 makebm(&fTexture[i], gConfigs[i], gWidth, gHeight); | 73 makebm(&fTexture[i], gConfigs[i], gWidth, gHeight); |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 ~TilingView() { | 77 ~TilingView() { |
78 fTextPicture->unref(); | 78 fTextPicture->unref(); |
79 } | 79 } |
80 | 80 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 } | 163 } |
164 | 164 |
165 private: | 165 private: |
166 typedef SampleView INHERITED; | 166 typedef SampleView INHERITED; |
167 }; | 167 }; |
168 | 168 |
169 ////////////////////////////////////////////////////////////////////////////// | 169 ////////////////////////////////////////////////////////////////////////////// |
170 | 170 |
171 static SkView* MyFactory() { return new TilingView; } | 171 static SkView* MyFactory() { return new TilingView; } |
172 static SkViewRegister reg(MyFactory); | 172 static SkViewRegister reg(MyFactory); |
OLD | NEW |