OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CHANNEL_MANAGER_H_ | 5 #ifndef CONTENT_GPU_GPU_CHANNEL_MANAGER_H_ |
6 #define CONTENT_GPU_GPU_CHANNEL_MANAGER_H_ | 6 #define CONTENT_GPU_GPU_CHANNEL_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void OnEstablishChannel(int renderer_id); | 66 void OnEstablishChannel(int renderer_id); |
67 void OnCloseChannel(const IPC::ChannelHandle& channel_handle); | 67 void OnCloseChannel(const IPC::ChannelHandle& channel_handle); |
68 void OnVisibilityChanged( | 68 void OnVisibilityChanged( |
69 int32 render_view_id, int32 renderer_id, bool visible); | 69 int32 render_view_id, int32 renderer_id, bool visible); |
70 void OnSynchronize(); | 70 void OnSynchronize(); |
71 void OnCreateViewCommandBuffer( | 71 void OnCreateViewCommandBuffer( |
72 gfx::PluginWindowHandle window, | 72 gfx::PluginWindowHandle window, |
73 int32 render_view_id, | 73 int32 render_view_id, |
74 int32 renderer_id, | 74 int32 renderer_id, |
75 const GPUCreateCommandBufferConfig& init_params); | 75 const GPUCreateCommandBufferConfig& init_params); |
| 76 void OnResizeViewACK(int32 renderer_id, int32 command_buffer_route_id); |
76 #if defined(OS_MACOSX) | 77 #if defined(OS_MACOSX) |
77 void OnAcceleratedSurfaceBuffersSwappedACK( | 78 void OnAcceleratedSurfaceBuffersSwappedACK( |
78 int renderer_id, int32 route_id, uint64 swap_buffers_count); | 79 int renderer_id, int32 route_id, uint64 swap_buffers_count); |
79 void OnDestroyCommandBuffer(int renderer_id, int32 renderer_view_id); | 80 void OnDestroyCommandBuffer(int renderer_id, int32 renderer_view_id); |
80 #endif | 81 #endif |
81 | 82 |
82 void OnLoseAllContexts(); | 83 void OnLoseAllContexts(); |
83 | 84 |
84 MessageLoop* io_message_loop_; | 85 MessageLoop* io_message_loop_; |
85 base::WaitableEvent* shutdown_event_; | 86 base::WaitableEvent* shutdown_event_; |
86 | 87 |
87 // Either an IPC channel to the browser or, if the GpuChannelManager is | 88 // Either an IPC channel to the browser or, if the GpuChannelManager is |
88 // running in the browser process, a Sender implementation that will post | 89 // running in the browser process, a Sender implementation that will post |
89 // IPC messages to the UI thread. | 90 // IPC messages to the UI thread. |
90 IPC::Message::Sender* browser_channel_; | 91 IPC::Message::Sender* browser_channel_; |
91 | 92 |
92 // These objects manage channels to individual renderer processes there is | 93 // These objects manage channels to individual renderer processes there is |
93 // one channel for each renderer process that has connected to this GPU | 94 // one channel for each renderer process that has connected to this GPU |
94 // process. | 95 // process. |
95 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; | 96 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; |
96 GpuChannelMap gpu_channels_; | 97 GpuChannelMap gpu_channels_; |
97 GpuWatchdog* watchdog_; | 98 GpuWatchdog* watchdog_; |
98 | 99 |
99 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 100 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
100 }; | 101 }; |
101 | 102 |
102 #endif // CONTENT_GPU_GPU_CHANNEL_MANAGER_H_ | 103 #endif // CONTENT_GPU_GPU_CHANNEL_MANAGER_H_ |
OLD | NEW |