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

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

Issue 1778693002: Revert of 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: 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
« no previous file with comments | « content/content_browser.gypi ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 GpuMemoryBufferFactory* gpu_memory_buffer_factory, 64 GpuMemoryBufferFactory* gpu_memory_buffer_factory,
65 gpu::SyncPointManager* sync_point_manager); 65 gpu::SyncPointManager* sync_point_manager);
66 66
67 ~GpuChildThread() override; 67 ~GpuChildThread() override;
68 68
69 void Shutdown() override; 69 void Shutdown() override;
70 70
71 void Init(const base::Time& process_start_time); 71 void Init(const base::Time& process_start_time);
72 void StopWatchdog(); 72 void StopWatchdog();
73 73
74 static gpu::GpuPreferences GetGpuPreferencesFromCommandLine();
75
74 private: 76 private:
75 // ChildThread overrides. 77 // ChildThread overrides.
76 bool Send(IPC::Message* msg) override; 78 bool Send(IPC::Message* msg) override;
77 bool OnControlMessageReceived(const IPC::Message& msg) override; 79 bool OnControlMessageReceived(const IPC::Message& msg) override;
78 bool OnMessageReceived(const IPC::Message& msg) override; 80 bool OnMessageReceived(const IPC::Message& msg) override;
79 81
80 // GpuChannelManagerDelegate implementation. 82 // GpuChannelManagerDelegate implementation.
81 void AddSubscription(int32_t client_id, unsigned int target) override; 83 void AddSubscription(int32_t client_id, unsigned int target) override;
82 void DidCreateOffscreenContext(const GURL& active_url) override; 84 void DidCreateOffscreenContext(const GURL& active_url) override;
83 void DidDestroyChannel(int client_id) override; 85 void DidDestroyChannel(int client_id) override;
(...skipping 10 matching lines...) Expand all
94 #if defined(OS_WIN) 96 #if defined(OS_WIN)
95 void SendAcceleratedSurfaceCreatedChildWindow( 97 void SendAcceleratedSurfaceCreatedChildWindow(
96 const gfx::PluginWindowHandle& parent_window, 98 const gfx::PluginWindowHandle& parent_window,
97 const gfx::PluginWindowHandle& child_window) override; 99 const gfx::PluginWindowHandle& child_window) override;
98 #endif 100 #endif
99 void StoreShaderToDisk(int32_t client_id, 101 void StoreShaderToDisk(int32_t client_id,
100 const std::string& key, 102 const std::string& key,
101 const std::string& shader) override; 103 const std::string& shader) override;
102 104
103 // Message handlers. 105 // Message handlers.
104 void OnInitialize(const gpu::GpuPreferences& gpu_preferences); 106 void OnInitialize();
105 void OnFinalize(); 107 void OnFinalize();
106 void OnCollectGraphicsInfo(); 108 void OnCollectGraphicsInfo();
107 void OnGetVideoMemoryUsageStats(); 109 void OnGetVideoMemoryUsageStats();
108 void OnSetVideoMemoryWindowCount(uint32_t window_count); 110 void OnSetVideoMemoryWindowCount(uint32_t window_count);
109 111
110 void OnClean(); 112 void OnClean();
111 void OnCrash(); 113 void OnCrash();
112 void OnHang(); 114 void OnHang();
113 void OnDisableWatchdog(); 115 void OnDisableWatchdog();
114 void OnGpuSwitched(); 116 void OnGpuSwitched();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 172
171 // Bindings to the ProcessControl impl. 173 // Bindings to the ProcessControl impl.
172 mojo::BindingSet<ProcessControl> process_control_bindings_; 174 mojo::BindingSet<ProcessControl> process_control_bindings_;
173 175
174 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); 176 DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
175 }; 177 };
176 178
177 } // namespace content 179 } // namespace content
178 180
179 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ 181 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_
OLDNEW
« no previous file with comments | « content/content_browser.gypi ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698