| 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 <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/containers/scoped_ptr_hash_map.h" | 12 #include "base/containers/scoped_ptr_hash_map.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/message_loop/message_loop_proxy.h" | 16 #include "base/message_loop/message_loop_proxy.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "content/common/gpu/devtools_gpu_instrumentation.h" | 18 #include "content/common/gpu/devtools_gpu_instrumentation.h" |
| 19 #include "content/common/gpu/gpu_memory_manager.h" | 19 #include "content/common/gpu/gpu_memory_manager.h" |
| 20 #include "ipc/ipc_listener.h" | 20 #include "ipc/ipc_listener.h" |
| 21 #include "ipc/ipc_sender.h" | 21 #include "ipc/ipc_sender.h" |
| 22 #include "ui/gfx/gpu_memory_buffer.h" |
| 22 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
| 23 #include "ui/gl/gl_surface.h" | 24 #include "ui/gl/gl_surface.h" |
| 24 | 25 |
| 25 namespace base { | 26 namespace base { |
| 26 class WaitableEvent; | 27 class WaitableEvent; |
| 27 } | 28 } |
| 28 | 29 |
| 29 namespace gfx { | 30 namespace gfx { |
| 30 class GLShareGroup; | 31 class GLShareGroup; |
| 31 struct GpuMemoryBufferHandle; | 32 struct GpuMemoryBufferHandle; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void OnCloseChannel(const IPC::ChannelHandle& channel_handle); | 115 void OnCloseChannel(const IPC::ChannelHandle& channel_handle); |
| 115 void OnVisibilityChanged( | 116 void OnVisibilityChanged( |
| 116 int32 render_view_id, int32 client_id, bool visible); | 117 int32 render_view_id, int32 client_id, bool visible); |
| 117 void OnCreateViewCommandBuffer( | 118 void OnCreateViewCommandBuffer( |
| 118 const gfx::GLSurfaceHandle& window, | 119 const gfx::GLSurfaceHandle& window, |
| 119 int32 render_view_id, | 120 int32 render_view_id, |
| 120 int32 client_id, | 121 int32 client_id, |
| 121 const GPUCreateCommandBufferConfig& init_params, | 122 const GPUCreateCommandBufferConfig& init_params, |
| 122 int32 route_id); | 123 int32 route_id); |
| 123 void OnLoadedShader(std::string shader); | 124 void OnLoadedShader(std::string shader); |
| 124 void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle); | 125 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferType type, |
| 125 void DestroyGpuMemoryBufferOnIO(const gfx::GpuMemoryBufferHandle& handle); | 126 gfx::GpuMemoryBufferId id, |
| 126 void OnDestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle, | 127 int client_id); |
| 128 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferType type, |
| 129 gfx::GpuMemoryBufferId id, |
| 130 int client_id); |
| 131 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferType type, |
| 132 gfx::GpuMemoryBufferId id, |
| 133 int client_id, |
| 127 int32 sync_point); | 134 int32 sync_point); |
| 128 | 135 |
| 129 void OnLoseAllContexts(); | 136 void OnLoseAllContexts(); |
| 130 | 137 |
| 131 scoped_refptr<base::MessageLoopProxy> io_message_loop_; | 138 scoped_refptr<base::MessageLoopProxy> io_message_loop_; |
| 132 base::WaitableEvent* shutdown_event_; | 139 base::WaitableEvent* shutdown_event_; |
| 133 | 140 |
| 134 // Used to send and receive IPC messages from the browser process. | 141 // Used to send and receive IPC messages from the browser process. |
| 135 MessageRouter* const router_; | 142 MessageRouter* const router_; |
| 136 | 143 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 155 // that any WeakPtrs to Controller are invalidated before its members | 162 // that any WeakPtrs to Controller are invalidated before its members |
| 156 // variable's destructors are executed, rendering them invalid. | 163 // variable's destructors are executed, rendering them invalid. |
| 157 base::WeakPtrFactory<GpuChannelManager> weak_factory_; | 164 base::WeakPtrFactory<GpuChannelManager> weak_factory_; |
| 158 | 165 |
| 159 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 166 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
| 160 }; | 167 }; |
| 161 | 168 |
| 162 } // namespace content | 169 } // namespace content |
| 163 | 170 |
| 164 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 171 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
| OLD | NEW |