Chromium Code Reviews| 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 680 } | 680 } |
| 681 | 681 |
| 682 cc::TaskGraphRunner* GpuProcessTransportFactory::GetTaskGraphRunner() { | 682 cc::TaskGraphRunner* GpuProcessTransportFactory::GetTaskGraphRunner() { |
| 683 return task_graph_runner_.get(); | 683 return task_graph_runner_.get(); |
| 684 } | 684 } |
| 685 | 685 |
| 686 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() { | 686 ui::ContextFactory* GpuProcessTransportFactory::GetContextFactory() { |
| 687 return this; | 687 return this; |
| 688 } | 688 } |
| 689 | 689 |
| 690 std::unique_ptr<cc::SurfaceIdAllocator> | 690 uint32_t GpuProcessTransportFactory::AllocateSurfaceClientId() { |
| 691 GpuProcessTransportFactory::CreateSurfaceIdAllocator() { | 691 return next_surface_client_id_++; |
| 692 std::unique_ptr<cc::SurfaceIdAllocator> allocator = | |
| 693 base::WrapUnique(new cc::SurfaceIdAllocator(next_surface_client_id_++)); | |
| 694 if (GetSurfaceManager()) | |
| 695 allocator->RegisterSurfaceClientId(GetSurfaceManager()); | |
|
piman
2016/07/21 17:07:11
What does this now?
Fady Samuel
2016/07/21 17:15:01
Ooops fixed. For context on where I'm going with t
| |
| 696 return allocator; | |
| 697 } | 692 } |
| 698 | 693 |
| 699 void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor, | 694 void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor, |
| 700 const gfx::Size& size) { | 695 const gfx::Size& size) { |
| 701 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); | 696 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); |
| 702 if (it == per_compositor_data_.end()) | 697 if (it == per_compositor_data_.end()) |
| 703 return; | 698 return; |
| 704 PerCompositorData* data = it->second; | 699 PerCompositorData* data = it->second; |
| 705 DCHECK(data); | 700 DCHECK(data); |
| 706 if (data->display) | 701 if (data->display) |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 891 shared_vulkan_context_provider_ = | 886 shared_vulkan_context_provider_ = |
| 892 cc::VulkanInProcessContextProvider::Create(); | 887 cc::VulkanInProcessContextProvider::Create(); |
| 893 } | 888 } |
| 894 | 889 |
| 895 shared_vulkan_context_provider_initialized_ = true; | 890 shared_vulkan_context_provider_initialized_ = true; |
| 896 } | 891 } |
| 897 return shared_vulkan_context_provider_; | 892 return shared_vulkan_context_provider_; |
| 898 } | 893 } |
| 899 | 894 |
| 900 } // namespace content | 895 } // namespace content |
| OLD | NEW |