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 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2172 // from the perspective of the audio renderer. | 2172 // from the perspective of the audio renderer. |
2173 audio_source_provider = new RenderAudioSourceProvider(); | 2173 audio_source_provider = new RenderAudioSourceProvider(); |
2174 | 2174 |
2175 // Add the chrome specific audio renderer, using audio_source_provider | 2175 // Add the chrome specific audio renderer, using audio_source_provider |
2176 // as the sink. | 2176 // as the sink. |
2177 AudioRendererImpl* audio_renderer = | 2177 AudioRendererImpl* audio_renderer = |
2178 new AudioRendererImpl(audio_source_provider); | 2178 new AudioRendererImpl(audio_source_provider); |
2179 collection->AddAudioRenderer(audio_renderer); | 2179 collection->AddAudioRenderer(audio_renderer); |
2180 } | 2180 } |
2181 | 2181 |
2182 // Currently only cros/arm has any HW video decode support in | 2182 // Currently only cros has any HW video decode support in |
2183 // GpuVideoDecodeAccelerator so we don't even try to use it on other | 2183 // GpuVideoDecodeAccelerator so we don't even try to use it on other |
2184 // platforms. This is a startup-time optimization. When new VDA | 2184 // platforms. This is a startup-time optimization. When new VDA |
2185 // implementations are added, relax the #if above. | 2185 // implementations are added, relax the #if below. |
2186 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 2186 #if defined(OS_CHROMEOS) |
2187 // Note we don't actually use the result of this blind down-cast unless it's | 2187 // Note we don't actually use the result of this blind down-cast unless it's |
2188 // valid (not NULL and of the right type). | 2188 // valid (not NULL and of the right type). |
2189 WebGraphicsContext3DCommandBufferImpl* context3d = | 2189 WebGraphicsContext3DCommandBufferImpl* context3d = |
2190 static_cast<WebGraphicsContext3DCommandBufferImpl*>( | 2190 static_cast<WebGraphicsContext3DCommandBufferImpl*>( |
2191 webview()->graphicsContext3D()); | 2191 webview()->graphicsContext3D()); |
2192 if (context_is_web_graphics_context_3d_command_buffer_impl_ && context3d) { | 2192 if (context_is_web_graphics_context_3d_command_buffer_impl_ && context3d) { |
2193 MessageLoop* factories_loop = | 2193 MessageLoop* factories_loop = |
2194 RenderThreadImpl::current()->compositor_thread() ? | 2194 RenderThreadImpl::current()->compositor_thread() ? |
2195 RenderThreadImpl::current()->compositor_thread()->GetWebThread() | 2195 RenderThreadImpl::current()->compositor_thread()->GetWebThread() |
2196 ->message_loop() : | 2196 ->message_loop() : |
(...skipping 3036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5233 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5233 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5234 return !!RenderThreadImpl::current()->compositor_thread(); | 5234 return !!RenderThreadImpl::current()->compositor_thread(); |
5235 } | 5235 } |
5236 | 5236 |
5237 void RenderViewImpl::OnJavaBridgeInit() { | 5237 void RenderViewImpl::OnJavaBridgeInit() { |
5238 DCHECK(!java_bridge_dispatcher_.get()); | 5238 DCHECK(!java_bridge_dispatcher_.get()); |
5239 #if defined(ENABLE_JAVA_BRIDGE) | 5239 #if defined(ENABLE_JAVA_BRIDGE) |
5240 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5240 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5241 #endif | 5241 #endif |
5242 } | 5242 } |
OLD | NEW |