| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 | 8 |
| 9 // This test only works with the GPU backend. | 9 // This test only works with the GPU backend. |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 TextureDomainEffect() { | 28 TextureDomainEffect() { |
| 29 this->setBGColor(0xFFFFFFFF); | 29 this->setBGColor(0xFFFFFFFF); |
| 30 } | 30 } |
| 31 | 31 |
| 32 protected: | 32 protected: |
| 33 virtual SkString onShortName() SK_OVERRIDE { | 33 virtual SkString onShortName() SK_OVERRIDE { |
| 34 return SkString("texture_domain_effect"); | 34 return SkString("texture_domain_effect"); |
| 35 } | 35 } |
| 36 | 36 |
| 37 virtual SkISize onISize() SK_OVERRIDE { | 37 virtual SkISize onISize() SK_OVERRIDE { |
| 38 return make_isize(400, 800); | 38 return SkISize::Make(400, 800); |
| 39 } | 39 } |
| 40 | 40 |
| 41 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 41 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 42 // This is a GPU-specific GM. | 42 // This is a GPU-specific GM. |
| 43 return kGPUOnly_Flag; | 43 return kGPUOnly_Flag; |
| 44 } | 44 } |
| 45 | 45 |
| 46 virtual void onOnceBeforeDraw() SK_OVERRIDE { | 46 virtual void onOnceBeforeDraw() SK_OVERRIDE { |
| 47 fBmp.allocN32Pixels(100, 100); | 47 fBmp.allocN32Pixels(100, 100); |
| 48 SkCanvas canvas(fBmp); | 48 SkCanvas canvas(fBmp); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 private: | 150 private: |
| 151 SkBitmap fBmp; | 151 SkBitmap fBmp; |
| 152 | 152 |
| 153 typedef GM INHERITED; | 153 typedef GM INHERITED; |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 DEF_GM( return SkNEW(TextureDomainEffect); ) | 156 DEF_GM( return SkNEW(TextureDomainEffect); ) |
| 157 } | 157 } |
| 158 | 158 |
| 159 #endif | 159 #endif |
| OLD | NEW |