Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.h

Issue 2083853002: exo: Recreate Surface resources on context lost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix browser test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void ResizeDisplay(ui::Compositor* compositor, 65 void ResizeDisplay(ui::Compositor* compositor,
66 const gfx::Size& size) override; 66 const gfx::Size& size) override;
67 void SetAuthoritativeVSyncInterval(ui::Compositor* compositor, 67 void SetAuthoritativeVSyncInterval(ui::Compositor* compositor,
68 base::TimeDelta interval) override; 68 base::TimeDelta interval) override;
69 void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override; 69 void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override;
70 70
71 // ImageTransportFactory implementation. 71 // ImageTransportFactory implementation.
72 ui::ContextFactory* GetContextFactory() override; 72 ui::ContextFactory* GetContextFactory() override;
73 cc::SurfaceManager* GetSurfaceManager() override; 73 cc::SurfaceManager* GetSurfaceManager() override;
74 display_compositor::GLHelper* GetGLHelper() override; 74 display_compositor::GLHelper* GetGLHelper() override;
75 void AddObserver(ImageTransportFactoryObserver* observer) override;
76 void RemoveObserver(ImageTransportFactoryObserver* observer) override;
77 #if defined(OS_MACOSX) 75 #if defined(OS_MACOSX)
78 void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, 76 void SetCompositorSuspendedForRecycle(ui::Compositor* compositor,
79 bool suspended) override; 77 bool suspended) override;
80 #endif 78 #endif
81 79
82 private: 80 private:
83 struct PerCompositorData; 81 struct PerCompositorData;
84 82
85 PerCompositorData* CreatePerCompositorData(ui::Compositor* compositor); 83 PerCompositorData* CreatePerCompositorData(ui::Compositor* compositor);
86 std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice( 84 std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice(
87 ui::Compositor* compositor); 85 ui::Compositor* compositor);
88 void EstablishedGpuChannel(base::WeakPtr<ui::Compositor> compositor, 86 void EstablishedGpuChannel(base::WeakPtr<ui::Compositor> compositor,
89 bool create_gpu_output_surface, 87 bool create_gpu_output_surface,
90 int num_attempts); 88 int num_attempts);
91 89
92 void OnLostMainThreadSharedContextInsideCallback(); 90 void OnLostMainThreadSharedContextInsideCallback();
93 void OnLostMainThreadSharedContext(); 91 void OnLostMainThreadSharedContext();
94 92
95 scoped_refptr<cc::VulkanInProcessContextProvider> 93 scoped_refptr<cc::VulkanInProcessContextProvider>
96 SharedVulkanContextProvider(); 94 SharedVulkanContextProvider();
97 95
98 typedef std::map<ui::Compositor*, PerCompositorData*> PerCompositorDataMap; 96 typedef std::map<ui::Compositor*, PerCompositorData*> PerCompositorDataMap;
99 PerCompositorDataMap per_compositor_data_; 97 PerCompositorDataMap per_compositor_data_;
100 scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_; 98 scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_;
101 std::unique_ptr<display_compositor::GLHelper> gl_helper_; 99 std::unique_ptr<display_compositor::GLHelper> gl_helper_;
102 base::ObserverList<ImageTransportFactoryObserver> observer_list_;
103 std::unique_ptr<cc::SurfaceManager> surface_manager_; 100 std::unique_ptr<cc::SurfaceManager> surface_manager_;
104 uint32_t next_surface_id_namespace_; 101 uint32_t next_surface_id_namespace_;
105 std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_; 102 std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_;
106 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_; 103 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_;
107 104
108 bool shared_vulkan_context_provider_initialized_ = false; 105 bool shared_vulkan_context_provider_initialized_ = false;
109 scoped_refptr<cc::VulkanInProcessContextProvider> 106 scoped_refptr<cc::VulkanInProcessContextProvider>
110 shared_vulkan_context_provider_; 107 shared_vulkan_context_provider_;
111 108
112 #if defined(OS_WIN) 109 #if defined(OS_WIN)
113 std::unique_ptr<OutputDeviceBacking> software_backing_; 110 std::unique_ptr<OutputDeviceBacking> software_backing_;
114 #endif 111 #endif
115 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; 112 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_;
116 113
117 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); 114 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory);
118 }; 115 };
119 116
120 } // namespace content 117 } // namespace content
121 118
122 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ 119 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698