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 uint32_t client_id = next_surface_client_id_++; |
692 std::unique_ptr<cc::SurfaceIdAllocator> allocator = | |
693 base::WrapUnique(new cc::SurfaceIdAllocator(next_surface_client_id_++)); | |
694 if (GetSurfaceManager()) | 692 if (GetSurfaceManager()) |
695 allocator->RegisterSurfaceClientId(GetSurfaceManager()); | 693 GetSurfaceManager()->RegisterSurfaceClientId(client_id); |
piman
2016/07/21 17:19:47
So, the previous code also relied on SurfaceIdAllo
Fady Samuel
2016/07/21 17:22:23
Well, it is still needed, but SurfaceIdAllocator w
piman
2016/07/21 17:28:40
With this patch, the SurfaceIdAllocator doesn't kn
Fady Samuel
2016/07/21 20:43:33
I've made all the clients that create SurfaceIdAll
| |
696 return allocator; | 694 return client_id; |
697 } | 695 } |
698 | 696 |
699 void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor, | 697 void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor, |
700 const gfx::Size& size) { | 698 const gfx::Size& size) { |
701 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); | 699 PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor); |
702 if (it == per_compositor_data_.end()) | 700 if (it == per_compositor_data_.end()) |
703 return; | 701 return; |
704 PerCompositorData* data = it->second; | 702 PerCompositorData* data = it->second; |
705 DCHECK(data); | 703 DCHECK(data); |
706 if (data->display) | 704 if (data->display) |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
891 shared_vulkan_context_provider_ = | 889 shared_vulkan_context_provider_ = |
892 cc::VulkanInProcessContextProvider::Create(); | 890 cc::VulkanInProcessContextProvider::Create(); |
893 } | 891 } |
894 | 892 |
895 shared_vulkan_context_provider_initialized_ = true; | 893 shared_vulkan_context_provider_initialized_ = true; |
896 } | 894 } |
897 return shared_vulkan_context_provider_; | 895 return shared_vulkan_context_provider_; |
898 } | 896 } |
899 | 897 |
900 } // namespace content | 898 } // namespace content |
OLD | NEW |