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

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

Issue 12614013: Plumb cc::LatencyInfo through command buffer and output surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 "cc/latency_info.h"
12 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
13 #include "content/common/gpu/gpu_memory_allocation.h" 14 #include "content/common/gpu/gpu_memory_allocation.h"
14 #include "content/common/gpu/gpu_memory_uma_stats.h" 15 #include "content/common/gpu/gpu_memory_uma_stats.h"
15 #include "content/common/gpu/gpu_process_launch_causes.h" 16 #include "content/common/gpu/gpu_process_launch_causes.h"
16 #include "content/common/gpu/gpu_rendering_stats.h" 17 #include "content/common/gpu/gpu_rendering_stats.h"
17 #include "content/public/common/common_param_traits.h" 18 #include "content/public/common/common_param_traits.h"
18 #include "content/public/common/gpu_info.h" 19 #include "content/public/common/gpu_info.h"
19 #include "content/public/common/gpu_memory_stats.h" 20 #include "content/public/common/gpu_memory_stats.h"
20 #include "gpu/command_buffer/common/command_buffer.h" 21 #include "gpu/command_buffer/common/command_buffer.h"
21 #include "gpu/command_buffer/common/constants.h" 22 #include "gpu/command_buffer/common/constants.h"
22 #include "gpu/ipc/gpu_command_buffer_traits.h" 23 #include "gpu/ipc/gpu_command_buffer_traits.h"
23 #include "ipc/ipc_channel_handle.h" 24 #include "ipc/ipc_channel_handle.h"
24 #include "ipc/ipc_message_macros.h" 25 #include "ipc/ipc_message_macros.h"
25 #include "media/video/video_decode_accelerator.h" 26 #include "media/video/video_decode_accelerator.h"
26 #include "ui/gfx/native_widget_types.h" 27 #include "ui/gfx/native_widget_types.h"
27 #include "ui/gfx/size.h" 28 #include "ui/gfx/size.h"
28 #include "ui/gl/gpu_preference.h" 29 #include "ui/gl/gpu_preference.h"
29 #include "ui/surface/transport_dib.h" 30 #include "ui/surface/transport_dib.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
38 IPC_STRUCT_TRAITS_BEGIN(cc::LatencyInfo)
39 IPC_STRUCT_TRAITS_MEMBER(renderer_main_frame_number)
40 IPC_STRUCT_TRAITS_MEMBER(renderer_impl_frame_number)
41 IPC_STRUCT_TRAITS_MEMBER(browser_main_frame_number)
42 IPC_STRUCT_TRAITS_MEMBER(browser_impl_frame_number)
43 IPC_STRUCT_TRAITS_MEMBER(swap_timestamp)
44 IPC_STRUCT_TRAITS_END()
piman 2013/03/19 04:30:29 could we move this to content/common/cc_messages.h
45
37 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) 46 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig)
38 IPC_STRUCT_MEMBER(int32, share_group_id) 47 IPC_STRUCT_MEMBER(int32, share_group_id)
39 IPC_STRUCT_MEMBER(std::string, allowed_extensions) 48 IPC_STRUCT_MEMBER(std::string, allowed_extensions)
40 IPC_STRUCT_MEMBER(std::vector<int>, attribs) 49 IPC_STRUCT_MEMBER(std::vector<int>, attribs)
41 IPC_STRUCT_MEMBER(GURL, active_url) 50 IPC_STRUCT_MEMBER(GURL, active_url)
42 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) 51 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference)
43 IPC_STRUCT_END() 52 IPC_STRUCT_END()
44 53
45 #undef IPC_MESSAGE_EXPORT 54 #undef IPC_MESSAGE_EXPORT
46 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 55 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
47 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) 56 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
48 IPC_STRUCT_MEMBER(int32, surface_id) 57 IPC_STRUCT_MEMBER(int32, surface_id)
49 IPC_STRUCT_MEMBER(uint64, surface_handle) 58 IPC_STRUCT_MEMBER(uint64, surface_handle)
50 IPC_STRUCT_MEMBER(int32, route_id) 59 IPC_STRUCT_MEMBER(int32, route_id)
51 IPC_STRUCT_MEMBER(std::string, mailbox_name) 60 IPC_STRUCT_MEMBER(std::string, mailbox_name)
52 IPC_STRUCT_MEMBER(gfx::Size, size) 61 IPC_STRUCT_MEMBER(gfx::Size, size)
53 #if defined(OS_MACOSX) 62 #if defined(OS_MACOSX)
54 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) 63 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window)
55 #endif 64 #endif
65 IPC_STRUCT_MEMBER(cc::LatencyInfo, latency_info)
56 IPC_STRUCT_END() 66 IPC_STRUCT_END()
57 #undef IPC_MESSAGE_EXPORT 67 #undef IPC_MESSAGE_EXPORT
58 #define IPC_MESSAGE_EXPORT 68 #define IPC_MESSAGE_EXPORT
59 69
60 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params) 70 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params)
61 IPC_STRUCT_MEMBER(int32, surface_id) 71 IPC_STRUCT_MEMBER(int32, surface_id)
62 IPC_STRUCT_MEMBER(uint64, surface_handle) 72 IPC_STRUCT_MEMBER(uint64, surface_handle)
63 IPC_STRUCT_MEMBER(int32, route_id) 73 IPC_STRUCT_MEMBER(int32, route_id)
64 IPC_STRUCT_MEMBER(int, x) 74 IPC_STRUCT_MEMBER(int, x)
65 IPC_STRUCT_MEMBER(int, y) 75 IPC_STRUCT_MEMBER(int, y)
66 IPC_STRUCT_MEMBER(int, width) 76 IPC_STRUCT_MEMBER(int, width)
67 IPC_STRUCT_MEMBER(int, height) 77 IPC_STRUCT_MEMBER(int, height)
68 IPC_STRUCT_MEMBER(std::string, mailbox_name) 78 IPC_STRUCT_MEMBER(std::string, mailbox_name)
69 IPC_STRUCT_MEMBER(gfx::Size, surface_size) 79 IPC_STRUCT_MEMBER(gfx::Size, surface_size)
70 #if defined(OS_MACOSX) 80 #if defined(OS_MACOSX)
71 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) 81 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window)
72 #endif 82 #endif
83 IPC_STRUCT_MEMBER(cc::LatencyInfo, latency_info)
73 IPC_STRUCT_END() 84 IPC_STRUCT_END()
74 85
75 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params) 86 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params)
76 IPC_STRUCT_MEMBER(int32, surface_id) 87 IPC_STRUCT_MEMBER(int32, surface_id)
77 IPC_STRUCT_MEMBER(int32, route_id) 88 IPC_STRUCT_MEMBER(int32, route_id)
78 IPC_STRUCT_END() 89 IPC_STRUCT_END()
79 90
80 IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params) 91 IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params)
81 IPC_STRUCT_MEMBER(std::string, mailbox_name) 92 IPC_STRUCT_MEMBER(std::string, mailbox_name)
82 IPC_STRUCT_MEMBER(uint32, sync_point) 93 IPC_STRUCT_MEMBER(uint32, sync_point)
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // view. 283 // view.
273 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_ResizeViewACK) 284 IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_ResizeViewACK)
274 285
275 // Tells the GPU process that the browser process has handled the swap 286 // 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 287 // 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 288 // 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. 289 // that buffer that has finished presented, i.e. the buffer being returned.
279 IPC_MESSAGE_ROUTED1(AcceleratedSurfaceMsg_BufferPresented, 290 IPC_MESSAGE_ROUTED1(AcceleratedSurfaceMsg_BufferPresented,
280 AcceleratedSurfaceMsg_BufferPresented_Params) 291 AcceleratedSurfaceMsg_BufferPresented_Params)
281 292
293 // Tells the GPU process that the browser process has handled the swap
294 // buffers or post sub-buffer request. A non-zero sync point means
295 // that we should wait for the sync point.
296 IPC_MESSAGE_ROUTED1(AcceleratedSurfaceMsg_FrameDisplayed,
297 cc::LatencyInfo /* latency_info */)
298
282 // Tells the GPU process to remove all contexts. 299 // Tells the GPU process to remove all contexts.
283 IPC_MESSAGE_CONTROL0(GpuMsg_Clean) 300 IPC_MESSAGE_CONTROL0(GpuMsg_Clean)
284 301
285 // Tells the GPU process to crash. 302 // Tells the GPU process to crash.
286 IPC_MESSAGE_CONTROL0(GpuMsg_Crash) 303 IPC_MESSAGE_CONTROL0(GpuMsg_Crash)
287 304
288 // Tells the GPU process to hang. 305 // Tells the GPU process to hang.
289 IPC_MESSAGE_CONTROL0(GpuMsg_Hang) 306 IPC_MESSAGE_CONTROL0(GpuMsg_Hang)
290 307
291 // Tells the GPU process to disable the watchdog thread. 308 // Tells the GPU process to disable the watchdog thread.
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetStateFast, 518 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetStateFast,
502 gpu::CommandBuffer::State /* state */) 519 gpu::CommandBuffer::State /* state */)
503 520
504 // Asynchronously synchronize the put and get offsets of both processes. 521 // Asynchronously synchronize the put and get offsets of both processes.
505 // Caller passes its current put offset. Current state (including get offset) 522 // Caller passes its current put offset. Current state (including get offset)
506 // is returned in shared memory. 523 // is returned in shared memory.
507 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_AsyncFlush, 524 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_AsyncFlush,
508 int32 /* put_offset */, 525 int32 /* put_offset */,
509 uint32 /* flush_count */) 526 uint32 /* flush_count */)
510 527
528 // Sends information about the latency of the current frame to or from the GPU
529 // process.
530 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetLatencyInfo,
531 cc::LatencyInfo /* latency_info */)
532
511 // Asynchronously process any commands known to the GPU process. This is only 533 // Asynchronously process any commands known to the GPU process. This is only
512 // used in the event that a channel is unscheduled and needs to be flushed 534 // used in the event that a channel is unscheduled and needs to be flushed
513 // again to process any commands issued subsequent to unscheduling. The GPU 535 // again to process any commands issued subsequent to unscheduling. The GPU
514 // process actually sends it (deferred) to itself. 536 // process actually sends it (deferred) to itself.
515 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_Rescheduled) 537 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_Rescheduled)
516 538
517 // Sent by the GPU process to display messages in the console. 539 // Sent by the GPU process to display messages in the console.
518 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg, 540 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg,
519 GPUCommandBufferConsoleMessage /* msg */) 541 GPUCommandBufferConsoleMessage /* msg */)
520 542
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 684
663 // Confirm decoder has been flushed. 685 // Confirm decoder has been flushed.
664 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) 686 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone)
665 687
666 // Confirm decoder has been reset. 688 // Confirm decoder has been reset.
667 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) 689 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone)
668 690
669 // Video decoder has encountered an error. 691 // Video decoder has encountered an error.
670 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, 692 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
671 uint32) /* Error ID */ 693 uint32) /* Error ID */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698