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

Side by Side Diff: content/gpu/gpu_child_thread.h

Issue 1753383003: Get rid of gpu related switches by passing gpu::GpuPreferences via IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GPU_GPU_CHILD_THREAD_H_ 5 #ifndef CONTENT_GPU_GPU_CHILD_THREAD_H_
6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_ 6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 GpuMemoryBufferFactory* gpu_memory_buffer_factory, 63 GpuMemoryBufferFactory* gpu_memory_buffer_factory,
64 gpu::SyncPointManager* sync_point_manager); 64 gpu::SyncPointManager* sync_point_manager);
65 65
66 ~GpuChildThread() override; 66 ~GpuChildThread() override;
67 67
68 void Shutdown() override; 68 void Shutdown() override;
69 69
70 void Init(const base::Time& process_start_time); 70 void Init(const base::Time& process_start_time);
71 void StopWatchdog(); 71 void StopWatchdog();
72 72
73 static gpu::GpuPreferences GetGpuPreferencesFromCommandLine();
74
75 private: 73 private:
76 // ChildThread overrides. 74 // ChildThread overrides.
77 bool Send(IPC::Message* msg) override; 75 bool Send(IPC::Message* msg) override;
78 bool OnControlMessageReceived(const IPC::Message& msg) override; 76 bool OnControlMessageReceived(const IPC::Message& msg) override;
79 bool OnMessageReceived(const IPC::Message& msg) override; 77 bool OnMessageReceived(const IPC::Message& msg) override;
80 78
81 // GpuChannelManagerDelegate implementation. 79 // GpuChannelManagerDelegate implementation.
82 void AddSubscription(int32_t client_id, unsigned int target) override; 80 void AddSubscription(int32_t client_id, unsigned int target) override;
83 void DidCreateOffscreenContext(const GURL& active_url) override; 81 void DidCreateOffscreenContext(const GURL& active_url) override;
84 void DidDestroyChannel(int client_id) override; 82 void DidDestroyChannel(int client_id) override;
(...skipping 10 matching lines...) Expand all
95 #if defined(OS_WIN) 93 #if defined(OS_WIN)
96 void SendAcceleratedSurfaceCreatedChildWindow( 94 void SendAcceleratedSurfaceCreatedChildWindow(
97 const gfx::PluginWindowHandle& parent_window, 95 const gfx::PluginWindowHandle& parent_window,
98 const gfx::PluginWindowHandle& child_window) override; 96 const gfx::PluginWindowHandle& child_window) override;
99 #endif 97 #endif
100 void StoreShaderToDisk(int32_t client_id, 98 void StoreShaderToDisk(int32_t client_id,
101 const std::string& key, 99 const std::string& key,
102 const std::string& shader) override; 100 const std::string& shader) override;
103 101
104 // Message handlers. 102 // Message handlers.
105 void OnInitialize(); 103 void OnInitialize(const gpu::GpuPreferences& gpu_preferences);
106 void OnFinalize(); 104 void OnFinalize();
107 void OnCollectGraphicsInfo(); 105 void OnCollectGraphicsInfo();
108 void OnGetVideoMemoryUsageStats(); 106 void OnGetVideoMemoryUsageStats();
109 void OnSetVideoMemoryWindowCount(uint32_t window_count); 107 void OnSetVideoMemoryWindowCount(uint32_t window_count);
110 108
111 void OnClean(); 109 void OnClean();
112 void OnCrash(); 110 void OnCrash();
113 void OnHang(); 111 void OnHang();
114 void OnDisableWatchdog(); 112 void OnDisableWatchdog();
115 void OnGpuSwitched(); 113 void OnGpuSwitched();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 167
170 // Bindings to the ProcessControl impl. 168 // Bindings to the ProcessControl impl.
171 mojo::BindingSet<ProcessControl> process_control_bindings_; 169 mojo::BindingSet<ProcessControl> process_control_bindings_;
172 170
173 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); 171 DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
174 }; 172 };
175 173
176 } // namespace content 174 } // namespace content
177 175
178 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ 176 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698