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

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: 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
525 const bool enable_accelerated_vpx_decode = 524 const bool enable_accelerated_vpx_decode = false;
526 cmd_line->HasSwitch(switches::kEnableAcceleratedVpxDecode);
piman 2016/03/17 00:17:25 Aren't we removing functionality here?
Peng 2016/03/17 14:22:31 I didn't find any code sets this flag in code sear
Peng 2016/03/17 15:00:43 Or we could define a duplicated const string varia
DaleCurtis 2016/03/17 17:43:22 This was kept here to allow Intel and other manufa
DaleCurtis 2016/03/17 18:42:18 Whoops, just saw this is in the unittest. It's pro
527 decoder.reset(new DXVAVideoDecodeAccelerator( 525 decoder.reset(new DXVAVideoDecodeAccelerator(
528 base::Bind(&DoNothingReturnTrue), 526 base::Bind(&DoNothingReturnTrue),
529 rendering_helper_->GetGLContext().get(), 527 rendering_helper_->GetGLContext().get(),
530 enable_accelerated_vpx_decode)); 528 enable_accelerated_vpx_decode));
531 } 529 }
532 #endif 530 #endif
533 return decoder; 531 return decoder;
534 } 532 }
535 533
536 scoped_ptr<media::VideoDecodeAccelerator> 534 scoped_ptr<media::VideoDecodeAccelerator>
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 content::VaapiWrapper::PreSandboxInitialization(); 1645 content::VaapiWrapper::PreSandboxInitialization();
1648 #endif 1646 #endif
1649 1647
1650 content::g_env = 1648 content::g_env =
1651 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>( 1649 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>(
1652 testing::AddGlobalTestEnvironment( 1650 testing::AddGlobalTestEnvironment(
1653 new content::VideoDecodeAcceleratorTestEnvironment())); 1651 new content::VideoDecodeAcceleratorTestEnvironment()));
1654 1652
1655 return RUN_ALL_TESTS(); 1653 return RUN_ALL_TESTS();
1656 } 1654 }
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