| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 3495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3506 WebMediaPlayerClient* client) { | 3506 WebMediaPlayerClient* client) { |
| 3507 GpuChannelHost* gpu_channel_host = | 3507 GpuChannelHost* gpu_channel_host = |
| 3508 RenderThreadImpl::current()->EstablishGpuChannelSync( | 3508 RenderThreadImpl::current()->EstablishGpuChannelSync( |
| 3509 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 3509 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 3510 if (!gpu_channel_host) { | 3510 if (!gpu_channel_host) { |
| 3511 LOG(ERROR) << "Failed to establish GPU channel for media player"; | 3511 LOG(ERROR) << "Failed to establish GPU channel for media player"; |
| 3512 return NULL; | 3512 return NULL; |
| 3513 } | 3513 } |
| 3514 | 3514 |
| 3515 scoped_refptr<StreamTextureFactory> stream_texture_factory; | 3515 scoped_refptr<StreamTextureFactory> stream_texture_factory; |
| 3516 if (GetRenderWidget()->UsingSynchronousRendererCompositor()) { | 3516 if (SynchronousCompositorFactory* factory = |
| 3517 SynchronousCompositorFactory* factory = | 3517 SynchronousCompositorFactory::GetInstance()) { |
| 3518 SynchronousCompositorFactory::GetInstance(); | |
| 3519 stream_texture_factory = factory->CreateStreamTextureFactory(routing_id_); | 3518 stream_texture_factory = factory->CreateStreamTextureFactory(routing_id_); |
| 3520 } else { | 3519 } else { |
| 3521 scoped_refptr<webkit::gpu::ContextProviderWebContext> context_provider = | 3520 scoped_refptr<webkit::gpu::ContextProviderWebContext> context_provider = |
| 3522 RenderThreadImpl::current()->SharedMainThreadContextProvider(); | 3521 RenderThreadImpl::current()->SharedMainThreadContextProvider(); |
| 3523 | 3522 |
| 3524 if (!context_provider.get()) { | 3523 if (!context_provider.get()) { |
| 3525 LOG(ERROR) << "Failed to get context3d for media player"; | 3524 LOG(ERROR) << "Failed to get context3d for media player"; |
| 3526 return NULL; | 3525 return NULL; |
| 3527 } | 3526 } |
| 3528 | 3527 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 3555 | 3554 |
| 3556 #if defined(ENABLE_BROWSER_CDMS) | 3555 #if defined(ENABLE_BROWSER_CDMS) |
| 3557 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3556 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
| 3558 if (!cdm_manager_) | 3557 if (!cdm_manager_) |
| 3559 cdm_manager_ = new RendererCdmManager(this); | 3558 cdm_manager_ = new RendererCdmManager(this); |
| 3560 return cdm_manager_; | 3559 return cdm_manager_; |
| 3561 } | 3560 } |
| 3562 #endif // defined(ENABLE_BROWSER_CDMS) | 3561 #endif // defined(ENABLE_BROWSER_CDMS) |
| 3563 | 3562 |
| 3564 } // namespace content | 3563 } // namespace content |
| OLD | NEW |