| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "base/threading/thread.h" | 48 #include "base/threading/thread.h" |
| 49 #include "content/common/gpu/media/rendering_helper.h" | 49 #include "content/common/gpu/media/rendering_helper.h" |
| 50 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h" | 50 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h" |
| 51 #include "content/public/common/content_switches.h" | 51 #include "content/public/common/content_switches.h" |
| 52 #include "ui/gfx/codec/png_codec.h" | 52 #include "ui/gfx/codec/png_codec.h" |
| 53 | 53 |
| 54 #if defined(OS_WIN) | 54 #if defined(OS_WIN) |
| 55 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" | 55 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
| 56 #elif defined(OS_CHROMEOS) | 56 #elif defined(OS_CHROMEOS) |
| 57 #if defined(ARCH_CPU_ARMEL) | 57 #if defined(ARCH_CPU_ARMEL) |
| 58 #include "content/common/gpu/media/exynos_video_decode_accelerator.h" | 58 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h" |
| 59 #elif defined(ARCH_CPU_X86_FAMILY) | 59 #elif defined(ARCH_CPU_X86_FAMILY) |
| 60 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" | 60 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" |
| 61 #include "content/common/gpu/media/vaapi_wrapper.h" | 61 #include "content/common/gpu/media/vaapi_wrapper.h" |
| 62 #endif // ARCH_CPU_ARMEL | 62 #endif // ARCH_CPU_ARMEL |
| 63 #else | 63 #else |
| 64 #error The VideoAccelerator tests are not supported on this platform. | 64 #error The VideoAccelerator tests are not supported on this platform. |
| 65 #endif // OS_WIN | 65 #endif // OS_WIN |
| 66 | 66 |
| 67 using media::VideoDecodeAccelerator; | 67 using media::VideoDecodeAccelerator; |
| 68 | 68 |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr(); | 539 base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr(); |
| 540 if (throttling_client_) { | 540 if (throttling_client_) { |
| 541 client = throttling_client_.get(); | 541 client = throttling_client_.get(); |
| 542 weak_client = throttling_client_->AsWeakPtr(); | 542 weak_client = throttling_client_->AsWeakPtr(); |
| 543 } | 543 } |
| 544 #if defined(OS_WIN) | 544 #if defined(OS_WIN) |
| 545 decoder_.reset( | 545 decoder_.reset( |
| 546 new DXVAVideoDecodeAccelerator(client, base::Bind(&DoNothingReturnTrue))); | 546 new DXVAVideoDecodeAccelerator(client, base::Bind(&DoNothingReturnTrue))); |
| 547 #elif defined(OS_CHROMEOS) | 547 #elif defined(OS_CHROMEOS) |
| 548 #if defined(ARCH_CPU_ARMEL) | 548 #if defined(ARCH_CPU_ARMEL) |
| 549 decoder_.reset(new ExynosVideoDecodeAccelerator( | 549 decoder_.reset(new V4l2VideoDecodeAccelerator( |
| 550 static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), | 550 static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), |
| 551 client, | 551 client, |
| 552 weak_client, | 552 weak_client, |
| 553 base::Bind(&DoNothingReturnTrue), | 553 base::Bind(&DoNothingReturnTrue), |
| 554 base::MessageLoopProxy::current())); | 554 base::MessageLoopProxy::current())); |
| 555 #elif defined(ARCH_CPU_X86_FAMILY) | 555 #elif defined(ARCH_CPU_X86_FAMILY) |
| 556 decoder_.reset(new VaapiVideoDecodeAccelerator( | 556 decoder_.reset(new VaapiVideoDecodeAccelerator( |
| 557 static_cast<Display*>(rendering_helper_->GetGLDisplay()), | 557 static_cast<Display*>(rendering_helper_->GetGLDisplay()), |
| 558 client, | 558 client, |
| 559 base::Bind(&DoNothingReturnTrue))); | 559 base::Bind(&DoNothingReturnTrue))); |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 } | 1514 } |
| 1515 if (it->first == "v" || it->first == "vmodule") | 1515 if (it->first == "v" || it->first == "vmodule") |
| 1516 continue; | 1516 continue; |
| 1517 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1517 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
| 1518 } | 1518 } |
| 1519 | 1519 |
| 1520 base::ShadowingAtExitManager at_exit_manager; | 1520 base::ShadowingAtExitManager at_exit_manager; |
| 1521 | 1521 |
| 1522 return RUN_ALL_TESTS(); | 1522 return RUN_ALL_TESTS(); |
| 1523 } | 1523 } |
| OLD | NEW |