| 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 OnCreateImageSyncPointRetired( |
| 110 gfx::PluginWindowHandle window, |
| 111 int32 client_id, |
| 112 int32 image_id); |
| 113 void OnCreateImage( |
| 114 gfx::PluginWindowHandle window, |
| 115 int32 client_id, |
| 116 int32 image_id); |
| 117 void OnDeleteImageSyncPointRetired(int32 client_id, int32 image_id); |
| 118 void OnDeleteImage(int32 client_id, int32 image_id, int32 sync_point); |
| 109 | 119 |
| 110 void OnLoseAllContexts(); | 120 void OnLoseAllContexts(); |
| 111 | 121 |
| 112 scoped_refptr<base::MessageLoopProxy> io_message_loop_; | 122 scoped_refptr<base::MessageLoopProxy> io_message_loop_; |
| 113 base::WaitableEvent* shutdown_event_; | 123 base::WaitableEvent* shutdown_event_; |
| 114 | 124 |
| 115 // Used to send and receive IPC messages from the browser process. | 125 // Used to send and receive IPC messages from the browser process. |
| 116 ChildThread* gpu_child_thread_; | 126 ChildThread* gpu_child_thread_; |
| 117 | 127 |
| 118 // These objects manage channels to individual renderer processes there is | 128 // These objects manage channels to individual renderer processes there is |
| 119 // one channel for each renderer process that has connected to this GPU | 129 // one channel for each renderer process that has connected to this GPU |
| 120 // process. | 130 // process. |
| 121 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; | 131 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; |
| 122 GpuChannelMap gpu_channels_; | 132 GpuChannelMap gpu_channels_; |
| 123 scoped_refptr<gfx::GLShareGroup> share_group_; | 133 scoped_refptr<gfx::GLShareGroup> share_group_; |
| 124 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; | 134 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; |
| 125 GpuMemoryManager gpu_memory_manager_; | 135 GpuMemoryManager gpu_memory_manager_; |
| 126 GpuWatchdog* watchdog_; | 136 GpuWatchdog* watchdog_; |
| 127 scoped_refptr<SyncPointManager> sync_point_manager_; | 137 scoped_refptr<SyncPointManager> sync_point_manager_; |
| 128 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; | 138 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; |
| 129 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; | 139 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; |
| 140 int32 image_sync_point_; |
| 130 | 141 |
| 131 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 142 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
| 132 }; | 143 }; |
| 133 | 144 |
| 134 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 145 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
| OLD | NEW |