Chromium Code Reviews| 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 ."); | |
|
reed1
2013/10/24 20:54:21
interesting. should this be in this CL?
bungeman-skia
2013/10/24 20:58:54
Ah, I had it here because I fixed FontHostTest::te
| |
| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 266 test_pref_config_table(reporter); | 267 test_pref_config_table(reporter); |
| 267 #ifdef SK_DEBUG | 268 #ifdef SK_DEBUG |
| 268 test_stream_life(); | 269 test_stream_life(); |
| 269 test_row_proc_choice(); | 270 test_row_proc_choice(); |
| 270 #endif | 271 #endif |
| 271 } | 272 } |
| 272 | 273 |
| 273 #include "TestClassDef.h" | 274 #include "TestClassDef.h" |
| 274 DEFINE_TESTCLASS("ImageDecoding", ImageDecodingTestClass, | 275 DEFINE_TESTCLASS("ImageDecoding", ImageDecodingTestClass, |
| 275 test_imageDecodingTests) | 276 test_imageDecodingTests) |
| OLD | NEW |