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 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 | 12 |
13 #include "base/id_map.h" | 13 #include "base/id_map.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 19 #include "cc/surfaces/frame_sink_id_allocator.h" |
19 #include "content/browser/compositor/image_transport_factory.h" | 20 #include "content/browser/compositor/image_transport_factory.h" |
20 #include "gpu/ipc/client/gpu_channel_host.h" | 21 #include "gpu/ipc/client/gpu_channel_host.h" |
21 #include "ui/compositor/compositor.h" | 22 #include "ui/compositor/compositor.h" |
22 | 23 |
23 namespace cc { | 24 namespace cc { |
24 class SingleThreadTaskGraphRunner; | 25 class SingleThreadTaskGraphRunner; |
25 class SoftwareOutputDevice; | 26 class SoftwareOutputDevice; |
26 class SurfaceManager; | 27 class SurfaceManager; |
27 class VulkanInProcessContextProvider; | 28 class VulkanInProcessContextProvider; |
28 } | 29 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 int num_attempts, | 97 int num_attempts, |
97 scoped_refptr<gpu::GpuChannelHost> established_channel_host); | 98 scoped_refptr<gpu::GpuChannelHost> established_channel_host); |
98 | 99 |
99 void OnLostMainThreadSharedContextInsideCallback(); | 100 void OnLostMainThreadSharedContextInsideCallback(); |
100 void OnLostMainThreadSharedContext(); | 101 void OnLostMainThreadSharedContext(); |
101 | 102 |
102 scoped_refptr<cc::VulkanInProcessContextProvider> | 103 scoped_refptr<cc::VulkanInProcessContextProvider> |
103 SharedVulkanContextProvider(); | 104 SharedVulkanContextProvider(); |
104 | 105 |
105 std::unique_ptr<cc::SurfaceManager> surface_manager_; | 106 std::unique_ptr<cc::SurfaceManager> surface_manager_; |
106 uint32_t next_sink_id_ = 1u; | 107 cc::FrameSinkIdAllocator frame_sink_id_allocator_; |
107 | 108 |
108 #if defined(OS_WIN) | 109 #if defined(OS_WIN) |
109 // Used by output surface, stored in PerCompositorData. | 110 // Used by output surface, stored in PerCompositorData. |
110 std::unique_ptr<OutputDeviceBacking> software_backing_; | 111 std::unique_ptr<OutputDeviceBacking> software_backing_; |
111 #endif | 112 #endif |
112 | 113 |
113 // Depends on SurfaceManager. | 114 // Depends on SurfaceManager. |
114 typedef std::map<ui::Compositor*, std::unique_ptr<PerCompositorData>> | 115 typedef std::map<ui::Compositor*, std::unique_ptr<PerCompositorData>> |
115 PerCompositorDataMap; | 116 PerCompositorDataMap; |
116 PerCompositorDataMap per_compositor_data_; | 117 PerCompositorDataMap per_compositor_data_; |
(...skipping 12 matching lines...) Expand all Loading... |
129 gpu::GpuChannelEstablishFactory* gpu_channel_factory_ = nullptr; | 130 gpu::GpuChannelEstablishFactory* gpu_channel_factory_ = nullptr; |
130 | 131 |
131 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; | 132 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; |
132 | 133 |
133 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); | 134 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); |
134 }; | 135 }; |
135 | 136 |
136 } // namespace content | 137 } // namespace content |
137 | 138 |
138 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 139 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
OLD | NEW |