OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #include "Resources.h" | 10 #include "Resources.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 virtual ~ETC1Bitmap_KTX_GM() { } | 138 virtual ~ETC1Bitmap_KTX_GM() { } |
139 | 139 |
140 protected: | 140 protected: |
141 | 141 |
142 virtual SkString fileExtension() const SK_OVERRIDE { return SkString("ktx");
} | 142 virtual SkString fileExtension() const SK_OVERRIDE { return SkString("ktx");
} |
143 | 143 |
144 private: | 144 private: |
145 typedef ETC1BitmapGM INHERITED; | 145 typedef ETC1BitmapGM INHERITED; |
146 }; | 146 }; |
147 | 147 |
| 148 // This class specializes ETC1BitmapGM to load the mandrill_128.r11.ktx file. |
| 149 class ETC1Bitmap_R11_KTX_GM : public ETC1BitmapGM { |
| 150 public: |
| 151 ETC1Bitmap_R11_KTX_GM() : ETC1BitmapGM() { } |
| 152 virtual ~ETC1Bitmap_R11_KTX_GM() { } |
| 153 |
| 154 protected: |
| 155 |
| 156 virtual SkString fileExtension() const SK_OVERRIDE { return SkString("r11.kt
x"); } |
| 157 |
| 158 private: |
| 159 typedef ETC1BitmapGM INHERITED; |
| 160 }; |
| 161 |
148 #ifndef SK_IGNORE_ETC1_SUPPORT | 162 #ifndef SK_IGNORE_ETC1_SUPPORT |
149 /** | 163 /** |
150 * Test decoding an image from a PKM file and then | 164 * Test decoding an image from a PKM file and then |
151 * from non-power-of-two compressed ETC1 data. First slice | 165 * from non-power-of-two compressed ETC1 data. First slice |
152 * off a row and column of blocks in order to make it non-power | 166 * off a row and column of blocks in order to make it non-power |
153 * of two. | 167 * of two. |
154 */ | 168 */ |
155 class ETC1Bitmap_NPOT_GM : public GM { | 169 class ETC1Bitmap_NPOT_GM : public GM { |
156 public: | 170 public: |
157 ETC1Bitmap_NPOT_GM() { } | 171 ETC1Bitmap_NPOT_GM() { } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 typedef GM INHERITED; | 218 typedef GM INHERITED; |
205 }; | 219 }; |
206 #endif // SK_IGNORE_ETC1_SUPPORT | 220 #endif // SK_IGNORE_ETC1_SUPPORT |
207 | 221 |
208 } // namespace skiagm | 222 } // namespace skiagm |
209 | 223 |
210 ////////////////////////////////////////////////////////////////////////////// | 224 ////////////////////////////////////////////////////////////////////////////// |
211 | 225 |
212 DEF_GM( return SkNEW(skiagm::ETC1Bitmap_PKM_GM); ) | 226 DEF_GM( return SkNEW(skiagm::ETC1Bitmap_PKM_GM); ) |
213 DEF_GM( return SkNEW(skiagm::ETC1Bitmap_KTX_GM); ) | 227 DEF_GM( return SkNEW(skiagm::ETC1Bitmap_KTX_GM); ) |
| 228 DEF_GM( return SkNEW(skiagm::ETC1Bitmap_R11_KTX_GM); ) |
214 | 229 |
215 #ifndef SK_IGNORE_ETC1_SUPPORT | 230 #ifndef SK_IGNORE_ETC1_SUPPORT |
216 DEF_GM( return SkNEW(skiagm::ETC1Bitmap_NPOT_GM); ) | 231 DEF_GM( return SkNEW(skiagm::ETC1Bitmap_NPOT_GM); ) |
217 #endif // SK_IGNORE_ETC1_SUPPORT | 232 #endif // SK_IGNORE_ETC1_SUPPORT |
OLD | NEW |