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

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: rebase 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 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2376 // from the perspective of the audio renderer. 2376 // from the perspective of the audio renderer.
2377 audio_source_provider = new RenderAudioSourceProvider(); 2377 audio_source_provider = new RenderAudioSourceProvider();
2378 2378
2379 // Add the chrome specific audio renderer, using audio_source_provider 2379 // Add the chrome specific audio renderer, using audio_source_provider
2380 // as the sink. 2380 // as the sink.
2381 media::AudioRendererImpl* audio_renderer = 2381 media::AudioRendererImpl* audio_renderer =
2382 new media::AudioRendererImpl(audio_source_provider); 2382 new media::AudioRendererImpl(audio_source_provider);
2383 collection->AddAudioRenderer(audio_renderer); 2383 collection->AddAudioRenderer(audio_renderer);
2384 } 2384 }
2385 2385
2386 bool use_accelerated_video_decode = false;
2387 #if defined(OS_CHROMEOS)
2388 use_accelerated_video_decode = true;
2389 #endif
2390 use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch(
2391 switches::kDisableAcceleratedVideoDecode);
2386 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context3d = 2392 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context3d =
2387 !CommandLine::ForCurrentProcess()->HasSwitch( 2393 use_accelerated_video_decode ?
2388 switches::kEnableAcceleratedVideoDecode) ? 2394 RenderThreadImpl::current()->GetGpuVDAContext3D() :
2389 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>() : 2395 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>();
2390 RenderThreadImpl::current()->GetGpuVDAContext3D();
2391 if (context3d) { 2396 if (context3d) {
2392 MessageLoop* factories_loop = 2397 MessageLoop* factories_loop =
2393 RenderThreadImpl::current()->compositor_thread() ? 2398 RenderThreadImpl::current()->compositor_thread() ?
2394 RenderThreadImpl::current()->compositor_thread()->GetWebThread() 2399 RenderThreadImpl::current()->compositor_thread()->GetWebThread()
2395 ->message_loop() : 2400 ->message_loop() :
2396 MessageLoop::current(); 2401 MessageLoop::current();
2397 GpuChannelHost* gpu_channel_host = 2402 GpuChannelHost* gpu_channel_host =
2398 RenderThreadImpl::current()->EstablishGpuChannelSync( 2403 RenderThreadImpl::current()->EstablishGpuChannelSync(
2399 content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); 2404 content::CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
2400 collection->AddVideoDecoder(new media::GpuVideoDecoder( 2405 collection->AddVideoDecoder(new media::GpuVideoDecoder(
(...skipping 3316 matching lines...) Expand 10 before | Expand all | Expand 10 after
5717 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5722 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5718 return !!RenderThreadImpl::current()->compositor_thread(); 5723 return !!RenderThreadImpl::current()->compositor_thread();
5719 } 5724 }
5720 5725
5721 void RenderViewImpl::OnJavaBridgeInit() { 5726 void RenderViewImpl::OnJavaBridgeInit() {
5722 DCHECK(!java_bridge_dispatcher_); 5727 DCHECK(!java_bridge_dispatcher_);
5723 #if defined(ENABLE_JAVA_BRIDGE) 5728 #if defined(ENABLE_JAVA_BRIDGE)
5724 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5729 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5725 #endif 5730 #endif
5726 } 5731 }
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