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 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2222 // from the perspective of the audio renderer. | 2222 // from the perspective of the audio renderer. |
2223 audio_source_provider = new RenderAudioSourceProvider(); | 2223 audio_source_provider = new RenderAudioSourceProvider(); |
2224 | 2224 |
2225 // Add the chrome specific audio renderer, using audio_source_provider | 2225 // Add the chrome specific audio renderer, using audio_source_provider |
2226 // as the sink. | 2226 // as the sink. |
2227 media::AudioRendererImpl* audio_renderer = | 2227 media::AudioRendererImpl* audio_renderer = |
2228 new media::AudioRendererImpl(audio_source_provider); | 2228 new media::AudioRendererImpl(audio_source_provider); |
2229 collection->AddAudioRenderer(audio_renderer); | 2229 collection->AddAudioRenderer(audio_renderer); |
2230 } | 2230 } |
2231 | 2231 |
2232 // Currently only cros/arm has any HW video decode support in | 2232 // Currently only cros has any HW video decode support in |
2233 // GpuVideoDecodeAccelerator so we don't even try to use it on other | 2233 // GpuVideoDecodeAccelerator so we don't even try to use it on other |
2234 // platforms. This is a startup-time optimization. When new VDA | 2234 // platforms. This is a startup-time optimization. When new VDA |
2235 // implementations are added, relax the #if above. | 2235 // implementations are added, relax the #if below. |
2236 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 2236 #if defined(OS_CHROMEOS) |
2237 // Note we don't actually use the result of this blind down-cast unless it's | 2237 // Note we don't actually use the result of this blind down-cast unless it's |
2238 // valid (not NULL and of the right type). | 2238 // valid (not NULL and of the right type). |
2239 WebGraphicsContext3DCommandBufferImpl* context3d = | 2239 WebGraphicsContext3DCommandBufferImpl* context3d = |
2240 static_cast<WebGraphicsContext3DCommandBufferImpl*>( | 2240 static_cast<WebGraphicsContext3DCommandBufferImpl*>( |
2241 webview()->graphicsContext3D()); | 2241 webview()->graphicsContext3D()); |
2242 if (context_is_web_graphics_context_3d_command_buffer_impl_ && context3d) { | 2242 if (context_is_web_graphics_context_3d_command_buffer_impl_ && context3d) { |
2243 MessageLoop* factories_loop = | 2243 MessageLoop* factories_loop = |
2244 RenderThreadImpl::current()->compositor_thread() ? | 2244 RenderThreadImpl::current()->compositor_thread() ? |
2245 RenderThreadImpl::current()->compositor_thread()->GetWebThread() | 2245 RenderThreadImpl::current()->compositor_thread()->GetWebThread() |
2246 ->message_loop() : | 2246 ->message_loop() : |
(...skipping 3059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5306 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5306 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5307 return !!RenderThreadImpl::current()->compositor_thread(); | 5307 return !!RenderThreadImpl::current()->compositor_thread(); |
5308 } | 5308 } |
5309 | 5309 |
5310 void RenderViewImpl::OnJavaBridgeInit() { | 5310 void RenderViewImpl::OnJavaBridgeInit() { |
5311 DCHECK(!java_bridge_dispatcher_.get()); | 5311 DCHECK(!java_bridge_dispatcher_.get()); |
5312 #if defined(ENABLE_JAVA_BRIDGE) | 5312 #if defined(ENABLE_JAVA_BRIDGE) |
5313 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5313 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5314 #endif | 5314 #endif |
5315 } | 5315 } |
OLD | NEW |