Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Side by Side Diff: content/common/gpu/gpu_messages.h

Issue 10854076: Add GPU memory tab to the task manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // Multiply-included message file, hence no include guard here, but see below 5 // Multiply-included message file, hence no include guard here, but see below
6 // for a much smaller-than-usual include guard section. 6 // for a much smaller-than-usual include guard section.
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/shared_memory.h" 11 #include "base/shared_memory.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/gpu/gpu_memory_allocation.h" 13 #include "content/common/gpu/gpu_memory_allocation.h"
14 #include "content/common/gpu/gpu_process_launch_causes.h" 14 #include "content/common/gpu/gpu_process_launch_causes.h"
15 #include "content/public/common/common_param_traits.h" 15 #include "content/public/common/common_param_traits.h"
16 #include "content/public/common/gpu_info.h" 16 #include "content/public/common/gpu_info.h"
17 #include "content/public/common/gpu_memory_stats.h"
17 #include "gpu/command_buffer/common/command_buffer.h" 18 #include "gpu/command_buffer/common/command_buffer.h"
18 #include "gpu/command_buffer/common/constants.h" 19 #include "gpu/command_buffer/common/constants.h"
19 #include "gpu/ipc/gpu_command_buffer_traits.h" 20 #include "gpu/ipc/gpu_command_buffer_traits.h"
20 #include "ipc/ipc_channel_handle.h" 21 #include "ipc/ipc_channel_handle.h"
21 #include "ipc/ipc_message_macros.h" 22 #include "ipc/ipc_message_macros.h"
22 #include "media/video/video_decode_accelerator.h" 23 #include "media/video/video_decode_accelerator.h"
23 #include "ui/gfx/native_widget_types.h" 24 #include "ui/gfx/native_widget_types.h"
24 #include "ui/gfx/size.h" 25 #include "ui/gfx/size.h"
25 #include "ui/gl/gpu_preference.h" 26 #include "ui/gl/gpu_preference.h"
26 #include "ui/surface/transport_dib.h" 27 #include "ui/surface/transport_dib.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 IPC_STRUCT_TRAITS_MEMBER(gl_extensions) 156 IPC_STRUCT_TRAITS_MEMBER(gl_extensions)
156 IPC_STRUCT_TRAITS_MEMBER(can_lose_context) 157 IPC_STRUCT_TRAITS_MEMBER(can_lose_context)
157 IPC_STRUCT_TRAITS_MEMBER(gpu_accessible) 158 IPC_STRUCT_TRAITS_MEMBER(gpu_accessible)
158 IPC_STRUCT_TRAITS_MEMBER(performance_stats) 159 IPC_STRUCT_TRAITS_MEMBER(performance_stats)
159 IPC_STRUCT_TRAITS_MEMBER(software_rendering) 160 IPC_STRUCT_TRAITS_MEMBER(software_rendering)
160 #if defined(OS_WIN) 161 #if defined(OS_WIN)
161 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) 162 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics)
162 #endif 163 #endif
163 IPC_STRUCT_TRAITS_END() 164 IPC_STRUCT_TRAITS_END()
164 165
166 IPC_STRUCT_TRAITS_BEGIN(content::GPUVideoMemoryUsageStats::ProcessStats)
167 IPC_STRUCT_TRAITS_MEMBER(video_memory)
168 IPC_STRUCT_TRAITS_MEMBER(has_duplicates)
169 IPC_STRUCT_TRAITS_END()
170
171 IPC_STRUCT_TRAITS_BEGIN(content::GPUVideoMemoryUsageStats)
172 IPC_STRUCT_TRAITS_MEMBER(process_map)
173 IPC_STRUCT_TRAITS_END()
174
165 IPC_STRUCT_TRAITS_BEGIN(GpuMemoryAllocationForRenderer) 175 IPC_STRUCT_TRAITS_BEGIN(GpuMemoryAllocationForRenderer)
166 IPC_STRUCT_TRAITS_MEMBER(gpu_resource_size_in_bytes) 176 IPC_STRUCT_TRAITS_MEMBER(gpu_resource_size_in_bytes)
167 IPC_STRUCT_TRAITS_MEMBER(suggest_have_backbuffer) 177 IPC_STRUCT_TRAITS_MEMBER(suggest_have_backbuffer)
168 IPC_STRUCT_TRAITS_END() 178 IPC_STRUCT_TRAITS_END()
169 179
170 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle) 180 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle)
171 IPC_STRUCT_TRAITS_MEMBER(handle) 181 IPC_STRUCT_TRAITS_MEMBER(handle)
172 IPC_STRUCT_TRAITS_MEMBER(transport) 182 IPC_STRUCT_TRAITS_MEMBER(transport)
173 IPC_STRUCT_TRAITS_MEMBER(parent_gpu_process_id) 183 IPC_STRUCT_TRAITS_MEMBER(parent_gpu_process_id)
174 IPC_STRUCT_TRAITS_MEMBER(parent_client_id) 184 IPC_STRUCT_TRAITS_MEMBER(parent_client_id)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer, 224 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer,
215 gfx::GLSurfaceHandle, /* compositing_surface */ 225 gfx::GLSurfaceHandle, /* compositing_surface */
216 int32, /* surface_id */ 226 int32, /* surface_id */
217 int32, /* client_id */ 227 int32, /* client_id */
218 GPUCreateCommandBufferConfig /* init_params */) 228 GPUCreateCommandBufferConfig /* init_params */)
219 229
220 // Tells the GPU process to create a context for collecting graphics card 230 // Tells the GPU process to create a context for collecting graphics card
221 // information. 231 // information.
222 IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo) 232 IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo)
223 233
234 // Tells the GPU process to report video_memory information for the task manager
235 IPC_MESSAGE_CONTROL0(GpuMsg_GetVideoMemoryUsageStats)
236
224 // Tells the GPU process that the browser process has finished resizing the 237 // Tells the GPU process that the browser process has finished resizing the
225 // view. 238 // view.
226 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_ResizeViewACK) 239 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_ResizeViewACK)
227 240
228 // Tells the GPU process if it's worth suggesting release of the front surface. 241 // Tells the GPU process if it's worth suggesting release of the front surface.
229 IPC_MESSAGE_ROUTED2(AcceleratedSurfaceMsg_SetFrontSurfaceIsProtected, 242 IPC_MESSAGE_ROUTED2(AcceleratedSurfaceMsg_SetFrontSurfaceIsProtected,
230 bool /* is_protected */, 243 bool /* is_protected */,
231 uint32 /* protection_state_id */) 244 uint32 /* protection_state_id */)
232 245
233 // Tells the GPU process that the browser process has handled the swap 246 // Tells the GPU process that the browser process has handled the swap
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 288
276 // Request from GPU to free the browser resources associated with the 289 // Request from GPU to free the browser resources associated with the
277 // command buffer. 290 // command buffer.
278 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyCommandBuffer, 291 IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyCommandBuffer,
279 int32 /* surface_id */) 292 int32 /* surface_id */)
280 293
281 // Response from GPU to a GpuMsg_CollectGraphicsInfo. 294 // Response from GPU to a GpuMsg_CollectGraphicsInfo.
282 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, 295 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected,
283 content::GPUInfo /* GPU logging stats */) 296 content::GPUInfo /* GPU logging stats */)
284 297
298 // Response from GPU to a GpuMsg_GetVideoMemory.
299 IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats,
300 content::GPUVideoMemoryUsageStats /* GPU memory stats */)
301
285 // Message from GPU to add a GPU log message to the about:gpu page. 302 // Message from GPU to add a GPU log message to the about:gpu page.
286 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, 303 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage,
287 int /*severity*/, 304 int /*severity*/,
288 std::string /* header */, 305 std::string /* header */,
289 std::string /* message */) 306 std::string /* message */)
290 307
291 // Resize the window that is being drawn into. It's important that this 308 // Resize the window that is being drawn into. It's important that this
292 // resize be synchronized with the swapping of the front and back buffers. 309 // resize be synchronized with the swapping of the front and back buffers.
293 IPC_MESSAGE_CONTROL3(GpuHostMsg_ResizeView, 310 IPC_MESSAGE_CONTROL3(GpuHostMsg_ResizeView,
294 int32 /* surface_id */, 311 int32 /* surface_id */,
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 605
589 // Confirm decoder has been flushed. 606 // Confirm decoder has been flushed.
590 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) 607 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone)
591 608
592 // Confirm decoder has been reset. 609 // Confirm decoder has been reset.
593 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) 610 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone)
594 611
595 // Video decoder has encountered an error. 612 // Video decoder has encountered an error.
596 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, 613 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
597 uint32) /* Error ID */ 614 uint32) /* Error ID */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698