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

Side by Side Diff: content/common/gpu/media/video_decode_accelerator_unittest.cc

Issue 1689093002: Fix -Wunused-function warning after https://codereview.chromium.org/1673563002 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 (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 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 // - reset_after_frame_num: see GLRenderingVDAClient ctor. 1189 // - reset_after_frame_num: see GLRenderingVDAClient ctor.
1190 // - delete_decoder_phase: see GLRenderingVDAClient ctor. 1190 // - delete_decoder_phase: see GLRenderingVDAClient ctor.
1191 // - whether to test slow rendering by delaying ReusePictureBuffer(). 1191 // - whether to test slow rendering by delaying ReusePictureBuffer().
1192 // - whether the video frames are rendered as thumbnails. 1192 // - whether the video frames are rendered as thumbnails.
1193 class VideoDecodeAcceleratorParamTest 1193 class VideoDecodeAcceleratorParamTest
1194 : public VideoDecodeAcceleratorTest, 1194 : public VideoDecodeAcceleratorTest,
1195 public ::testing::WithParamInterface< 1195 public ::testing::WithParamInterface<
1196 base::Tuple<int, int, int, ResetPoint, ClientState, bool, bool> > { 1196 base::Tuple<int, int, int, ResetPoint, ClientState, bool, bool> > {
1197 }; 1197 };
1198 1198
1199 // Helper so that gtest failures emit a more readable version of the tuple than
1200 // its byte representation.
1201 ::std::ostream& operator<<(
1202 ::std::ostream& os,
1203 const base::Tuple<int, int, int, ResetPoint, ClientState, bool, bool>& t) {
1204 return os << base::get<0>(t) << ", " << base::get<1>(t) << ", "
1205 << base::get<2>(t) << ", " << base::get<3>(t) << ", "
1206 << base::get<4>(t) << ", " << base::get<5>(t) << ", "
1207 << base::get<6>(t);
1208 }
1209
1210 // Wait for |note| to report a state and if it's not |expected_state| then 1199 // Wait for |note| to report a state and if it's not |expected_state| then
1211 // assert |client| has deleted its decoder. 1200 // assert |client| has deleted its decoder.
1212 static void AssertWaitForStateOrDeleted( 1201 static void AssertWaitForStateOrDeleted(
1213 ClientStateNotification<ClientState>* note, 1202 ClientStateNotification<ClientState>* note,
1214 GLRenderingVDAClient* client, 1203 GLRenderingVDAClient* client,
1215 ClientState expected_state) { 1204 ClientState expected_state) {
1216 ClientState state = note->Wait(); 1205 ClientState state = note->Wait();
1217 if (state == expected_state) return; 1206 if (state == expected_state) return;
1218 ASSERT_TRUE(client->decoder_deleted()) 1207 ASSERT_TRUE(client->decoder_deleted())
1219 << "Decoder not deleted but Wait() returned " << state 1208 << "Decoder not deleted but Wait() returned " << state
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 content::VaapiWrapper::PreSandboxInitialization(); 1643 content::VaapiWrapper::PreSandboxInitialization();
1655 #endif 1644 #endif
1656 1645
1657 content::g_env = 1646 content::g_env =
1658 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>( 1647 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>(
1659 testing::AddGlobalTestEnvironment( 1648 testing::AddGlobalTestEnvironment(
1660 new content::VideoDecodeAcceleratorTestEnvironment())); 1649 new content::VideoDecodeAcceleratorTestEnvironment()));
1661 1650
1662 return RUN_ALL_TESTS(); 1651 return RUN_ALL_TESTS();
1663 } 1652 }
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