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

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

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: create cc::LatencyInfo Created 7 years, 11 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_memory_uma_stats.h" 14 #include "content/common/gpu/gpu_memory_uma_stats.h"
15 #include "content/common/gpu/gpu_process_launch_causes.h" 15 #include "content/common/gpu/gpu_process_launch_causes.h"
16 #include "content/common/gpu/gpu_rendering_stats.h" 16 #include "content/common/gpu/gpu_rendering_stats.h"
17 #include "content/public/common/common_param_traits.h" 17 #include "content/public/common/common_param_traits.h"
18 #include "content/public/common/gpu_info.h" 18 #include "content/public/common/gpu_info.h"
19 #include "content/public/common/gpu_memory_stats.h" 19 #include "content/public/common/gpu_memory_stats.h"
20 #include "gpu/command_buffer/common/command_buffer.h" 20 #include "gpu/command_buffer/common/command_buffer.h"
21 #include "gpu/command_buffer/common/constants.h" 21 #include "gpu/command_buffer/common/constants.h"
22 #include "gpu/ipc/gpu_command_buffer_traits.h" 22 #include "gpu/ipc/gpu_command_buffer_traits.h"
23 #include "ipc/ipc_channel_handle.h" 23 #include "ipc/ipc_channel_handle.h"
24 #include "ipc/ipc_message_macros.h" 24 #include "ipc/ipc_message_macros.h"
25 #include "media/video/video_decode_accelerator.h" 25 #include "media/video/video_decode_accelerator.h"
26 #include "ui/gfx/native_widget_types.h" 26 #include "ui/gfx/native_widget_types.h"
27 #include "ui/gfx/size.h" 27 #include "ui/gfx/size.h"
28 #include "ui/gl/gpu_preference.h" 28 #include "ui/gl/gpu_preference.h"
29 #include "ui/surface/transport_dib.h" 29 #include "ui/surface/transport_dib.h"
30 #include "webkit/compositor_bindings/web_latency_info_impl.h"
30 31
31 #if defined(OS_ANDROID) 32 #if defined(OS_ANDROID)
32 #include "content/common/android/surface_texture_peer.h" 33 #include "content/common/android/surface_texture_peer.h"
33 #endif 34 #endif
34 35
35 #define IPC_MESSAGE_START GpuMsgStart 36 #define IPC_MESSAGE_START GpuMsgStart
36 37
37 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) 38 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig)
38 IPC_STRUCT_MEMBER(int32, share_group_id) 39 IPC_STRUCT_MEMBER(int32, share_group_id)
39 IPC_STRUCT_MEMBER(std::string, allowed_extensions) 40 IPC_STRUCT_MEMBER(std::string, allowed_extensions)
40 IPC_STRUCT_MEMBER(std::vector<int>, attribs) 41 IPC_STRUCT_MEMBER(std::vector<int>, attribs)
41 IPC_STRUCT_MEMBER(GURL, active_url) 42 IPC_STRUCT_MEMBER(GURL, active_url)
42 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) 43 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference)
43 IPC_STRUCT_END() 44 IPC_STRUCT_END()
44 45
45 #undef IPC_MESSAGE_EXPORT 46 #undef IPC_MESSAGE_EXPORT
46 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 47 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
47 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) 48 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
48 IPC_STRUCT_MEMBER(int32, surface_id) 49 IPC_STRUCT_MEMBER(int32, surface_id)
49 IPC_STRUCT_MEMBER(uint64, surface_handle) 50 IPC_STRUCT_MEMBER(uint64, surface_handle)
50 IPC_STRUCT_MEMBER(int32, route_id) 51 IPC_STRUCT_MEMBER(int32, route_id)
51 IPC_STRUCT_MEMBER(std::string, mailbox_name) 52 IPC_STRUCT_MEMBER(std::string, mailbox_name)
52 IPC_STRUCT_MEMBER(gfx::Size, size) 53 IPC_STRUCT_MEMBER(gfx::Size, size)
53 #if defined(OS_MACOSX) 54 #if defined(OS_MACOSX)
54 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) 55 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window)
55 #endif 56 #endif
57 IPC_STRUCT_MEMBER(cc::LatencyInfo, latency_info)
56 IPC_STRUCT_END() 58 IPC_STRUCT_END()
57 #undef IPC_MESSAGE_EXPORT 59 #undef IPC_MESSAGE_EXPORT
58 #define IPC_MESSAGE_EXPORT 60 #define IPC_MESSAGE_EXPORT
59 61
60 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params) 62 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params)
61 IPC_STRUCT_MEMBER(int32, surface_id) 63 IPC_STRUCT_MEMBER(int32, surface_id)
62 IPC_STRUCT_MEMBER(uint64, surface_handle) 64 IPC_STRUCT_MEMBER(uint64, surface_handle)
63 IPC_STRUCT_MEMBER(int32, route_id) 65 IPC_STRUCT_MEMBER(int32, route_id)
64 IPC_STRUCT_MEMBER(int, x) 66 IPC_STRUCT_MEMBER(int, x)
65 IPC_STRUCT_MEMBER(int, y) 67 IPC_STRUCT_MEMBER(int, y)
66 IPC_STRUCT_MEMBER(int, width) 68 IPC_STRUCT_MEMBER(int, width)
67 IPC_STRUCT_MEMBER(int, height) 69 IPC_STRUCT_MEMBER(int, height)
68 IPC_STRUCT_MEMBER(std::string, mailbox_name) 70 IPC_STRUCT_MEMBER(std::string, mailbox_name)
69 IPC_STRUCT_MEMBER(gfx::Size, surface_size) 71 IPC_STRUCT_MEMBER(gfx::Size, surface_size)
70 #if defined(OS_MACOSX) 72 #if defined(OS_MACOSX)
71 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) 73 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window)
72 #endif 74 #endif
75 IPC_STRUCT_MEMBER(cc::LatencyInfo, latency_info)
73 IPC_STRUCT_END() 76 IPC_STRUCT_END()
74 77
75 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params) 78 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params)
76 IPC_STRUCT_MEMBER(int32, surface_id) 79 IPC_STRUCT_MEMBER(int32, surface_id)
77 IPC_STRUCT_MEMBER(int32, route_id) 80 IPC_STRUCT_MEMBER(int32, route_id)
78 IPC_STRUCT_END() 81 IPC_STRUCT_END()
79 82
80 IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params) 83 IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params)
81 IPC_STRUCT_MEMBER(std::string, mailbox_name) 84 IPC_STRUCT_MEMBER(std::string, mailbox_name)
82 IPC_STRUCT_MEMBER(uint32, sync_point) 85 IPC_STRUCT_MEMBER(uint32, sync_point)
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // view. 275 // view.
273 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_ResizeViewACK) 276 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_ResizeViewACK)
274 277
275 // Tells the GPU process that the browser process has handled the swap 278 // Tells the GPU process that the browser process has handled the swap
276 // buffers or post sub-buffer request. A non-zero sync point means 279 // buffers or post sub-buffer request. A non-zero sync point means
277 // that we should wait for the sync point. The surface_handle identifies 280 // that we should wait for the sync point. The surface_handle identifies
278 // that buffer that has finished presented, i.e. the buffer being returned. 281 // that buffer that has finished presented, i.e. the buffer being returned.
279 IPC_MESSAGE_ROUTED1(AcceleratedSurfaceMsg_BufferPresented, 282 IPC_MESSAGE_ROUTED1(AcceleratedSurfaceMsg_BufferPresented,
280 AcceleratedSurfaceMsg_BufferPresented_Params) 283 AcceleratedSurfaceMsg_BufferPresented_Params)
281 284
285 // Tells the GPU process that the browser process has handled the swap
286 // buffers or post sub-buffer request. A non-zero sync point means
287 // that we should wait for the sync point.
288 IPC_MESSAGE_ROUTED1(AcceleratedSurfaceMsg_FrameDisplayed,
289 cc::LatencyInfo /* latency_info */)
290
282 // Tells the GPU process to remove all contexts. 291 // Tells the GPU process to remove all contexts.
283 IPC_MESSAGE_CONTROL0(GpuMsg_Clean) 292 IPC_MESSAGE_CONTROL0(GpuMsg_Clean)
284 293
285 // Tells the GPU process to crash. 294 // Tells the GPU process to crash.
286 IPC_MESSAGE_CONTROL0(GpuMsg_Crash) 295 IPC_MESSAGE_CONTROL0(GpuMsg_Crash)
287 296
288 // Tells the GPU process to hang. 297 // Tells the GPU process to hang.
289 IPC_MESSAGE_CONTROL0(GpuMsg_Hang) 298 IPC_MESSAGE_CONTROL0(GpuMsg_Hang)
290 299
291 // Tells the GPU process to disable the watchdog thread. 300 // Tells the GPU process to disable the watchdog thread.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetStateFast, 498 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetStateFast,
490 gpu::CommandBuffer::State /* state */) 499 gpu::CommandBuffer::State /* state */)
491 500
492 // Asynchronously synchronize the put and get offsets of both processes. 501 // Asynchronously synchronize the put and get offsets of both processes.
493 // Caller passes its current put offset. Current state (including get offset) 502 // Caller passes its current put offset. Current state (including get offset)
494 // is returned in shared memory. 503 // is returned in shared memory.
495 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_AsyncFlush, 504 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_AsyncFlush,
496 int32 /* put_offset */, 505 int32 /* put_offset */,
497 uint32 /* flush_count */) 506 uint32 /* flush_count */)
498 507
508 // Sends information about the latency of the current frame to or from the GPU
509 // process.
510 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetLatencyInfo,
511 cc::LatencyInfo /* latency_info */)
512
499 // Asynchronously process any commands known to the GPU process. This is only 513 // Asynchronously process any commands known to the GPU process. This is only
500 // used in the event that a channel is unscheduled and needs to be flushed 514 // used in the event that a channel is unscheduled and needs to be flushed
501 // again to process any commands issued subsequent to unscheduling. The GPU 515 // again to process any commands issued subsequent to unscheduling. The GPU
502 // process actually sends it (deferred) to itself. 516 // process actually sends it (deferred) to itself.
503 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_Rescheduled) 517 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_Rescheduled)
504 518
505 // Sent by the GPU process to display messages in the console. 519 // Sent by the GPU process to display messages in the console.
506 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg, 520 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg,
507 GPUCommandBufferConsoleMessage /* msg */) 521 GPUCommandBufferConsoleMessage /* msg */)
508 522
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 669
656 // Confirm decoder has been flushed. 670 // Confirm decoder has been flushed.
657 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) 671 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone)
658 672
659 // Confirm decoder has been reset. 673 // Confirm decoder has been reset.
660 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) 674 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone)
661 675
662 // Video decoder has encountered an error. 676 // Video decoder has encountered an error.
663 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, 677 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
664 uint32) /* Error ID */ 678 uint32) /* Error ID */
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/common/gpu/image_transport_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698