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 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2399 // Add the chrome specific audio renderer, using audio_source_provider | 2399 // Add the chrome specific audio renderer, using audio_source_provider |
2400 // as the sink. | 2400 // as the sink. |
2401 media::AudioRendererImpl* audio_renderer = | 2401 media::AudioRendererImpl* audio_renderer = |
2402 new media::AudioRendererImpl(audio_source_provider); | 2402 new media::AudioRendererImpl(audio_source_provider); |
2403 collection->AddAudioRenderer(audio_renderer); | 2403 collection->AddAudioRenderer(audio_renderer); |
2404 } | 2404 } |
2405 | 2405 |
2406 // Accelerated video decode is not enabled by default on Linux. | 2406 // Accelerated video decode is not enabled by default on Linux. |
2407 // crbug.com/137247 | 2407 // crbug.com/137247 |
2408 bool use_accelerated_video_decode = false; | 2408 bool use_accelerated_video_decode = false; |
2409 #if defined(OS_CHROMEOS) | 2409 #if defined(OS_CHROMEOS) || defined(OS_WIN) |
2410 use_accelerated_video_decode = true; | 2410 use_accelerated_video_decode = true; |
2411 #endif | 2411 #endif |
2412 use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch( | 2412 use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch( |
2413 switches::kDisableAcceleratedVideoDecode); | 2413 switches::kDisableAcceleratedVideoDecode); |
2414 WebGraphicsContext3DCommandBufferImpl* context3d = | 2414 WebGraphicsContext3DCommandBufferImpl* context3d = |
2415 use_accelerated_video_decode ? | 2415 use_accelerated_video_decode ? |
2416 RenderThreadImpl::current()->GetGpuVDAContext3D() : | 2416 RenderThreadImpl::current()->GetGpuVDAContext3D() : |
2417 NULL; | 2417 NULL; |
2418 if (context3d) { | 2418 if (context3d) { |
2419 scoped_refptr<base::MessageLoopProxy> factories_loop = | 2419 scoped_refptr<base::MessageLoopProxy> factories_loop = |
(...skipping 3386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5806 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5806 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5807 return !!RenderThreadImpl::current()->compositor_thread(); | 5807 return !!RenderThreadImpl::current()->compositor_thread(); |
5808 } | 5808 } |
5809 | 5809 |
5810 void RenderViewImpl::OnJavaBridgeInit() { | 5810 void RenderViewImpl::OnJavaBridgeInit() { |
5811 DCHECK(!java_bridge_dispatcher_); | 5811 DCHECK(!java_bridge_dispatcher_); |
5812 #if defined(ENABLE_JAVA_BRIDGE) | 5812 #if defined(ENABLE_JAVA_BRIDGE) |
5813 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5813 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5814 #endif | 5814 #endif |
5815 } | 5815 } |
OLD | NEW |