| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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<SkBlurDrawLooper> fLooper; | 59 SkAutoTUnref<SkDrawLooper> 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 Loading... |
| 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); |
| OLD | NEW |