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

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

Issue 1796633002: Revert of content gpu refactor: get rid of gpu related content switches. (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 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 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 524 decoder.reset(
525 const bool enable_accelerated_vpx_decode = 525 new DXVAVideoDecodeAccelerator(
526 cmd_line->HasSwitch(switches::kEnableAcceleratedVpxDecode); 526 base::Bind(&DoNothingReturnTrue),
527 decoder.reset(new DXVAVideoDecodeAccelerator( 527 rendering_helper_->GetGLContext().get()));
528 base::Bind(&DoNothingReturnTrue), rendering_helper_->GetGLContext().get(),
529 enable_accelerated_vpx_decode));
530 #endif 528 #endif
531 return decoder; 529 return decoder;
532 } 530 }
533 531
534 scoped_ptr<media::VideoDecodeAccelerator> 532 scoped_ptr<media::VideoDecodeAccelerator>
535 GLRenderingVDAClient::CreateV4L2VDA() { 533 GLRenderingVDAClient::CreateV4L2VDA() {
536 scoped_ptr<media::VideoDecodeAccelerator> decoder; 534 scoped_ptr<media::VideoDecodeAccelerator> decoder;
537 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) 535 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
538 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 536 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
539 if (device.get()) { 537 if (device.get()) {
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 content::VaapiWrapper::PreSandboxInitialization(); 1643 content::VaapiWrapper::PreSandboxInitialization();
1646 #endif 1644 #endif
1647 1645
1648 content::g_env = 1646 content::g_env =
1649 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>( 1647 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>(
1650 testing::AddGlobalTestEnvironment( 1648 testing::AddGlobalTestEnvironment(
1651 new content::VideoDecodeAcceleratorTestEnvironment())); 1649 new content::VideoDecodeAcceleratorTestEnvironment()));
1652 1650
1653 return RUN_ALL_TESTS(); 1651 return RUN_ALL_TESTS();
1654 } 1652 }
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