| 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 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2580 resource_context, gpu_channel_host, routing_id_)); | 2580 resource_context, gpu_channel_host, routing_id_)); |
| 2581 #endif | 2581 #endif |
| 2582 | 2582 |
| 2583 media::MessageLoopFactory* message_loop_factory = | 2583 media::MessageLoopFactory* message_loop_factory = |
| 2584 new media::MessageLoopFactory(); | 2584 new media::MessageLoopFactory(); |
| 2585 media::FilterCollection* collection = new media::FilterCollection(); | 2585 media::FilterCollection* collection = new media::FilterCollection(); |
| 2586 RenderMediaLog* render_media_log = new RenderMediaLog(); | 2586 RenderMediaLog* render_media_log = new RenderMediaLog(); |
| 2587 | 2587 |
| 2588 RenderAudioSourceProvider* audio_source_provider = NULL; | 2588 RenderAudioSourceProvider* audio_source_provider = NULL; |
| 2589 | 2589 |
| 2590 // Add in any custom filter factories first. | 2590 // |audio_source_provider| "provides" audio to WebKit and is a sink from the |
| 2591 // perspective of the audio renderer. |
| 2591 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { | 2592 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { |
| 2592 // audio_source_provider is a "provider" to WebKit, and a sink | |
| 2593 // from the perspective of the audio renderer. | |
| 2594 audio_source_provider = new RenderAudioSourceProvider(routing_id_); | 2593 audio_source_provider = new RenderAudioSourceProvider(routing_id_); |
| 2595 | |
| 2596 // Add the chrome specific audio renderer, using audio_source_provider | |
| 2597 // as the sink. | |
| 2598 media::AudioRendererImpl* audio_renderer = | |
| 2599 new media::AudioRendererImpl(audio_source_provider); | |
| 2600 collection->AddAudioRenderer(audio_renderer); | |
| 2601 } | 2594 } |
| 2602 | 2595 |
| 2603 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; | 2596 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; |
| 2604 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) | 2597 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) |
| 2605 context3d = RenderThreadImpl::current()->GetGpuVDAContext3D(); | 2598 context3d = RenderThreadImpl::current()->GetGpuVDAContext3D(); |
| 2606 if (context3d) { | 2599 if (context3d) { |
| 2607 scoped_refptr<base::MessageLoopProxy> factories_loop = | 2600 scoped_refptr<base::MessageLoopProxy> factories_loop = |
| 2608 RenderThreadImpl::current()->compositor_thread() ? | 2601 RenderThreadImpl::current()->compositor_thread() ? |
| 2609 RenderThreadImpl::current()->compositor_thread()->GetWebThread() | 2602 RenderThreadImpl::current()->compositor_thread()->GetWebThread() |
| 2610 ->message_loop()->message_loop_proxy() : | 2603 ->message_loop()->message_loop_proxy() : |
| (...skipping 3870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6481 } | 6474 } |
| 6482 #endif | 6475 #endif |
| 6483 | 6476 |
| 6484 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6477 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6485 TransportDIB::Handle dib_handle) { | 6478 TransportDIB::Handle dib_handle) { |
| 6486 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6479 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6487 RenderProcess::current()->ReleaseTransportDIB(dib); | 6480 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6488 } | 6481 } |
| 6489 | 6482 |
| 6490 } // namespace content | 6483 } // namespace content |
| OLD | NEW |