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

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

Issue 1805133002: Remove content switches dependency in content/common/gpu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 9 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
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "base/strings/utf_string_conversions.h" 42 #include "base/strings/utf_string_conversions.h"
43 #include "base/synchronization/condition_variable.h" 43 #include "base/synchronization/condition_variable.h"
44 #include "base/synchronization/lock.h" 44 #include "base/synchronization/lock.h"
45 #include "base/synchronization/waitable_event.h" 45 #include "base/synchronization/waitable_event.h"
46 #include "base/thread_task_runner_handle.h" 46 #include "base/thread_task_runner_handle.h"
47 #include "base/threading/thread.h" 47 #include "base/threading/thread.h"
48 #include "build/build_config.h" 48 #include "build/build_config.h"
49 #include "content/common/gpu/media/fake_video_decode_accelerator.h" 49 #include "content/common/gpu/media/fake_video_decode_accelerator.h"
50 #include "content/common/gpu/media/rendering_helper.h" 50 #include "content/common/gpu/media/rendering_helper.h"
51 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h" 51 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h"
52 #include "content/public/common/content_switches.h"
53 #include "media/filters/h264_parser.h" 52 #include "media/filters/h264_parser.h"
54 #include "testing/gtest/include/gtest/gtest.h" 53 #include "testing/gtest/include/gtest/gtest.h"
55 #include "ui/gfx/codec/png_codec.h" 54 #include "ui/gfx/codec/png_codec.h"
56 #include "ui/gl/gl_image.h" 55 #include "ui/gl/gl_image.h"
57 56
58 #if defined(OS_WIN) 57 #if defined(OS_WIN)
59 #include "base/win/windows_version.h" 58 #include "base/win/windows_version.h"
60 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h" 59 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h"
61 #elif defined(OS_CHROMEOS) 60 #elif defined(OS_CHROMEOS)
62 #if defined(USE_V4L2_CODEC) 61 #if defined(USE_V4L2_CODEC)
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 base::Bind(&DoNothingReturnTrue))); 513 base::Bind(&DoNothingReturnTrue)));
515 } 514 }
516 return decoder; 515 return decoder;
517 } 516 }
518 517
519 scoped_ptr<media::VideoDecodeAccelerator> 518 scoped_ptr<media::VideoDecodeAccelerator>
520 GLRenderingVDAClient::CreateDXVAVDA() { 519 GLRenderingVDAClient::CreateDXVAVDA() {
521 scoped_ptr<media::VideoDecodeAccelerator> decoder; 520 scoped_ptr<media::VideoDecodeAccelerator> decoder;
522 #if defined(OS_WIN) 521 #if defined(OS_WIN)
523 if (base::win::GetVersion() >= base::win::VERSION_WIN7) { 522 if (base::win::GetVersion() >= base::win::VERSION_WIN7) {
524 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 523 const bool enable_accelerated_vpx_decode = false;
Pawel Osciak 2016/03/18 01:56:57 Removing this may prevent us from testing this fea
Peng 2016/03/18 15:16:44 Do we need pass the --enable-accelerated-vpx-decod
525 const bool enable_accelerated_vpx_decode =
526 cmd_line->HasSwitch(switches::kEnableAcceleratedVpxDecode);
527 decoder.reset(new DXVAVideoDecodeAccelerator( 524 decoder.reset(new DXVAVideoDecodeAccelerator(
528 base::Bind(&DoNothingReturnTrue), 525 base::Bind(&DoNothingReturnTrue),
529 rendering_helper_->GetGLContext().get(), 526 rendering_helper_->GetGLContext().get(),
530 enable_accelerated_vpx_decode)); 527 enable_accelerated_vpx_decode));
531 } 528 }
532 #endif 529 #endif
533 return decoder; 530 return decoder;
534 } 531 }
535 532
536 scoped_ptr<media::VideoDecodeAccelerator> 533 scoped_ptr<media::VideoDecodeAccelerator>
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 content::VaapiWrapper::PreSandboxInitialization(); 1644 content::VaapiWrapper::PreSandboxInitialization();
1648 #endif 1645 #endif
1649 1646
1650 content::g_env = 1647 content::g_env =
1651 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>( 1648 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>(
1652 testing::AddGlobalTestEnvironment( 1649 testing::AddGlobalTestEnvironment(
1653 new content::VideoDecodeAcceleratorTestEnvironment())); 1650 new content::VideoDecodeAcceleratorTestEnvironment()));
1654 1651
1655 return RUN_ALL_TESTS(); 1652 return RUN_ALL_TESTS();
1656 } 1653 }
OLDNEW
« no previous file with comments | « content/common/gpu/media/gpu_video_encode_accelerator.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698