| 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_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Message handlers. | 99 // Message handlers. |
| 100 void OnEstablishChannel(int client_id, bool share_context); | 100 void OnEstablishChannel(int client_id, bool share_context); |
| 101 void OnCloseChannel(const IPC::ChannelHandle& channel_handle); | 101 void OnCloseChannel(const IPC::ChannelHandle& channel_handle); |
| 102 void OnVisibilityChanged( | 102 void OnVisibilityChanged( |
| 103 int32 render_view_id, int32 client_id, bool visible); | 103 int32 render_view_id, int32 client_id, bool visible); |
| 104 void OnCreateViewCommandBuffer( | 104 void OnCreateViewCommandBuffer( |
| 105 const gfx::GLSurfaceHandle& window, | 105 const gfx::GLSurfaceHandle& window, |
| 106 int32 render_view_id, | 106 int32 render_view_id, |
| 107 int32 client_id, | 107 int32 client_id, |
| 108 const GPUCreateCommandBufferConfig& init_params); | 108 const GPUCreateCommandBufferConfig& init_params); |
| 109 void OnCreateImage( |
| 110 gfx::PluginWindowHandle window, |
| 111 int32 client_id, |
| 112 int32 image_id); |
| 113 void OnDeleteImage(int32 client_id, int32 image_id); |
| 109 | 114 |
| 110 void OnLoseAllContexts(); | 115 void OnLoseAllContexts(); |
| 111 | 116 |
| 112 scoped_refptr<base::MessageLoopProxy> io_message_loop_; | 117 scoped_refptr<base::MessageLoopProxy> io_message_loop_; |
| 113 base::WaitableEvent* shutdown_event_; | 118 base::WaitableEvent* shutdown_event_; |
| 114 | 119 |
| 115 // Used to send and receive IPC messages from the browser process. | 120 // Used to send and receive IPC messages from the browser process. |
| 116 ChildThread* gpu_child_thread_; | 121 ChildThread* gpu_child_thread_; |
| 117 | 122 |
| 118 // These objects manage channels to individual renderer processes there is | 123 // These objects manage channels to individual renderer processes there is |
| 119 // one channel for each renderer process that has connected to this GPU | 124 // one channel for each renderer process that has connected to this GPU |
| 120 // process. | 125 // process. |
| 121 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; | 126 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; |
| 122 GpuChannelMap gpu_channels_; | 127 GpuChannelMap gpu_channels_; |
| 123 scoped_refptr<gfx::GLShareGroup> share_group_; | 128 scoped_refptr<gfx::GLShareGroup> share_group_; |
| 124 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; | 129 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; |
| 125 GpuMemoryManager gpu_memory_manager_; | 130 GpuMemoryManager gpu_memory_manager_; |
| 126 GpuWatchdog* watchdog_; | 131 GpuWatchdog* watchdog_; |
| 127 scoped_refptr<SyncPointManager> sync_point_manager_; | 132 scoped_refptr<SyncPointManager> sync_point_manager_; |
| 128 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; | 133 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; |
| 129 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; | 134 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; |
| 130 | 135 |
| 131 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 136 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
| 132 }; | 137 }; |
| 133 | 138 |
| 134 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 139 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
| OLD | NEW |