| 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 2715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2726 GetWebView()->sharedGraphicsContext3D(); | 2726 GetWebView()->sharedGraphicsContext3D(); |
| 2727 | 2727 |
| 2728 GpuChannelHost* gpu_channel_host = | 2728 GpuChannelHost* gpu_channel_host = |
| 2729 RenderThreadImpl::current()->EstablishGpuChannelSync( | 2729 RenderThreadImpl::current()->EstablishGpuChannelSync( |
| 2730 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 2730 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 2731 if (!gpu_channel_host) { | 2731 if (!gpu_channel_host) { |
| 2732 LOG(ERROR) << "Failed to establish GPU channel for media player"; | 2732 LOG(ERROR) << "Failed to establish GPU channel for media player"; |
| 2733 return NULL; | 2733 return NULL; |
| 2734 } | 2734 } |
| 2735 | 2735 |
| 2736 if (cmd_line->HasSwitch(switches::kMediaPlayerInRenderProcess)) { | 2736 if (cmd_line->HasSwitch(switches::kInProcessWebGL)) { |
| 2737 if (!media_bridge_manager_.get()) { | 2737 if (!media_bridge_manager_.get()) { |
| 2738 media_bridge_manager_.reset( | 2738 media_bridge_manager_.reset( |
| 2739 new webkit_media::MediaPlayerBridgeManagerImpl(1)); | 2739 new webkit_media::MediaPlayerBridgeManagerImpl(1)); |
| 2740 } | 2740 } |
| 2741 return new webkit_media::WebMediaPlayerInProcessAndroid( | 2741 return new webkit_media::WebMediaPlayerInProcessAndroid( |
| 2742 frame, | 2742 frame, |
| 2743 client, | 2743 client, |
| 2744 cookieJar(frame), | 2744 cookieJar(frame), |
| 2745 media_player_manager_.get(), | 2745 media_player_manager_.get(), |
| 2746 media_bridge_manager_.get(), | 2746 media_bridge_manager_.get(), |
| (...skipping 4004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6751 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6751 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6752 RenderProcess::current()->ReleaseTransportDIB(dib); | 6752 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6753 } | 6753 } |
| 6754 | 6754 |
| 6755 void RenderViewImpl::DidCommitCompositorFrame() { | 6755 void RenderViewImpl::DidCommitCompositorFrame() { |
| 6756 RenderWidget::DidCommitCompositorFrame(); | 6756 RenderWidget::DidCommitCompositorFrame(); |
| 6757 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); | 6757 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); |
| 6758 } | 6758 } |
| 6759 | 6759 |
| 6760 } // namespace content | 6760 } // namespace content |
| OLD | NEW |