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