| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // The bulk of this file is support code; sorry about that. Here's an overview | 5 // The bulk of this file is support code; sorry about that. Here's an overview |
| 6 // to hopefully help readers of this code: | 6 // to hopefully help readers of this code: |
| 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or | 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or |
| 8 // Win/EGL. | 8 // Win/EGL. |
| 9 // - ClientState is an enum for the state of the decode client used by the test. | 9 // - ClientState is an enum for the state of the decode client used by the test. |
| 10 // - ClientStateNotification is a barrier abstraction that allows the test code | 10 // - ClientStateNotification is a barrier abstraction that allows the test code |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 } | 184 } |
| 185 if (!fields[6].empty()) { | 185 if (!fields[6].empty()) { |
| 186 CHECK(base::StringToInt(fields[6], &video_file->min_fps_no_render)); | 186 CHECK(base::StringToInt(fields[6], &video_file->min_fps_no_render)); |
| 187 video_file->min_fps_no_render /= num_concurrent_decoders; | 187 video_file->min_fps_no_render /= num_concurrent_decoders; |
| 188 } | 188 } |
| 189 if (!fields[7].empty()) | 189 if (!fields[7].empty()) |
| 190 CHECK(base::StringToInt(fields[7], &video_file->profile)); | 190 CHECK(base::StringToInt(fields[7], &video_file->profile)); |
| 191 | 191 |
| 192 // Read in the video data. | 192 // Read in the video data. |
| 193 base::FilePath filepath(video_file->file_name); | 193 base::FilePath filepath(video_file->file_name); |
| 194 CHECK(file_util::ReadFileToString(filepath, &video_file->data_str)) | 194 CHECK(base::ReadFileToString(filepath, &video_file->data_str)) |
| 195 << "test_video_file: " << filepath.MaybeAsASCII(); | 195 << "test_video_file: " << filepath.MaybeAsASCII(); |
| 196 | 196 |
| 197 test_video_files->push_back(video_file); | 197 test_video_files->push_back(video_file); |
| 198 } | 198 } |
| 199 } | 199 } |
| 200 | 200 |
| 201 // Read in golden MD5s for the thumbnailed rendering of this video | 201 // Read in golden MD5s for the thumbnailed rendering of this video |
| 202 void ReadGoldenThumbnailMD5s(const TestVideoFile* video_file, | 202 void ReadGoldenThumbnailMD5s(const TestVideoFile* video_file, |
| 203 std::vector<std::string>* md5_strings) { | 203 std::vector<std::string>* md5_strings) { |
| 204 base::FilePath filepath(video_file->file_name); | 204 base::FilePath filepath(video_file->file_name); |
| 205 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".md5")); | 205 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".md5")); |
| 206 std::string all_md5s; | 206 std::string all_md5s; |
| 207 file_util::ReadFileToString(filepath, &all_md5s); | 207 base::ReadFileToString(filepath, &all_md5s); |
| 208 base::SplitString(all_md5s, '\n', md5_strings); | 208 base::SplitString(all_md5s, '\n', md5_strings); |
| 209 // Check these are legitimate MD5s. | 209 // Check these are legitimate MD5s. |
| 210 for (std::vector<std::string>::iterator md5_string = md5_strings->begin(); | 210 for (std::vector<std::string>::iterator md5_string = md5_strings->begin(); |
| 211 md5_string != md5_strings->end(); ++md5_string) { | 211 md5_string != md5_strings->end(); ++md5_string) { |
| 212 // Ignore the empty string added by SplitString | 212 // Ignore the empty string added by SplitString |
| 213 if (!md5_string->length()) | 213 if (!md5_string->length()) |
| 214 continue; | 214 continue; |
| 215 | 215 |
| 216 CHECK_EQ(static_cast<int>(md5_string->length()), | 216 CHECK_EQ(static_cast<int>(md5_string->length()), |
| 217 kMD5StringLength) << *md5_string; | 217 kMD5StringLength) << *md5_string; |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 #elif defined(OS_CHROMEOS) | 1394 #elif defined(OS_CHROMEOS) |
| 1395 #if defined(ARCH_CPU_ARMEL) | 1395 #if defined(ARCH_CPU_ARMEL) |
| 1396 content::ExynosVideoDecodeAccelerator::PreSandboxInitialization(); | 1396 content::ExynosVideoDecodeAccelerator::PreSandboxInitialization(); |
| 1397 #elif defined(ARCH_CPU_X86_FAMILY) | 1397 #elif defined(ARCH_CPU_X86_FAMILY) |
| 1398 content::VaapiWrapper::PreSandboxInitialization(); | 1398 content::VaapiWrapper::PreSandboxInitialization(); |
| 1399 #endif // ARCH_CPU_ARMEL | 1399 #endif // ARCH_CPU_ARMEL |
| 1400 #endif // OS_CHROMEOS | 1400 #endif // OS_CHROMEOS |
| 1401 | 1401 |
| 1402 return RUN_ALL_TESTS(); | 1402 return RUN_ALL_TESTS(); |
| 1403 } | 1403 } |
| OLD | NEW |