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

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

Issue 1784193003: content gpu refactor: get rid of gpu related content switches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the compile problem on windows 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 frame_size_, 513 frame_size_,
514 base::Bind(&DoNothingReturnTrue))); 514 base::Bind(&DoNothingReturnTrue)));
515 } 515 }
516 return decoder; 516 return decoder;
517 } 517 }
518 518
519 scoped_ptr<media::VideoDecodeAccelerator> 519 scoped_ptr<media::VideoDecodeAccelerator>
520 GLRenderingVDAClient::CreateDXVAVDA() { 520 GLRenderingVDAClient::CreateDXVAVDA() {
521 scoped_ptr<media::VideoDecodeAccelerator> decoder; 521 scoped_ptr<media::VideoDecodeAccelerator> decoder;
522 #if defined(OS_WIN) 522 #if defined(OS_WIN)
523 if (base::win::GetVersion() >= base::win::VERSION_WIN7) 523 if (base::win::GetVersion() >= base::win::VERSION_WIN7) {
524 decoder.reset( 524 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
525 new DXVAVideoDecodeAccelerator( 525 const bool enable_accelerated_vpx_decode =
526 base::Bind(&DoNothingReturnTrue), 526 cmd_line->HasSwitch(switches::kEnableAcceleratedVpxDecode);
527 rendering_helper_->GetGLContext().get())); 527 decoder.reset(new DXVAVideoDecodeAccelerator(
528 base::Bind(&DoNothingReturnTrue),
529 rendering_helper_->GetGLContext().get(),
530 enable_accelerated_vpx_decode));
531 }
528 #endif 532 #endif
529 return decoder; 533 return decoder;
530 } 534 }
531 535
532 scoped_ptr<media::VideoDecodeAccelerator> 536 scoped_ptr<media::VideoDecodeAccelerator>
533 GLRenderingVDAClient::CreateV4L2VDA() { 537 GLRenderingVDAClient::CreateV4L2VDA() {
534 scoped_ptr<media::VideoDecodeAccelerator> decoder; 538 scoped_ptr<media::VideoDecodeAccelerator> decoder;
535 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) 539 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
536 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 540 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
537 if (device.get()) { 541 if (device.get()) {
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 content::VaapiWrapper::PreSandboxInitialization(); 1647 content::VaapiWrapper::PreSandboxInitialization();
1644 #endif 1648 #endif
1645 1649
1646 content::g_env = 1650 content::g_env =
1647 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>( 1651 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>(
1648 testing::AddGlobalTestEnvironment( 1652 testing::AddGlobalTestEnvironment(
1649 new content::VideoDecodeAcceleratorTestEnvironment())); 1653 new content::VideoDecodeAcceleratorTestEnvironment()));
1650 1654
1651 return RUN_ALL_TESTS(); 1655 return RUN_ALL_TESTS();
1652 } 1656 }
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_wrapper.cc ('k') | content/common/gpu/media/vt_video_decode_accelerator_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698