| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 | 9 |
| 10 namespace skiagm { | 10 namespace skiagm { |
| 11 | 11 |
| 12 // This GM exercises HighQuality anisotropic filtering. | 12 // This GM exercises HighQuality anisotropic filtering. |
| 13 class AnisotropicGM : public GM { | 13 class AnisotropicGM : public GM { |
| 14 public: | 14 public: |
| 15 AnisotropicGM() : fFilterQuality(kHigh_SkFilterQuality) { | 15 AnisotropicGM() : fFilterQuality(kHigh_SkFilterQuality) { |
| 16 this->setBGColor(sk_tool_utils::color_to_565(0xFFCCCCCC)); | 16 this->setBGColor(0xFFCCCCCC); |
| 17 } | 17 } |
| 18 | 18 |
| 19 protected: | 19 protected: |
| 20 | 20 |
| 21 SkString onShortName() override { return SkString("anisotropic_hq"); } | 21 SkString onShortName() override { return SkString("anisotropic_hq"); } |
| 22 | 22 |
| 23 SkISize onISize() override { | 23 SkISize onISize() override { |
| 24 return SkISize::Make(2*kImageSize + 3*kSpacer, | 24 return SkISize::Make(2*kImageSize + 3*kSpacer, |
| 25 kNumVertImages*kImageSize + (kNumVertImages+1)*kSpa
cer); | 25 kNumVertImages*kImageSize + (kNumVertImages+1)*kSpa
cer); |
| 26 } | 26 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 SkFilterQuality fFilterQuality; | 105 SkFilterQuality fFilterQuality; |
| 106 | 106 |
| 107 typedef GM INHERITED; | 107 typedef GM INHERITED; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 ////////////////////////////////////////////////////////////////////////////// | 110 ////////////////////////////////////////////////////////////////////////////// |
| 111 | 111 |
| 112 DEF_GM( return SkNEW(AnisotropicGM); ) | 112 DEF_GM( return SkNEW(AnisotropicGM); ) |
| 113 | 113 |
| 114 } | 114 } |
| OLD | NEW |