OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkColor.h" | 10 #include "SkColor.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 170 |
171 static void test_pref_config_table(skiatest::Reporter* reporter) { | 171 static void test_pref_config_table(skiatest::Reporter* reporter) { |
172 PrefConfigTestingImageDecoder decoder; | 172 PrefConfigTestingImageDecoder decoder; |
173 decoder.testPrefConfigTable(reporter); | 173 decoder.testPrefConfigTable(reporter); |
174 } | 174 } |
175 | 175 |
176 static void test_unpremul(skiatest::Reporter* reporter) { | 176 static void test_unpremul(skiatest::Reporter* reporter) { |
177 // This test cannot run if there is no resource path. | 177 // This test cannot run if there is no resource path. |
178 SkString resourcePath = skiatest::Test::GetResourcePath(); | 178 SkString resourcePath = skiatest::Test::GetResourcePath(); |
179 if (resourcePath.isEmpty()) { | 179 if (resourcePath.isEmpty()) { |
| 180 SkDebugf("Could not run unpremul test because resourcePath not specified
."); |
180 return; | 181 return; |
181 } | 182 } |
182 SkOSFile::Iter iter(resourcePath.c_str()); | 183 SkOSFile::Iter iter(resourcePath.c_str()); |
183 SkString basename; | 184 SkString basename; |
184 if (iter.next(&basename)) { | 185 if (iter.next(&basename)) { |
185 do { | 186 do { |
186 SkString filename = SkOSPath::SkPathJoin(resourcePath.c_str(), basen
ame.c_str()); | 187 SkString filename = SkOSPath::SkPathJoin(resourcePath.c_str(), basen
ame.c_str()); |
187 //SkDebugf("about to decode \"%s\"\n", filename.c_str()); | 188 //SkDebugf("about to decode \"%s\"\n", filename.c_str()); |
188 compare_unpremul(reporter, filename); | 189 compare_unpremul(reporter, filename); |
189 } while (iter.next(&basename)); | 190 } while (iter.next(&basename)); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 test_unpremul(reporter); | 262 test_unpremul(reporter); |
262 test_pref_config_table(reporter); | 263 test_pref_config_table(reporter); |
263 #ifdef SK_DEBUG | 264 #ifdef SK_DEBUG |
264 test_stream_life(); | 265 test_stream_life(); |
265 #endif | 266 #endif |
266 } | 267 } |
267 | 268 |
268 #include "TestClassDef.h" | 269 #include "TestClassDef.h" |
269 DEFINE_TESTCLASS("ImageDecoding", ImageDecodingTestClass, | 270 DEFINE_TESTCLASS("ImageDecoding", ImageDecodingTestClass, |
270 test_imageDecodingTests) | 271 test_imageDecodingTests) |
OLD | NEW |