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

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: 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
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), rendering_helper_->GetGLContext().get(),
529 enable_accelerated_vpx_decode));
528 #endif 530 #endif
529 return decoder; 531 return decoder;
530 } 532 }
531 533
532 scoped_ptr<media::VideoDecodeAccelerator> 534 scoped_ptr<media::VideoDecodeAccelerator>
533 GLRenderingVDAClient::CreateV4L2VDA() { 535 GLRenderingVDAClient::CreateV4L2VDA() {
534 scoped_ptr<media::VideoDecodeAccelerator> decoder; 536 scoped_ptr<media::VideoDecodeAccelerator> decoder;
535 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) 537 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
536 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 538 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
537 if (device.get()) { 539 if (device.get()) {
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 content::VaapiWrapper::PreSandboxInitialization(); 1645 content::VaapiWrapper::PreSandboxInitialization();
1644 #endif 1646 #endif
1645 1647
1646 content::g_env = 1648 content::g_env =
1647 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>( 1649 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>(
1648 testing::AddGlobalTestEnvironment( 1650 testing::AddGlobalTestEnvironment(
1649 new content::VideoDecodeAcceleratorTestEnvironment())); 1651 new content::VideoDecodeAcceleratorTestEnvironment()));
1650 1652
1651 return RUN_ALL_TESTS(); 1653 return RUN_ALL_TESTS();
1652 } 1654 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698