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 14 matching lines...) Expand all Loading... |
25 // #include'ing gtest after anything that pulls in X.h fails to compile. | 25 // #include'ing gtest after anything that pulls in X.h fails to compile. |
26 // This is http://code.google.com/p/googletest/issues/detail?id=371 | 26 // This is http://code.google.com/p/googletest/issues/detail?id=371 |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 | 28 |
29 #include "base/at_exit.h" | 29 #include "base/at_exit.h" |
30 #include "base/bind.h" | 30 #include "base/bind.h" |
31 #include "base/command_line.h" | 31 #include "base/command_line.h" |
32 #include "base/file_util.h" | 32 #include "base/file_util.h" |
33 #include "base/format_macros.h" | 33 #include "base/format_macros.h" |
34 #include "base/md5.h" | 34 #include "base/md5.h" |
| 35 #include "base/message_loop/message_loop_proxy.h" |
35 #include "base/platform_file.h" | 36 #include "base/platform_file.h" |
36 #include "base/process/process.h" | 37 #include "base/process/process.h" |
37 #include "base/stl_util.h" | 38 #include "base/stl_util.h" |
38 #include "base/strings/string_number_conversions.h" | 39 #include "base/strings/string_number_conversions.h" |
39 #include "base/strings/string_split.h" | 40 #include "base/strings/string_split.h" |
40 #include "base/strings/stringize_macros.h" | 41 #include "base/strings/stringize_macros.h" |
41 #include "base/strings/stringprintf.h" | 42 #include "base/strings/stringprintf.h" |
42 #include "base/strings/utf_string_conversions.h" | 43 #include "base/strings/utf_string_conversions.h" |
43 #include "base/synchronization/condition_variable.h" | 44 #include "base/synchronization/condition_variable.h" |
44 #include "base/synchronization/lock.h" | 45 #include "base/synchronization/lock.h" |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 client = throttling_client_.get(); | 610 client = throttling_client_.get(); |
610 #if defined(OS_WIN) | 611 #if defined(OS_WIN) |
611 decoder_.reset( | 612 decoder_.reset( |
612 new DXVAVideoDecodeAccelerator(client, base::Bind(&DoNothingReturnTrue))); | 613 new DXVAVideoDecodeAccelerator(client, base::Bind(&DoNothingReturnTrue))); |
613 #elif defined(OS_CHROMEOS) | 614 #elif defined(OS_CHROMEOS) |
614 #if defined(ARCH_CPU_ARMEL) | 615 #if defined(ARCH_CPU_ARMEL) |
615 decoder_.reset(new ExynosVideoDecodeAccelerator( | 616 decoder_.reset(new ExynosVideoDecodeAccelerator( |
616 static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), | 617 static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), |
617 static_cast<EGLContext>(rendering_helper_->GetGLContext()), | 618 static_cast<EGLContext>(rendering_helper_->GetGLContext()), |
618 client, | 619 client, |
619 base::Bind(&DoNothingReturnTrue))); | 620 base::Bind(&DoNothingReturnTrue), |
| 621 base::MessageLoopProxy::current())); |
620 #elif defined(ARCH_CPU_X86_FAMILY) | 622 #elif defined(ARCH_CPU_X86_FAMILY) |
621 decoder_.reset(new VaapiVideoDecodeAccelerator( | 623 decoder_.reset(new VaapiVideoDecodeAccelerator( |
622 static_cast<Display*>(rendering_helper_->GetGLDisplay()), | 624 static_cast<Display*>(rendering_helper_->GetGLDisplay()), |
623 static_cast<GLXContext>(rendering_helper_->GetGLContext()), | 625 static_cast<GLXContext>(rendering_helper_->GetGLContext()), |
624 client, | 626 client, |
625 base::Bind(&DoNothingReturnTrue))); | 627 base::Bind(&DoNothingReturnTrue))); |
626 #endif // ARCH_CPU_ARMEL | 628 #endif // ARCH_CPU_ARMEL |
627 #endif // OS_WIN | 629 #endif // OS_WIN |
628 CHECK(decoder_.get()); | 630 CHECK(decoder_.get()); |
629 SetState(CS_DECODER_SET); | 631 SetState(CS_DECODER_SET); |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 #elif defined(OS_CHROMEOS) | 1394 #elif defined(OS_CHROMEOS) |
1393 #if defined(ARCH_CPU_ARMEL) | 1395 #if defined(ARCH_CPU_ARMEL) |
1394 content::ExynosVideoDecodeAccelerator::PreSandboxInitialization(); | 1396 content::ExynosVideoDecodeAccelerator::PreSandboxInitialization(); |
1395 #elif defined(ARCH_CPU_X86_FAMILY) | 1397 #elif defined(ARCH_CPU_X86_FAMILY) |
1396 content::VaapiWrapper::PreSandboxInitialization(); | 1398 content::VaapiWrapper::PreSandboxInitialization(); |
1397 #endif // ARCH_CPU_ARMEL | 1399 #endif // ARCH_CPU_ARMEL |
1398 #endif // OS_CHROMEOS | 1400 #endif // OS_CHROMEOS |
1399 | 1401 |
1400 return RUN_ALL_TESTS(); | 1402 return RUN_ALL_TESTS(); |
1401 } | 1403 } |
OLD | NEW |