| 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/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 2757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2768 } | 2768 } |
| 2769 | 2769 |
| 2770 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; | 2770 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; |
| 2771 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; | 2771 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; |
| 2772 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) | 2772 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) |
| 2773 context3d = RenderThreadImpl::current()->GetGpuVDAContext3D(); | 2773 context3d = RenderThreadImpl::current()->GetGpuVDAContext3D(); |
| 2774 if (context3d) { | 2774 if (context3d) { |
| 2775 scoped_refptr<base::MessageLoopProxy> factories_loop = | 2775 scoped_refptr<base::MessageLoopProxy> factories_loop = |
| 2776 RenderThreadImpl::current()->compositor_thread() ? | 2776 RenderThreadImpl::current()->compositor_thread() ? |
| 2777 RenderThreadImpl::current()->compositor_thread()->GetWebThread() | 2777 RenderThreadImpl::current()->compositor_thread()->GetWebThread() |
| 2778 ->message_loop()->message_loop_proxy() : | 2778 ->message_loop_proxy() : |
| 2779 base::MessageLoopProxy::current(); | 2779 base::MessageLoopProxy::current(); |
| 2780 GpuChannelHost* gpu_channel_host = | 2780 GpuChannelHost* gpu_channel_host = |
| 2781 RenderThreadImpl::current()->EstablishGpuChannelSync( | 2781 RenderThreadImpl::current()->EstablishGpuChannelSync( |
| 2782 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 2782 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 2783 gpu_factories = new RendererGpuVideoDecoderFactories( | 2783 gpu_factories = new RendererGpuVideoDecoderFactories( |
| 2784 gpu_channel_host, factories_loop, context3d); | 2784 gpu_channel_host, factories_loop, context3d); |
| 2785 } | 2785 } |
| 2786 | 2786 |
| 2787 webkit_media::WebMediaPlayerParams params( | 2787 webkit_media::WebMediaPlayerParams params( |
| 2788 sink, gpu_factories, media_stream_impl_, new RenderMediaLog()); | 2788 sink, gpu_factories, media_stream_impl_, new RenderMediaLog()); |
| (...skipping 3939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6728 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6728 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6729 RenderProcess::current()->ReleaseTransportDIB(dib); | 6729 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6730 } | 6730 } |
| 6731 | 6731 |
| 6732 void RenderViewImpl::DidCommitCompositorFrame() { | 6732 void RenderViewImpl::DidCommitCompositorFrame() { |
| 6733 RenderWidget::DidCommitCompositorFrame(); | 6733 RenderWidget::DidCommitCompositorFrame(); |
| 6734 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); | 6734 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); |
| 6735 } | 6735 } |
| 6736 | 6736 |
| 6737 } // namespace content | 6737 } // namespace content |
| OLD | NEW |