Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: media/gpu/video_encode_accelerator_unittest.cc

Issue 2561063002: VEA unittest: fix cache line-alignment test hang issue (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include <inttypes.h> 5 #include <inttypes.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 2106
2107 encoder_thread.task_runner()->PostTask( 2107 encoder_thread.task_runner()->PostTask(
2108 FROM_HERE, 2108 FROM_HERE,
2109 base::Bind(&TestClient::CreateEncoder, base::Unretained(client.get()))); 2109 base::Bind(&TestClient::CreateEncoder, base::Unretained(client.get())));
2110 2110
2111 // Encoder must pass through states in this order. 2111 // Encoder must pass through states in this order.
2112 enum ClientState state_transitions[] = {CS_INITIALIZED, CS_ENCODING, 2112 enum ClientState state_transitions[] = {CS_INITIALIZED, CS_ENCODING,
2113 CS_FINISHED}; 2113 CS_FINISHED};
2114 2114
2115 for (const auto& state : state_transitions) { 2115 for (const auto& state : state_transitions) {
2116 EXPECT_EQ(state, note->Wait()); 2116 ClientState wait_state = note->Wait();
2117 EXPECT_EQ(state, wait_state);
2118 if (state != wait_state) {
2119 break;
2120 }
2117 } 2121 }
2118 2122
2119 encoder_thread.task_runner()->PostTask( 2123 encoder_thread.task_runner()->PostTask(
2120 FROM_HERE, 2124 FROM_HERE,
2121 base::Bind(&TestClient::DestroyEncoder, base::Unretained(client.get()))); 2125 base::Bind(&TestClient::DestroyEncoder, base::Unretained(client.get())));
2122 2126
2123 // This ensures all tasks have finished. 2127 // This ensures all tasks have finished.
2124 encoder_thread.Stop(); 2128 encoder_thread.Stop();
2125 } 2129 }
2126 2130
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 2327
2324 media::g_env = 2328 media::g_env =
2325 reinterpret_cast<media::VideoEncodeAcceleratorTestEnvironment*>( 2329 reinterpret_cast<media::VideoEncodeAcceleratorTestEnvironment*>(
2326 testing::AddGlobalTestEnvironment( 2330 testing::AddGlobalTestEnvironment(
2327 new media::VideoEncodeAcceleratorTestEnvironment( 2331 new media::VideoEncodeAcceleratorTestEnvironment(
2328 std::move(test_stream_data), log_path, run_at_fps, 2332 std::move(test_stream_data), log_path, run_at_fps,
2329 needs_encode_latency, verify_all_output))); 2333 needs_encode_latency, verify_all_output)));
2330 2334
2331 return RUN_ALL_TESTS(); 2335 return RUN_ALL_TESTS();
2332 } 2336 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698