Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 12386078: Remove CompositorThread dependency on WebThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after
2776 sink = device; 2776 sink = device;
2777 DVLOG(1) << "Using AudioDeviceFactory-provided sink: " << sink; 2777 DVLOG(1) << "Using AudioDeviceFactory-provided sink: " << sink;
2778 } 2778 }
2779 } 2779 }
2780 2780
2781 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; 2781 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories;
2782 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; 2782 WebGraphicsContext3DCommandBufferImpl* context3d = NULL;
2783 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) 2783 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode))
2784 context3d = RenderThreadImpl::current()->GetGpuVDAContext3D(); 2784 context3d = RenderThreadImpl::current()->GetGpuVDAContext3D();
2785 if (context3d) { 2785 if (context3d) {
2786 scoped_refptr<base::MessageLoopProxy> factories_loop = 2786 scoped_refptr<base::MessageLoopProxy> factories_loop;
2787 RenderThreadImpl::current()->compositor_thread() ? 2787 CompositorThread* compositor_thread =
2788 RenderThreadImpl::current()->compositor_thread()->GetWebThread() 2788 RenderThreadImpl::current()->compositor_thread();
2789 ->message_loop()->message_loop_proxy() : 2789 if (compositor_thread)
2790 base::MessageLoopProxy::current(); 2790 factories_loop = compositor_thread->message_loop_proxy();
2791 else
2792 factories_loop = base::MessageLoopProxy::current();
2791 GpuChannelHost* gpu_channel_host = 2793 GpuChannelHost* gpu_channel_host =
2792 RenderThreadImpl::current()->EstablishGpuChannelSync( 2794 RenderThreadImpl::current()->EstablishGpuChannelSync(
2793 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); 2795 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
2794 gpu_factories = new RendererGpuVideoDecoderFactories( 2796 gpu_factories = new RendererGpuVideoDecoderFactories(
2795 gpu_channel_host, factories_loop, context3d); 2797 gpu_channel_host, factories_loop, context3d);
2796 } 2798 }
2797 2799
2798 webkit_media::WebMediaPlayerParams params( 2800 webkit_media::WebMediaPlayerParams params(
2799 sink, gpu_factories, new RenderMediaLog()); 2801 sink, gpu_factories, new RenderMediaLog());
2800 WebMediaPlayer* media_player = 2802 WebMediaPlayer* media_player =
(...skipping 3953 matching lines...) Expand 10 before | Expand all | Expand 10 after
6754 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6756 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6755 RenderProcess::current()->ReleaseTransportDIB(dib); 6757 RenderProcess::current()->ReleaseTransportDIB(dib);
6756 } 6758 }
6757 6759
6758 void RenderViewImpl::DidCommitCompositorFrame() { 6760 void RenderViewImpl::DidCommitCompositorFrame() {
6759 RenderWidget::DidCommitCompositorFrame(); 6761 RenderWidget::DidCommitCompositorFrame();
6760 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); 6762 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame());
6761 } 6763 }
6762 6764
6763 } // namespace content 6765 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698