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 2134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2145 // from the perspective of the audio renderer. | 2145 // from the perspective of the audio renderer. |
2146 audio_source_provider = new RenderAudioSourceProvider(); | 2146 audio_source_provider = new RenderAudioSourceProvider(); |
2147 | 2147 |
2148 // Add the chrome specific audio renderer, using audio_source_provider | 2148 // Add the chrome specific audio renderer, using audio_source_provider |
2149 // as the sink. | 2149 // as the sink. |
2150 AudioRendererImpl* audio_renderer = | 2150 AudioRendererImpl* audio_renderer = |
2151 new AudioRendererImpl(audio_source_provider); | 2151 new AudioRendererImpl(audio_source_provider); |
2152 collection->AddAudioRenderer(audio_renderer); | 2152 collection->AddAudioRenderer(audio_renderer); |
2153 } | 2153 } |
2154 | 2154 |
2155 // Currently only cros/arm has any HW video decode support in | 2155 // Currently only cros has any HW video decode support in |
2156 // GpuVideoDecodeAccelerator so we don't even try to use it on other | 2156 // GpuVideoDecodeAccelerator so we don't even try to use it on other |
2157 // platforms. This is a startup-time optimization. When new VDA | 2157 // platforms. This is a startup-time optimization. When new VDA |
2158 // implementations are added, relax the #if above. | 2158 // implementations are added, relax the #if above. |
Ami GONE FROM CHROMIUM
2012/03/21 13:16:24
s/above/below/
Pawel Osciak
2012/04/05 10:37:20
Done.
| |
2159 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 2159 #if defined(OS_CHROMEOS) \ |
2160 && (defined(ARCH_CPU_ARMEL) || defined(ARCH_CPU_X86_FAMILY)) | |
Ami GONE FROM CHROMIUM
2012/03/21 13:16:24
&& belongs on previous line
Ami GONE FROM CHROMIUM
2012/03/21 13:16:24
are there any cros platforms *other* than x86 & ar
Pawel Osciak
2012/03/21 18:40:35
Not that I am aware of. Wanted to be extra safe. D
Ami GONE FROM CHROMIUM
2012/03/22 17:01:36
Yes please.
Pawel Osciak
2012/04/05 10:37:20
Done.
| |
2161 // Currently only cros has any HW video decode support in | |
Ami GONE FROM CHROMIUM
2012/03/21 13:16:24
delete?
Pawel Osciak
2012/03/21 18:40:35
Your call, was here before :)
Ami GONE FROM CHROMIUM
2012/03/22 17:01:36
You duplicated the pre-existing line.
(note this i
Pawel Osciak
2012/04/05 10:37:20
Done.
| |
2160 // Note we don't actually use the result of this blind down-cast unless it's | 2162 // Note we don't actually use the result of this blind down-cast unless it's |
2161 // valid (not NULL and of the right type). | 2163 // valid (not NULL and of the right type). |
2162 WebGraphicsContext3DCommandBufferImpl* context3d = | 2164 WebGraphicsContext3DCommandBufferImpl* context3d = |
Ami GONE FROM CHROMIUM
2012/03/21 13:16:24
Why bother going all the way to the GPU process to
Pawel Osciak
2012/04/05 10:37:20
Do we want to have one common flag then for accele
| |
2163 static_cast<WebGraphicsContext3DCommandBufferImpl*>( | 2165 static_cast<WebGraphicsContext3DCommandBufferImpl*>( |
2164 webview()->graphicsContext3D()); | 2166 webview()->graphicsContext3D()); |
2165 if (context_is_web_graphics_context_3d_command_buffer_impl_ && context3d) { | 2167 if (context_is_web_graphics_context_3d_command_buffer_impl_ && context3d) { |
2166 MessageLoop* factories_loop = | 2168 MessageLoop* factories_loop = |
2167 RenderThreadImpl::current()->compositor_thread() ? | 2169 RenderThreadImpl::current()->compositor_thread() ? |
2168 RenderThreadImpl::current()->compositor_thread()->GetWebThread() | 2170 RenderThreadImpl::current()->compositor_thread()->GetWebThread() |
2169 ->message_loop() : | 2171 ->message_loop() : |
2170 MessageLoop::current(); | 2172 MessageLoop::current(); |
2171 GpuChannelHost* gpu_channel_host = | 2173 GpuChannelHost* gpu_channel_host = |
2172 RenderThreadImpl::current()->EstablishGpuChannelSync( | 2174 RenderThreadImpl::current()->EstablishGpuChannelSync( |
(...skipping 3012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5185 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5187 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5186 return !!RenderThreadImpl::current()->compositor_thread(); | 5188 return !!RenderThreadImpl::current()->compositor_thread(); |
5187 } | 5189 } |
5188 | 5190 |
5189 void RenderViewImpl::OnJavaBridgeInit() { | 5191 void RenderViewImpl::OnJavaBridgeInit() { |
5190 DCHECK(!java_bridge_dispatcher_.get()); | 5192 DCHECK(!java_bridge_dispatcher_.get()); |
5191 #if defined(ENABLE_JAVA_BRIDGE) | 5193 #if defined(ENABLE_JAVA_BRIDGE) |
5192 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5194 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5193 #endif | 5195 #endif |
5194 } | 5196 } |
OLD | NEW |