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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10805070: Flip HW video decode from being behind an "enable" flag to being behind a "disable" flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 // from the perspective of the audio renderer. 2360 // from the perspective of the audio renderer.
2361 audio_source_provider = new RenderAudioSourceProvider(); 2361 audio_source_provider = new RenderAudioSourceProvider();
2362 2362
2363 // Add the chrome specific audio renderer, using audio_source_provider 2363 // Add the chrome specific audio renderer, using audio_source_provider
2364 // as the sink. 2364 // as the sink.
2365 media::AudioRendererImpl* audio_renderer = 2365 media::AudioRendererImpl* audio_renderer =
2366 new media::AudioRendererImpl(audio_source_provider); 2366 new media::AudioRendererImpl(audio_source_provider);
2367 collection->AddAudioRenderer(audio_renderer); 2367 collection->AddAudioRenderer(audio_renderer);
2368 } 2368 }
2369 2369
2370 bool use_accelerated_video_decode;
jam 2012/07/23 22:51:31 nit: it would be more concise to write this as b
Ami GONE FROM CHROMIUM 2012/07/23 22:55:51 Yeah; my thought here was that this way would make
2371 #if defined(OS_WIN)
2372 use_accelerated_video_decode = false;
2373 #elif defined(OS_MACOSX)
2374 use_accelerated_video_decode = false;
2375 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
2376 use_accelerated_video_decode = false;
2377 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
2378 use_accelerated_video_decode = true;
2379 #endif
2380 use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch(
2381 switches::kDisableAcceleratedVideoDecode);
2370 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context3d = 2382 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context3d =
2371 !CommandLine::ForCurrentProcess()->HasSwitch( 2383 use_accelerated_video_decode ?
2372 switches::kEnableAcceleratedVideoDecode) ? 2384 RenderThreadImpl::current()->GetGpuVDAContext3D() :
2373 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>() : 2385 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>();
2374 RenderThreadImpl::current()->GetGpuVDAContext3D();
2375 if (context3d) { 2386 if (context3d) {
2376 MessageLoop* factories_loop = 2387 MessageLoop* factories_loop =
2377 RenderThreadImpl::current()->compositor_thread() ? 2388 RenderThreadImpl::current()->compositor_thread() ?
2378 RenderThreadImpl::current()->compositor_thread()->GetWebThread() 2389 RenderThreadImpl::current()->compositor_thread()->GetWebThread()
2379 ->message_loop() : 2390 ->message_loop() :
2380 MessageLoop::current(); 2391 MessageLoop::current();
2381 GpuChannelHost* gpu_channel_host = 2392 GpuChannelHost* gpu_channel_host =
2382 RenderThreadImpl::current()->EstablishGpuChannelSync( 2393 RenderThreadImpl::current()->EstablishGpuChannelSync(
2383 content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); 2394 content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
2384 collection->AddVideoDecoder(new media::GpuVideoDecoder( 2395 collection->AddVideoDecoder(new media::GpuVideoDecoder(
(...skipping 3316 matching lines...) Expand 10 before | Expand all | Expand 10 after
5701 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5712 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5702 return !!RenderThreadImpl::current()->compositor_thread(); 5713 return !!RenderThreadImpl::current()->compositor_thread();
5703 } 5714 }
5704 5715
5705 void RenderViewImpl::OnJavaBridgeInit() { 5716 void RenderViewImpl::OnJavaBridgeInit() {
5706 DCHECK(!java_bridge_dispatcher_); 5717 DCHECK(!java_bridge_dispatcher_);
5707 #if defined(ENABLE_JAVA_BRIDGE) 5718 #if defined(ENABLE_JAVA_BRIDGE)
5708 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5719 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5709 #endif 5720 #endif
5710 } 5721 }
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698