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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 ui::command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); | 449 ui::command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); |
450 // TODO(vadimt): Remove ScopedTracker below once crbug.com/125248 is | 450 // TODO(vadimt): Remove ScopedTracker below once crbug.com/125248 is |
451 // fixed. Tracking time in BindToCurrentThread. | 451 // fixed. Tracking time in BindToCurrentThread. |
452 tracked_objects::ScopedTracker tracking_profile( | 452 tracked_objects::ScopedTracker tracking_profile( |
453 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 453 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
454 "125248" | 454 "125248" |
455 " GpuProcessTransportFactory::EstablishedGpuChannel" | 455 " GpuProcessTransportFactory::EstablishedGpuChannel" |
456 "::Compositor")); | 456 "::Compositor")); |
457 #if defined(OS_MACOSX) | 457 #if defined(OS_MACOSX) |
458 // On Mac, GpuCommandBufferMsg_SwapBuffersCompleted must be handled in | 458 // On Mac, GpuCommandBufferMsg_SwapBuffersCompleted must be handled in |
459 // a nested message loop during resize. | 459 // a nested run loop during resize. |
460 context_provider->SetDefaultTaskRunner( | 460 context_provider->SetDefaultTaskRunner( |
461 ui::WindowResizeHelperMac::Get()->task_runner()); | 461 ui::WindowResizeHelperMac::Get()->task_runner()); |
462 #endif | 462 #endif |
463 if (!context_provider->BindToCurrentThread()) | 463 if (!context_provider->BindToCurrentThread()) |
464 context_provider = nullptr; | 464 context_provider = nullptr; |
465 } | 465 } |
466 } | 466 } |
467 | 467 |
468 bool created_gpu_browser_compositor = | 468 bool created_gpu_browser_compositor = |
469 !!context_provider && !!shared_worker_context_provider_; | 469 !!context_provider && !!shared_worker_context_provider_; |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 shared_vulkan_context_provider_ = | 943 shared_vulkan_context_provider_ = |
944 cc::VulkanInProcessContextProvider::Create(); | 944 cc::VulkanInProcessContextProvider::Create(); |
945 } | 945 } |
946 | 946 |
947 shared_vulkan_context_provider_initialized_ = true; | 947 shared_vulkan_context_provider_initialized_ = true; |
948 } | 948 } |
949 return shared_vulkan_context_provider_; | 949 return shared_vulkan_context_provider_; |
950 } | 950 } |
951 | 951 |
952 } // namespace content | 952 } // namespace content |
OLD | NEW |