| 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 } | 683 } |
| 684 | 684 |
| 685 cc::TaskGraphRunner* GpuProcessTransportFactory::GetTaskGraphRunner() { | 685 cc::TaskGraphRunner* GpuProcessTransportFactory::GetTaskGraphRunner() { |
| 686 return task_graph_runner_.get(); | 686 return task_graph_runner_.get(); |
| 687 } | 687 } |
| 688 | 688 |
| 689 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() { | 689 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() { |
| 690 return this; | 690 return this; |
| 691 } | 691 } |
| 692 | 692 |
| 693 std::unique_ptr<cc::SurfaceIdAllocator> | 693 uint32_t GpuProcessTransportFactory::AllocateSurfaceClientId() { |
| 694 GpuProcessTransportFactory::CreateSurfaceIdAllocator() { | 694 return next_surface_client_id_++; |
| 695 std::unique_ptr<cc::SurfaceIdAllocator> allocator = | |
| 696 base::WrapUnique(new cc::SurfaceIdAllocator(next_surface_client_id_++)); | |
| 697 if (GetSurfaceManager()) | |
| 698 allocator->RegisterSurfaceClientId(GetSurfaceManager()); | |
| 699 return allocator; | |
| 700 } | 695 } |
| 701 | 696 |
| 702 void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor, | 697 void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor, |
| 703 const gfx::Size& size) { | 698 const gfx::Size& size) { |
| 704 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); | 699 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); |
| 705 if (it == per_compositor_data_.end()) | 700 if (it == per_compositor_data_.end()) |
| 706 return; | 701 return; |
| 707 PerCompositorData* data = it->second; | 702 PerCompositorData* data = it->second; |
| 708 DCHECK(data); | 703 DCHECK(data); |
| 709 if (data->display) | 704 if (data->display) |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 shared_vulkan_context_provider_ = | 889 shared_vulkan_context_provider_ = |
| 895 cc::VulkanInProcessContextProvider::Create(); | 890 cc::VulkanInProcessContextProvider::Create(); |
| 896 } | 891 } |
| 897 | 892 |
| 898 shared_vulkan_context_provider_initialized_ = true; | 893 shared_vulkan_context_provider_initialized_ = true; |
| 899 } | 894 } |
| 900 return shared_vulkan_context_provider_; | 895 return shared_vulkan_context_provider_; |
| 901 } | 896 } |
| 902 | 897 |
| 903 } // namespace content | 898 } // namespace content |
| OLD | NEW |