| OLD | NEW |
| 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 Loading... |
| 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 | |
| 76 private: | 74 private: |
| 77 // ChildThread overrides. | 75 // ChildThread overrides. |
| 78 bool Send(IPC::Message* msg) override; | 76 bool Send(IPC::Message* msg) override; |
| 79 bool OnControlMessageReceived(const IPC::Message& msg) override; | 77 bool OnControlMessageReceived(const IPC::Message& msg) override; |
| 80 bool OnMessageReceived(const IPC::Message& msg) override; | 78 bool OnMessageReceived(const IPC::Message& msg) override; |
| 81 | 79 |
| 82 // GpuChannelManagerDelegate implementation. | 80 // GpuChannelManagerDelegate implementation. |
| 83 void AddSubscription(int32_t client_id, unsigned int target) override; | 81 void AddSubscription(int32_t client_id, unsigned int target) override; |
| 84 void DidCreateOffscreenContext(const GURL& active_url) override; | 82 void DidCreateOffscreenContext(const GURL& active_url) override; |
| 85 void DidDestroyChannel(int client_id) override; | 83 void DidDestroyChannel(int client_id) override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 96 #if defined(OS_WIN) | 94 #if defined(OS_WIN) |
| 97 void SendAcceleratedSurfaceCreatedChildWindow( | 95 void SendAcceleratedSurfaceCreatedChildWindow( |
| 98 const gfx::PluginWindowHandle& parent_window, | 96 const gfx::PluginWindowHandle& parent_window, |
| 99 const gfx::PluginWindowHandle& child_window) override; | 97 const gfx::PluginWindowHandle& child_window) override; |
| 100 #endif | 98 #endif |
| 101 void StoreShaderToDisk(int32_t client_id, | 99 void StoreShaderToDisk(int32_t client_id, |
| 102 const std::string& key, | 100 const std::string& key, |
| 103 const std::string& shader) override; | 101 const std::string& shader) override; |
| 104 | 102 |
| 105 // Message handlers. | 103 // Message handlers. |
| 106 void OnInitialize(); | 104 void OnInitialize(const gpu::GpuPreferences& gpu_preferences); |
| 107 void OnFinalize(); | 105 void OnFinalize(); |
| 108 void OnCollectGraphicsInfo(); | 106 void OnCollectGraphicsInfo(); |
| 109 void OnGetVideoMemoryUsageStats(); | 107 void OnGetVideoMemoryUsageStats(); |
| 110 void OnSetVideoMemoryWindowCount(uint32_t window_count); | 108 void OnSetVideoMemoryWindowCount(uint32_t window_count); |
| 111 | 109 |
| 112 void OnClean(); | 110 void OnClean(); |
| 113 void OnCrash(); | 111 void OnCrash(); |
| 114 void OnHang(); | 112 void OnHang(); |
| 115 void OnDisableWatchdog(); | 113 void OnDisableWatchdog(); |
| 116 void OnGpuSwitched(); | 114 void OnGpuSwitched(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 170 |
| 173 // Bindings to the ProcessControl impl. | 171 // Bindings to the ProcessControl impl. |
| 174 mojo::BindingSet<ProcessControl> process_control_bindings_; | 172 mojo::BindingSet<ProcessControl> process_control_bindings_; |
| 175 | 173 |
| 176 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); | 174 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); |
| 177 }; | 175 }; |
| 178 | 176 |
| 179 } // namespace content | 177 } // namespace content |
| 180 | 178 |
| 181 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ | 179 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ |
| OLD | NEW |