OLD | NEW |
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 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2368 // from the perspective of the audio renderer. | 2368 // from the perspective of the audio renderer. |
2369 audio_source_provider = new RenderAudioSourceProvider(); | 2369 audio_source_provider = new RenderAudioSourceProvider(); |
2370 | 2370 |
2371 // Add the chrome specific audio renderer, using audio_source_provider | 2371 // Add the chrome specific audio renderer, using audio_source_provider |
2372 // as the sink. | 2372 // as the sink. |
2373 media::AudioRendererImpl* audio_renderer = | 2373 media::AudioRendererImpl* audio_renderer = |
2374 new media::AudioRendererImpl(audio_source_provider); | 2374 new media::AudioRendererImpl(audio_source_provider); |
2375 collection->AddAudioRenderer(audio_renderer); | 2375 collection->AddAudioRenderer(audio_renderer); |
2376 } | 2376 } |
2377 | 2377 |
| 2378 // Accelerated video decode is not enabled by default on Linux. |
| 2379 // crbug.com/137247 |
2378 bool use_accelerated_video_decode = false; | 2380 bool use_accelerated_video_decode = false; |
2379 #if defined(OS_CHROMEOS) | 2381 #if defined(OS_CHROMEOS) |
2380 use_accelerated_video_decode = true; | 2382 use_accelerated_video_decode = true; |
2381 #endif | 2383 #endif |
2382 use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch( | 2384 use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch( |
2383 switches::kDisableAcceleratedVideoDecode); | 2385 switches::kDisableAcceleratedVideoDecode); |
2384 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context3d = | 2386 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context3d = |
2385 use_accelerated_video_decode ? | 2387 use_accelerated_video_decode ? |
2386 RenderThreadImpl::current()->GetGpuVDAContext3D() : | 2388 RenderThreadImpl::current()->GetGpuVDAContext3D() : |
2387 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>(); | 2389 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>(); |
(...skipping 3325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5713 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5715 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5714 return !!RenderThreadImpl::current()->compositor_thread(); | 5716 return !!RenderThreadImpl::current()->compositor_thread(); |
5715 } | 5717 } |
5716 | 5718 |
5717 void RenderViewImpl::OnJavaBridgeInit() { | 5719 void RenderViewImpl::OnJavaBridgeInit() { |
5718 DCHECK(!java_bridge_dispatcher_); | 5720 DCHECK(!java_bridge_dispatcher_); |
5719 #if defined(ENABLE_JAVA_BRIDGE) | 5721 #if defined(ENABLE_JAVA_BRIDGE) |
5720 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5722 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5721 #endif | 5723 #endif |
5722 } | 5724 } |
OLD | NEW |