| 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 "gm.h" | 8 #include "gm.h" |
| 9 #include "SkPath.h" | 9 #include "SkPath.h" |
| 10 #include "SkRegion.h" | 10 #include "SkRegion.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 static const SkBitmap::Config gConfigs[] = { | 53 static const SkBitmap::Config gConfigs[] = { |
| 54 SkBitmap::kARGB_8888_Config, | 54 SkBitmap::kARGB_8888_Config, |
| 55 SkBitmap::kRGB_565_Config, | 55 SkBitmap::kRGB_565_Config, |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 class TilingGM : public skiagm::GM { | 58 class TilingGM : public skiagm::GM { |
| 59 SkBlurDrawLooper fLooper; | 59 SkBlurDrawLooper fLooper; |
| 60 public: | 60 public: |
| 61 TilingGM(bool powerOfTwoSize) | 61 TilingGM(bool powerOfTwoSize) |
| 62 : fLooper(SkIntToScalar(1), SkIntToScalar(2), SkIntToScalar(2), 0x88
000000) | 62 : fLooper(0x88000000, SkFloatToScalar(1.07735f), SkIntToScalar(2), S
kIntToScalar(2)) |
| 63 , fPowerOfTwoSize(powerOfTwoSize) { | 63 , fPowerOfTwoSize(powerOfTwoSize) { |
| 64 } | 64 } |
| 65 | 65 |
| 66 SkBitmap fTexture[SK_ARRAY_COUNT(gConfigs)]; | 66 SkBitmap fTexture[SK_ARRAY_COUNT(gConfigs)]; |
| 67 | 67 |
| 68 protected: | 68 protected: |
| 69 | 69 |
| 70 enum { | 70 enum { |
| 71 kPOTSize = 32, | 71 kPOTSize = 32, |
| 72 kNPOTSize = 21, | 72 kNPOTSize = 21, |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 private: | 266 private: |
| 267 typedef skiagm::GM INHERITED; | 267 typedef skiagm::GM INHERITED; |
| 268 }; | 268 }; |
| 269 | 269 |
| 270 ////////////////////////////////////////////////////////////////////////////// | 270 ////////////////////////////////////////////////////////////////////////////// |
| 271 | 271 |
| 272 DEF_GM( return new TilingGM(true); ) | 272 DEF_GM( return new TilingGM(true); ) |
| 273 DEF_GM( return new TilingGM(false); ) | 273 DEF_GM( return new TilingGM(false); ) |
| 274 DEF_GM( return new Tiling2GM(make_bm, "bitmap"); ) | 274 DEF_GM( return new Tiling2GM(make_bm, "bitmap"); ) |
| 275 DEF_GM( return new Tiling2GM(make_grad, "gradient"); ) | 275 DEF_GM( return new Tiling2GM(make_grad, "gradient"); ) |
| OLD | NEW |