Chromium Code Reviews| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 base::SPLIT_WANT_ALL); | 199 base::SPLIT_WANT_ALL); |
| 200 // Check these are legitimate MD5s. | 200 // Check these are legitimate MD5s. |
| 201 for (const std::string& md5_string : *md5_strings) { | 201 for (const std::string& md5_string : *md5_strings) { |
| 202 // Ignore the empty string added by SplitString | 202 // Ignore the empty string added by SplitString |
| 203 if (!md5_string.length()) | 203 if (!md5_string.length()) |
| 204 continue; | 204 continue; |
| 205 // Ignore comments | 205 // Ignore comments |
| 206 if (md5_string.at(0) == '#') | 206 if (md5_string.at(0) == '#') |
| 207 continue; | 207 continue; |
| 208 | 208 |
| 209 LOG_ASSERT(static_cast<int>(md5_string.length()) == kMD5StringLength) | 209 LOG_IF(ERROR, static_cast<int>(md5_string.length()) != kMD5StringLength) |
| 210 << md5_string; | 210 << "MD5 length error: " << md5_string; |
| 211 bool hex_only = std::count_if(md5_string.begin(), md5_string.end(), | 211 bool hex_only = std::count_if(md5_string.begin(), md5_string.end(), |
| 212 isxdigit) == kMD5StringLength; | 212 isxdigit) == kMD5StringLength; |
| 213 LOG_ASSERT(hex_only) << md5_string; | 213 LOG_IF(ERROR, !hex_only) << "MD5 includes non-hex char: " << md5_string; |
| 214 } | 214 } |
| 215 LOG_ASSERT(md5_strings->size() >= 1U) << " MD5 checksum file (" | 215 LOG_IF(ERROR, md5_strings->empty()) << " MD5 checksum file (" |
| 216 << filepath.MaybeAsASCII() | 216 << filepath.MaybeAsASCII() |
| 217 << ") missing or empty."; | 217 << ") missing or empty."; |
| 218 } | 218 } |
| 219 | 219 |
| 220 // State of the GLRenderingVDAClient below. Order matters here as the test | 220 // State of the GLRenderingVDAClient below. Order matters here as the test |
| 221 // makes assumptions about it. | 221 // makes assumptions about it. |
| 222 enum ClientState { | 222 enum ClientState { |
| 223 CS_CREATED = 0, | 223 CS_CREATED = 0, |
| 224 CS_DECODER_SET = 1, | 224 CS_DECODER_SET = 1, |
| 225 CS_INITIALIZED = 2, | 225 CS_INITIALIZED = 2, |
| 226 CS_FLUSHING = 3, | 226 CS_FLUSHING = 3, |
| 227 CS_FLUSHED = 4, | 227 CS_FLUSHED = 4, |
| (...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1273 // instantiated. | 1273 // instantiated. |
| 1274 // - Number of concurrent in-flight Decode() calls per decoder. | 1274 // - Number of concurrent in-flight Decode() calls per decoder. |
| 1275 // - Number of play-throughs. | 1275 // - Number of play-throughs. |
| 1276 // - reset_after_frame_num: see GLRenderingVDAClient ctor. | 1276 // - reset_after_frame_num: see GLRenderingVDAClient ctor. |
| 1277 // - delete_decoder_phase: see GLRenderingVDAClient ctor. | 1277 // - delete_decoder_phase: see GLRenderingVDAClient ctor. |
| 1278 // - whether to test slow rendering by delaying ReusePictureBuffer(). | 1278 // - whether to test slow rendering by delaying ReusePictureBuffer(). |
| 1279 // - whether the video frames are rendered as thumbnails. | 1279 // - whether the video frames are rendered as thumbnails. |
| 1280 class VideoDecodeAcceleratorParamTest | 1280 class VideoDecodeAcceleratorParamTest |
| 1281 : public VideoDecodeAcceleratorTest, | 1281 : public VideoDecodeAcceleratorTest, |
| 1282 public ::testing::WithParamInterface< | 1282 public ::testing::WithParamInterface< |
| 1283 std::tuple<int, int, int, ResetPoint, ClientState, bool, bool>> {}; | 1283 std::tuple<int, int, int, ResetPoint, ClientState, bool, bool>> { |
| 1284 protected: | |
| 1285 using NotesVector = | |
| 1286 std::vector<std::unique_ptr<ClientStateNotification<ClientState>>>; | |
| 1287 using ClientsVector = std::vector<std::unique_ptr<GLRenderingVDAClient>>; | |
| 1288 | |
| 1289 void TearDown() override; | |
| 1290 | |
| 1291 NotesVector notes_; | |
| 1292 ClientsVector clients_; | |
| 1293 }; | |
| 1294 | |
| 1295 void VideoDecodeAcceleratorParamTest::TearDown() { | |
| 1296 std::unique_ptr<ClientsVector> clients2(new ClientsVector); | |
|
Owen Lin
2017/01/05 05:56:46
This part of code looks redundant to me.
How abou
johnylin1
2017/01/05 06:52:55
I'm not sure if it is intended to do this way befo
johnylin1
2017/01/09 07:11:05
I think Owen is right. base::Passed() will do std:
| |
| 1297 clients2->swap(clients_); | |
| 1298 std::unique_ptr<NotesVector> notes2(new NotesVector); | |
| 1299 notes2->swap(notes_); | |
| 1300 | |
| 1301 // |clients_| must be deleted first because |clients_| use |notes2|. | |
| 1302 g_env->GetRenderingTaskRunner()->PostTask( | |
| 1303 FROM_HERE, base::Bind(&Delete<ClientsVector>, base::Passed(&clients2))); | |
| 1304 | |
| 1305 g_env->GetRenderingTaskRunner()->PostTask( | |
| 1306 FROM_HERE, base::Bind(&Delete<NotesVector>, base::Passed(¬es2))); | |
| 1307 | |
| 1308 WaitUntilIdle(); | |
| 1309 | |
| 1310 // Do VideoDecodeAcceleratorTest clean-up after deleting clients and notes. | |
| 1311 VideoDecodeAcceleratorTest::TearDown(); | |
| 1312 } | |
| 1284 | 1313 |
| 1285 // Wait for |note| to report a state and if it's not |expected_state| then | 1314 // Wait for |note| to report a state and if it's not |expected_state| then |
| 1286 // assert |client| has deleted its decoder. | 1315 // assert |client| has deleted its decoder. |
| 1287 static void AssertWaitForStateOrDeleted( | 1316 static void AssertWaitForStateOrDeleted( |
| 1288 ClientStateNotification<ClientState>* note, | 1317 ClientStateNotification<ClientState>* note, |
| 1289 GLRenderingVDAClient* client, | 1318 GLRenderingVDAClient* client, |
| 1290 ClientState expected_state) { | 1319 ClientState expected_state) { |
| 1291 ClientState state = note->Wait(); | 1320 ClientState state = note->Wait(); |
| 1292 if (state == expected_state) | 1321 if (state == expected_state) |
| 1293 return; | 1322 return; |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 1317 | 1346 |
| 1318 if (g_num_play_throughs > 0) | 1347 if (g_num_play_throughs > 0) |
| 1319 num_play_throughs = g_num_play_throughs; | 1348 num_play_throughs = g_num_play_throughs; |
| 1320 | 1349 |
| 1321 UpdateTestVideoFileParams(num_concurrent_decoders, reset_point, | 1350 UpdateTestVideoFileParams(num_concurrent_decoders, reset_point, |
| 1322 &test_video_files_); | 1351 &test_video_files_); |
| 1323 | 1352 |
| 1324 // Suppress GL rendering for all tests when the "--rendering_fps" is 0. | 1353 // Suppress GL rendering for all tests when the "--rendering_fps" is 0. |
| 1325 const bool suppress_rendering = g_rendering_fps == 0; | 1354 const bool suppress_rendering = g_rendering_fps == 0; |
| 1326 | 1355 |
| 1327 using NotesVector = | 1356 notes_.resize(num_concurrent_decoders); |
| 1328 std::vector<std::unique_ptr<ClientStateNotification<ClientState>>>; | 1357 clients_.resize(num_concurrent_decoders); |
| 1329 using ClientsVector = std::vector<std::unique_ptr<GLRenderingVDAClient>>; | |
| 1330 NotesVector notes(num_concurrent_decoders); | |
| 1331 ClientsVector clients(num_concurrent_decoders); | |
| 1332 | 1358 |
| 1333 RenderingHelperParams helper_params; | 1359 RenderingHelperParams helper_params; |
| 1334 helper_params.rendering_fps = g_rendering_fps; | 1360 helper_params.rendering_fps = g_rendering_fps; |
| 1335 helper_params.warm_up_iterations = g_rendering_warm_up; | 1361 helper_params.warm_up_iterations = g_rendering_warm_up; |
| 1336 helper_params.render_as_thumbnails = render_as_thumbnails; | 1362 helper_params.render_as_thumbnails = render_as_thumbnails; |
| 1337 if (render_as_thumbnails) { | 1363 if (render_as_thumbnails) { |
| 1338 // Only one decoder is supported with thumbnail rendering | 1364 // Only one decoder is supported with thumbnail rendering |
| 1339 LOG_ASSERT(num_concurrent_decoders == 1U); | 1365 LOG_ASSERT(num_concurrent_decoders == 1U); |
| 1340 helper_params.thumbnails_page_size = kThumbnailsPageSize; | 1366 helper_params.thumbnails_page_size = kThumbnailsPageSize; |
| 1341 helper_params.thumbnail_size = kThumbnailSize; | 1367 helper_params.thumbnail_size = kThumbnailSize; |
| 1342 } | 1368 } |
| 1343 | 1369 |
| 1344 // First kick off all the decoders. | 1370 // First kick off all the decoders. |
| 1345 for (size_t index = 0; index < num_concurrent_decoders; ++index) { | 1371 for (size_t index = 0; index < num_concurrent_decoders; ++index) { |
| 1346 TestVideoFile* video_file = | 1372 TestVideoFile* video_file = |
| 1347 test_video_files_[index % test_video_files_.size()].get(); | 1373 test_video_files_[index % test_video_files_.size()].get(); |
| 1348 std::unique_ptr<ClientStateNotification<ClientState>> note = | 1374 std::unique_ptr<ClientStateNotification<ClientState>> note = |
| 1349 base::MakeUnique<ClientStateNotification<ClientState>>(); | 1375 base::MakeUnique<ClientStateNotification<ClientState>>(); |
| 1350 notes[index] = std::move(note); | 1376 notes_[index] = std::move(note); |
| 1351 | 1377 |
| 1352 int delay_after_frame_num = std::numeric_limits<int>::max(); | 1378 int delay_after_frame_num = std::numeric_limits<int>::max(); |
| 1353 if (test_reuse_delay && | 1379 if (test_reuse_delay && |
| 1354 kMaxFramesToDelayReuse * 2 < video_file->num_frames) { | 1380 kMaxFramesToDelayReuse * 2 < video_file->num_frames) { |
| 1355 delay_after_frame_num = video_file->num_frames - kMaxFramesToDelayReuse; | 1381 delay_after_frame_num = video_file->num_frames - kMaxFramesToDelayReuse; |
| 1356 } | 1382 } |
| 1357 | 1383 |
| 1358 std::unique_ptr<GLRenderingVDAClient> client = | 1384 std::unique_ptr<GLRenderingVDAClient> client = |
| 1359 base::MakeUnique<GLRenderingVDAClient>( | 1385 base::MakeUnique<GLRenderingVDAClient>( |
| 1360 index, &rendering_helper_, notes[index].get(), video_file->data_str, | 1386 index, &rendering_helper_, notes_[index].get(), |
| 1361 num_in_flight_decodes, num_play_throughs, | 1387 video_file->data_str, num_in_flight_decodes, num_play_throughs, |
| 1362 video_file->reset_after_frame_num, delete_decoder_state, | 1388 video_file->reset_after_frame_num, delete_decoder_state, |
| 1363 video_file->width, video_file->height, video_file->profile, | 1389 video_file->width, video_file->height, video_file->profile, |
| 1364 g_fake_decoder, suppress_rendering, delay_after_frame_num, 0, | 1390 g_fake_decoder, suppress_rendering, delay_after_frame_num, 0, |
| 1365 render_as_thumbnails); | 1391 render_as_thumbnails); |
| 1366 | 1392 |
| 1367 clients[index] = std::move(client); | 1393 clients_[index] = std::move(client); |
| 1368 helper_params.window_sizes.push_back( | 1394 helper_params.window_sizes.push_back( |
| 1369 render_as_thumbnails | 1395 render_as_thumbnails |
| 1370 ? kThumbnailsPageSize | 1396 ? kThumbnailsPageSize |
| 1371 : gfx::Size(video_file->width, video_file->height)); | 1397 : gfx::Size(video_file->width, video_file->height)); |
| 1372 } | 1398 } |
| 1373 | 1399 |
| 1374 InitializeRenderingHelper(helper_params); | 1400 InitializeRenderingHelper(helper_params); |
| 1375 | 1401 |
| 1376 for (size_t index = 0; index < num_concurrent_decoders; ++index) { | 1402 for (size_t index = 0; index < num_concurrent_decoders; ++index) { |
| 1377 CreateAndStartDecoder(clients[index].get(), notes[index].get()); | 1403 CreateAndStartDecoder(clients_[index].get(), notes_[index].get()); |
| 1378 } | 1404 } |
| 1379 | 1405 |
| 1380 // Then wait for all the decodes to finish. | 1406 // Then wait for all the decodes to finish. |
| 1381 // Only check performance & correctness later if we play through only once. | 1407 // Only check performance & correctness later if we play through only once. |
| 1382 bool skip_performance_and_correctness_checks = num_play_throughs > 1; | 1408 bool skip_performance_and_correctness_checks = num_play_throughs > 1; |
| 1383 for (size_t i = 0; i < num_concurrent_decoders; ++i) { | 1409 for (size_t i = 0; i < num_concurrent_decoders; ++i) { |
| 1384 ClientStateNotification<ClientState>* note = notes[i].get(); | 1410 ClientStateNotification<ClientState>* note = notes_[i].get(); |
| 1385 ClientState state = note->Wait(); | 1411 ClientState state = note->Wait(); |
| 1386 if (state != CS_INITIALIZED) { | 1412 if (state != CS_INITIALIZED) { |
| 1387 skip_performance_and_correctness_checks = true; | 1413 skip_performance_and_correctness_checks = true; |
| 1388 // We expect initialization to fail only when more than the supported | 1414 // We expect initialization to fail only when more than the supported |
| 1389 // number of decoders is instantiated. Assert here that something else | 1415 // number of decoders is instantiated. Assert here that something else |
| 1390 // didn't trigger failure. | 1416 // didn't trigger failure. |
| 1391 ASSERT_GT(num_concurrent_decoders, | 1417 ASSERT_GT(num_concurrent_decoders, |
| 1392 static_cast<size_t>(kMinSupportedNumConcurrentDecoders)); | 1418 static_cast<size_t>(kMinSupportedNumConcurrentDecoders)); |
| 1393 continue; | 1419 continue; |
| 1394 } | 1420 } |
| 1395 ASSERT_EQ(state, CS_INITIALIZED); | |
| 1396 for (int n = 0; n < num_play_throughs; ++n) { | 1421 for (int n = 0; n < num_play_throughs; ++n) { |
| 1397 // For play-throughs other than the first, we expect initialization to | 1422 // For play-throughs other than the first, we expect initialization to |
| 1398 // succeed unconditionally. | 1423 // succeed unconditionally. |
| 1399 if (n > 0) { | 1424 if (n > 0) { |
| 1400 ASSERT_NO_FATAL_FAILURE(AssertWaitForStateOrDeleted( | 1425 ASSERT_NO_FATAL_FAILURE(AssertWaitForStateOrDeleted( |
| 1401 note, clients[i].get(), CS_INITIALIZED)); | 1426 note, clients_[i].get(), CS_INITIALIZED)); |
| 1402 } | 1427 } |
| 1403 // InitializeDone kicks off decoding inside the client, so we just need to | 1428 // InitializeDone kicks off decoding inside the client, so we just need to |
| 1404 // wait for Flush. | 1429 // wait for Flush. |
| 1405 ASSERT_NO_FATAL_FAILURE( | 1430 ASSERT_NO_FATAL_FAILURE( |
| 1406 AssertWaitForStateOrDeleted(note, clients[i].get(), CS_FLUSHING)); | 1431 AssertWaitForStateOrDeleted(note, clients_[i].get(), CS_FLUSHING)); |
| 1407 ASSERT_NO_FATAL_FAILURE( | 1432 ASSERT_NO_FATAL_FAILURE( |
| 1408 AssertWaitForStateOrDeleted(note, clients[i].get(), CS_FLUSHED)); | 1433 AssertWaitForStateOrDeleted(note, clients_[i].get(), CS_FLUSHED)); |
| 1409 // FlushDone requests Reset(). | 1434 // FlushDone requests Reset(). |
| 1410 ASSERT_NO_FATAL_FAILURE( | 1435 ASSERT_NO_FATAL_FAILURE( |
| 1411 AssertWaitForStateOrDeleted(note, clients[i].get(), CS_RESETTING)); | 1436 AssertWaitForStateOrDeleted(note, clients_[i].get(), CS_RESETTING)); |
| 1412 } | 1437 } |
| 1413 ASSERT_NO_FATAL_FAILURE( | 1438 ASSERT_NO_FATAL_FAILURE( |
| 1414 AssertWaitForStateOrDeleted(note, clients[i].get(), CS_RESET)); | 1439 AssertWaitForStateOrDeleted(note, clients_[i].get(), CS_RESET)); |
| 1415 // ResetDone requests Destroy(). | 1440 // ResetDone requests Destroy(). |
| 1416 ASSERT_NO_FATAL_FAILURE( | 1441 ASSERT_NO_FATAL_FAILURE( |
| 1417 AssertWaitForStateOrDeleted(note, clients[i].get(), CS_DESTROYED)); | 1442 AssertWaitForStateOrDeleted(note, clients_[i].get(), CS_DESTROYED)); |
| 1418 } | 1443 } |
| 1419 // Finally assert that decoding went as expected. | 1444 // Finally assert that decoding went as expected. |
| 1420 for (size_t i = 0; | 1445 for (size_t i = 0; |
| 1421 i < num_concurrent_decoders && !skip_performance_and_correctness_checks; | 1446 i < num_concurrent_decoders && !skip_performance_and_correctness_checks; |
| 1422 ++i) { | 1447 ++i) { |
| 1423 // We can only make performance/correctness assertions if the decoder was | 1448 // We can only make performance/correctness assertions if the decoder was |
| 1424 // allowed to finish. | 1449 // allowed to finish. |
| 1425 if (delete_decoder_state < CS_FLUSHED) | 1450 if (delete_decoder_state < CS_FLUSHED) |
| 1426 continue; | 1451 continue; |
| 1427 GLRenderingVDAClient* client = clients[i].get(); | 1452 GLRenderingVDAClient* client = clients_[i].get(); |
| 1428 TestVideoFile* video_file = | 1453 TestVideoFile* video_file = |
| 1429 test_video_files_[i % test_video_files_.size()].get(); | 1454 test_video_files_[i % test_video_files_.size()].get(); |
| 1430 if (video_file->num_frames > 0) { | 1455 if (video_file->num_frames > 0) { |
| 1431 // Expect the decoded frames may be more than the video frames as frames | 1456 // Expect the decoded frames may be more than the video frames as frames |
| 1432 // could still be returned until resetting done. | 1457 // could still be returned until resetting done. |
| 1433 if (video_file->reset_after_frame_num > 0) | 1458 if (video_file->reset_after_frame_num > 0) |
| 1434 EXPECT_GE(client->num_decoded_frames(), video_file->num_frames); | 1459 EXPECT_GE(client->num_decoded_frames(), video_file->num_frames); |
| 1435 else | 1460 else |
| 1436 EXPECT_EQ(client->num_decoded_frames(), video_file->num_frames); | 1461 EXPECT_EQ(client->num_decoded_frames(), video_file->num_frames); |
| 1437 } | 1462 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1478 std::vector<gfx::PNGCodec::Comment>(), | 1503 std::vector<gfx::PNGCodec::Comment>(), |
| 1479 &png); | 1504 &png); |
| 1480 | 1505 |
| 1481 LOG(ERROR) << "Unknown thumbnails MD5: " << md5_string; | 1506 LOG(ERROR) << "Unknown thumbnails MD5: " << md5_string; |
| 1482 | 1507 |
| 1483 base::FilePath filepath(test_video_files_[0]->file_name); | 1508 base::FilePath filepath(test_video_files_[0]->file_name); |
| 1484 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".bad_thumbnails")); | 1509 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".bad_thumbnails")); |
| 1485 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".png")); | 1510 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".png")); |
| 1486 int num_bytes = base::WriteFile( | 1511 int num_bytes = base::WriteFile( |
| 1487 filepath, reinterpret_cast<char*>(&png[0]), png.size()); | 1512 filepath, reinterpret_cast<char*>(&png[0]), png.size()); |
| 1488 ASSERT_EQ(num_bytes, static_cast<int>(png.size())); | 1513 EXPECT_EQ(num_bytes, static_cast<int>(png.size())); |
| 1489 } | 1514 } |
| 1490 ASSERT_NE(match, golden_md5s.end()); | 1515 EXPECT_NE(match, golden_md5s.end()); |
| 1491 EXPECT_EQ(alpha_solid, true) << "RGBA frame had incorrect alpha"; | 1516 EXPECT_EQ(alpha_solid, true) << "RGBA frame had incorrect alpha"; |
| 1492 } | 1517 } |
| 1493 | 1518 |
| 1494 // Output the frame delivery time to file | 1519 // Output the frame delivery time to file |
| 1495 // We can only make performance/correctness assertions if the decoder was | 1520 // We can only make performance/correctness assertions if the decoder was |
| 1496 // allowed to finish. | 1521 // allowed to finish. |
| 1497 if (g_output_log != NULL && delete_decoder_state >= CS_FLUSHED) { | 1522 if (g_output_log != NULL && delete_decoder_state >= CS_FLUSHED) { |
| 1498 base::File output_file( | 1523 base::File output_file( |
| 1499 base::FilePath(g_output_log), | 1524 base::FilePath(g_output_log), |
| 1500 base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); | 1525 base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); |
| 1501 for (size_t i = 0; i < num_concurrent_decoders; ++i) { | 1526 for (size_t i = 0; i < num_concurrent_decoders; ++i) { |
| 1502 clients[i]->OutputFrameDeliveryTimes(&output_file); | 1527 clients_[i]->OutputFrameDeliveryTimes(&output_file); |
| 1503 } | 1528 } |
| 1504 } | 1529 } |
| 1505 | |
| 1506 std::unique_ptr<ClientsVector> clients2(new ClientsVector); | |
| 1507 clients2->swap(clients); | |
| 1508 std::unique_ptr<NotesVector> notes2(new NotesVector); | |
| 1509 notes2->swap(notes); | |
| 1510 | |
| 1511 // |clients| must be deleted first because |clients| use |notes2|. | |
| 1512 g_env->GetRenderingTaskRunner()->PostTask( | |
| 1513 FROM_HERE, base::Bind(&Delete<ClientsVector>, base::Passed(&clients2))); | |
| 1514 | |
| 1515 g_env->GetRenderingTaskRunner()->PostTask( | |
| 1516 FROM_HERE, base::Bind(&Delete<NotesVector>, base::Passed(¬es2))); | |
| 1517 | |
| 1518 WaitUntilIdle(); | |
| 1519 }; | 1530 }; |
| 1520 | 1531 |
| 1521 // Test that replay after EOS works fine. | 1532 // Test that replay after EOS works fine. |
| 1522 INSTANTIATE_TEST_CASE_P( | 1533 INSTANTIATE_TEST_CASE_P( |
| 1523 ReplayAfterEOS, | 1534 ReplayAfterEOS, |
| 1524 VideoDecodeAcceleratorParamTest, | 1535 VideoDecodeAcceleratorParamTest, |
| 1525 ::testing::Values( | 1536 ::testing::Values( |
| 1526 std::make_tuple(1, 1, 4, END_OF_STREAM_RESET, CS_RESET, false, false))); | 1537 std::make_tuple(1, 1, 4, END_OF_STREAM_RESET, CS_RESET, false, false))); |
| 1527 | 1538 |
| 1528 // Test that Reset() before the first Decode() works fine. | 1539 // Test that Reset() before the first Decode() works fine. |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1825 | 1836 |
| 1826 media::g_env = | 1837 media::g_env = |
| 1827 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>( | 1838 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>( |
| 1828 testing::AddGlobalTestEnvironment( | 1839 testing::AddGlobalTestEnvironment( |
| 1829 new media::VideoDecodeAcceleratorTestEnvironment())); | 1840 new media::VideoDecodeAcceleratorTestEnvironment())); |
| 1830 | 1841 |
| 1831 return base::LaunchUnitTestsSerially( | 1842 return base::LaunchUnitTestsSerially( |
| 1832 argc, argv, | 1843 argc, argv, |
| 1833 base::Bind(&media::VDATestSuite::Run, base::Unretained(&test_suite))); | 1844 base::Bind(&media::VDATestSuite::Run, base::Unretained(&test_suite))); |
| 1834 } | 1845 } |
| OLD | NEW |