| 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 3506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3517 WebMediaPlayerClient* client) { | 3517 WebMediaPlayerClient* client) { |
| 3518 GpuChannelHost* gpu_channel_host = | 3518 GpuChannelHost* gpu_channel_host = |
| 3519 RenderThreadImpl::current()->EstablishGpuChannelSync( | 3519 RenderThreadImpl::current()->EstablishGpuChannelSync( |
| 3520 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 3520 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 3521 if (!gpu_channel_host) { | 3521 if (!gpu_channel_host) { |
| 3522 LOG(ERROR) << "Failed to establish GPU channel for media player"; | 3522 LOG(ERROR) << "Failed to establish GPU channel for media player"; |
| 3523 return NULL; | 3523 return NULL; |
| 3524 } | 3524 } |
| 3525 | 3525 |
| 3526 scoped_refptr<StreamTextureFactory> stream_texture_factory; | 3526 scoped_refptr<StreamTextureFactory> stream_texture_factory; |
| 3527 if (GetRenderWidget()->UsingSynchronousRendererCompositor()) { | 3527 if (SynchronousCompositorFactory* factory = |
| 3528 SynchronousCompositorFactory* factory = | 3528 SynchronousCompositorFactory::GetInstance()) { |
| 3529 SynchronousCompositorFactory::GetInstance(); | |
| 3530 stream_texture_factory = factory->CreateStreamTextureFactory(routing_id_); | 3529 stream_texture_factory = factory->CreateStreamTextureFactory(routing_id_); |
| 3531 } else { | 3530 } else { |
| 3532 scoped_refptr<webkit::gpu::ContextProviderWebContext> context_provider = | 3531 scoped_refptr<webkit::gpu::ContextProviderWebContext> context_provider = |
| 3533 RenderThreadImpl::current()->SharedMainThreadContextProvider(); | 3532 RenderThreadImpl::current()->SharedMainThreadContextProvider(); |
| 3534 | 3533 |
| 3535 if (!context_provider.get()) { | 3534 if (!context_provider.get()) { |
| 3536 LOG(ERROR) << "Failed to get context3d for media player"; | 3535 LOG(ERROR) << "Failed to get context3d for media player"; |
| 3537 return NULL; | 3536 return NULL; |
| 3538 } | 3537 } |
| 3539 | 3538 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 3566 | 3565 |
| 3567 #if defined(ENABLE_BROWSER_CDMS) | 3566 #if defined(ENABLE_BROWSER_CDMS) |
| 3568 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3567 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
| 3569 if (!cdm_manager_) | 3568 if (!cdm_manager_) |
| 3570 cdm_manager_ = new RendererCdmManager(this); | 3569 cdm_manager_ = new RendererCdmManager(this); |
| 3571 return cdm_manager_; | 3570 return cdm_manager_; |
| 3572 } | 3571 } |
| 3573 #endif // defined(ENABLE_BROWSER_CDMS) | 3572 #endif // defined(ENABLE_BROWSER_CDMS) |
| 3574 | 3573 |
| 3575 } // namespace content | 3574 } // namespace content |
| OLD | NEW |