OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/compositor/gpu_process_transport_factory.h" | 5 #include "content/browser/compositor/gpu_process_transport_factory.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 output_surface_map_.Remove(data->surface_handle); | 282 output_surface_map_.Remove(data->surface_handle); |
283 #endif | 283 #endif |
284 data->surface = nullptr; | 284 data->surface = nullptr; |
285 } | 285 } |
286 | 286 |
287 #if defined(OS_WIN) | 287 #if defined(OS_WIN) |
288 gfx::RenderingWindowManager::GetInstance()->UnregisterParent( | 288 gfx::RenderingWindowManager::GetInstance()->UnregisterParent( |
289 compositor->widget()); | 289 compositor->widget()); |
290 #endif | 290 #endif |
291 | 291 |
292 const bool use_vulkan = SharedVulkanContextProvider(); | 292 const bool use_vulkan = static_cast<bool>(SharedVulkanContextProvider()); |
293 | 293 |
294 const bool create_gpu_output_surface = | 294 const bool create_gpu_output_surface = |
295 ShouldCreateGpuOutputSurface(compositor.get()); | 295 ShouldCreateGpuOutputSurface(compositor.get()); |
296 if (create_gpu_output_surface && !use_vulkan) { | 296 if (create_gpu_output_surface && !use_vulkan) { |
297 BrowserGpuChannelHostFactory::instance()->EstablishGpuChannel( | 297 BrowserGpuChannelHostFactory::instance()->EstablishGpuChannel( |
298 CAUSE_FOR_GPU_LAUNCH_SHARED_WORKER_THREAD_CONTEXT, | 298 CAUSE_FOR_GPU_LAUNCH_SHARED_WORKER_THREAD_CONTEXT, |
299 base::Bind(&GpuProcessTransportFactory::EstablishedGpuChannel, | 299 base::Bind(&GpuProcessTransportFactory::EstablishedGpuChannel, |
300 callback_factory_.GetWeakPtr(), compositor, | 300 callback_factory_.GetWeakPtr(), compositor, |
301 create_gpu_output_surface, 0)); | 301 create_gpu_output_surface, 0)); |
302 } else { | 302 } else { |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 shared_vulkan_context_provider_ = | 785 shared_vulkan_context_provider_ = |
786 cc::VulkanInProcessContextProvider::Create(); | 786 cc::VulkanInProcessContextProvider::Create(); |
787 } | 787 } |
788 | 788 |
789 shared_vulkan_context_provider_initialized_ = true; | 789 shared_vulkan_context_provider_initialized_ = true; |
790 } | 790 } |
791 return shared_vulkan_context_provider_; | 791 return shared_vulkan_context_provider_; |
792 } | 792 } |
793 | 793 |
794 } // namespace content | 794 } // namespace content |
OLD | NEW |