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 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2400 // Add the chrome specific audio renderer, using audio_source_provider | 2400 // Add the chrome specific audio renderer, using audio_source_provider |
2401 // as the sink. | 2401 // as the sink. |
2402 media::AudioRendererImpl* audio_renderer = | 2402 media::AudioRendererImpl* audio_renderer = |
2403 new media::AudioRendererImpl(audio_source_provider); | 2403 new media::AudioRendererImpl(audio_source_provider); |
2404 collection->AddAudioRenderer(audio_renderer); | 2404 collection->AddAudioRenderer(audio_renderer); |
2405 } | 2405 } |
2406 | 2406 |
2407 // Accelerated video decode is not enabled by default on Linux. | 2407 // Accelerated video decode is not enabled by default on Linux. |
2408 // crbug.com/137247 | 2408 // crbug.com/137247 |
2409 bool use_accelerated_video_decode = false; | 2409 bool use_accelerated_video_decode = false; |
2410 #if defined(OS_CHROMEOS) || defined(OS_WIN) | 2410 #if defined(OS_CHROMEOS) |
2411 use_accelerated_video_decode = true; | 2411 use_accelerated_video_decode = true; |
2412 #endif | 2412 #endif |
2413 use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch( | 2413 use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch( |
2414 switches::kDisableAcceleratedVideoDecode); | 2414 switches::kDisableAcceleratedVideoDecode); |
2415 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context3d = | 2415 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context3d = |
2416 use_accelerated_video_decode ? | 2416 use_accelerated_video_decode ? |
2417 RenderThreadImpl::current()->GetGpuVDAContext3D() : | 2417 RenderThreadImpl::current()->GetGpuVDAContext3D() : |
2418 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>(); | 2418 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>(); |
2419 if (context3d) { | 2419 if (context3d) { |
2420 MessageLoop* factories_loop = | 2420 MessageLoop* factories_loop = |
(...skipping 3354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5775 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5775 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5776 return !!RenderThreadImpl::current()->compositor_thread(); | 5776 return !!RenderThreadImpl::current()->compositor_thread(); |
5777 } | 5777 } |
5778 | 5778 |
5779 void RenderViewImpl::OnJavaBridgeInit() { | 5779 void RenderViewImpl::OnJavaBridgeInit() { |
5780 DCHECK(!java_bridge_dispatcher_); | 5780 DCHECK(!java_bridge_dispatcher_); |
5781 #if defined(ENABLE_JAVA_BRIDGE) | 5781 #if defined(ENABLE_JAVA_BRIDGE) |
5782 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5782 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5783 #endif | 5783 #endif |
5784 } | 5784 } |
OLD | NEW |