Chromium Code Reviews| 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 5156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5167 } else { | 5167 } else { |
| 5168 GpuChannelHost* gpu_channel_host = | 5168 GpuChannelHost* gpu_channel_host = |
| 5169 RenderThreadImpl::current()->EstablishGpuChannelSync( | 5169 RenderThreadImpl::current()->EstablishGpuChannelSync( |
| 5170 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 5170 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
| 5171 | 5171 |
| 5172 if (!gpu_channel_host) { | 5172 if (!gpu_channel_host) { |
| 5173 LOG(ERROR) << "Failed to establish GPU channel for media player"; | 5173 LOG(ERROR) << "Failed to establish GPU channel for media player"; |
| 5174 return NULL; | 5174 return NULL; |
| 5175 } | 5175 } |
| 5176 | 5176 |
| 5177 scoped_refptr<cc_blink::ContextProviderWebContext> context_provider = | 5177 ContextProviderCommandBuffer* ptr = reinterpret_cast< |
|
no sievers
2015/10/27 16:58:56
this cast we still want to avoid
sivag
2015/11/05 09:42:50
Done.
| |
| 5178 RenderThreadImpl::current()->SharedMainThreadContextProvider(); | 5178 ContextProviderCommandBuffer*>( |
| 5179 RenderThreadImpl::current()->SharedMainThreadContextProvider().get()); | |
| 5180 scoped_refptr<ContextProviderCommandBuffer> context_provider(ptr); | |
| 5179 | 5181 |
| 5180 if (!context_provider.get()) { | 5182 if (!context_provider.get()) { |
| 5181 LOG(ERROR) << "Failed to get context3d for media player"; | 5183 LOG(ERROR) << "Failed to get context3d for media player"; |
| 5182 return NULL; | 5184 return NULL; |
| 5183 } | 5185 } |
| 5184 | 5186 |
| 5185 stream_texture_factory = StreamTextureFactoryImpl::Create( | 5187 stream_texture_factory = StreamTextureFactoryImpl::Create( |
| 5186 context_provider, gpu_channel_host, routing_id_); | 5188 context_provider, gpu_channel_host, routing_id_); |
| 5187 } | 5189 } |
| 5188 | 5190 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5284 mojo::ServiceProviderPtr service_provider; | 5286 mojo::ServiceProviderPtr service_provider; |
| 5285 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5287 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
| 5286 request->url = mojo::String::From(url); | 5288 request->url = mojo::String::From(url); |
| 5287 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5289 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
| 5288 nullptr, nullptr, | 5290 nullptr, nullptr, |
| 5289 base::Bind(&OnGotContentHandlerID)); | 5291 base::Bind(&OnGotContentHandlerID)); |
| 5290 return service_provider.Pass(); | 5292 return service_provider.Pass(); |
| 5291 } | 5293 } |
| 5292 | 5294 |
| 5293 } // namespace content | 5295 } // namespace content |
| OLD | NEW |