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

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, 8 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/debug/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"
(...skipping 21 matching lines...) Expand all
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)
54 IPC_STRUCT_MEMBER(cc::LatencyInfo, latency_info)
53 IPC_STRUCT_END() 55 IPC_STRUCT_END()
54 #undef IPC_MESSAGE_EXPORT 56 #undef IPC_MESSAGE_EXPORT
55 #define IPC_MESSAGE_EXPORT 57 #define IPC_MESSAGE_EXPORT
56 58
57 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params) 59 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params)
58 IPC_STRUCT_MEMBER(int32, surface_id) 60 IPC_STRUCT_MEMBER(int32, surface_id)
59 IPC_STRUCT_MEMBER(uint64, surface_handle) 61 IPC_STRUCT_MEMBER(uint64, surface_handle)
60 IPC_STRUCT_MEMBER(int32, route_id) 62 IPC_STRUCT_MEMBER(int32, route_id)
61 IPC_STRUCT_MEMBER(int, x) 63 IPC_STRUCT_MEMBER(int, x)
62 IPC_STRUCT_MEMBER(int, y) 64 IPC_STRUCT_MEMBER(int, y)
63 IPC_STRUCT_MEMBER(int, width) 65 IPC_STRUCT_MEMBER(int, width)
64 IPC_STRUCT_MEMBER(int, height) 66 IPC_STRUCT_MEMBER(int, height)
65 IPC_STRUCT_MEMBER(std::string, mailbox_name) 67 IPC_STRUCT_MEMBER(std::string, mailbox_name)
66 IPC_STRUCT_MEMBER(gfx::Size, surface_size) 68 IPC_STRUCT_MEMBER(gfx::Size, surface_size)
69 IPC_STRUCT_MEMBER(cc::LatencyInfo, latency_info)
67 IPC_STRUCT_END() 70 IPC_STRUCT_END()
68 71
69 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params) 72 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params)
70 IPC_STRUCT_MEMBER(int32, surface_id) 73 IPC_STRUCT_MEMBER(int32, surface_id)
71 IPC_STRUCT_MEMBER(int32, route_id) 74 IPC_STRUCT_MEMBER(int32, route_id)
72 IPC_STRUCT_END() 75 IPC_STRUCT_END()
73 76
74 IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params) 77 IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params)
75 IPC_STRUCT_MEMBER(std::string, mailbox_name) 78 IPC_STRUCT_MEMBER(std::string, mailbox_name)
76 IPC_STRUCT_MEMBER(uint32, sync_point) 79 IPC_STRUCT_MEMBER(uint32, sync_point)
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 std::string /* header */, 357 std::string /* header */,
355 std::string /* message */) 358 std::string /* message */)
356 359
357 // Resize the window that is being drawn into. It's important that this 360 // Resize the window that is being drawn into. It's important that this
358 // resize be synchronized with the swapping of the front and back buffers. 361 // resize be synchronized with the swapping of the front and back buffers.
359 IPC_MESSAGE_CONTROL3(GpuHostMsg_ResizeView, 362 IPC_MESSAGE_CONTROL3(GpuHostMsg_ResizeView,
360 int32 /* surface_id */, 363 int32 /* surface_id */,
361 int32 /* route_id */, 364 int32 /* route_id */,
362 gfx::Size /* size */) 365 gfx::Size /* size */)
363 366
367 // Tells the browser that a frame with the specific latency info was drawn to
368 // the screen
369 IPC_MESSAGE_CONTROL1(GpuHostMsg_FrameDrawn,
370 cc::LatencyInfo /* latency_info */)
371
364 // Same as above with a rect of the part of the surface that changed. 372 // Same as above with a rect of the part of the surface that changed.
365 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, 373 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
366 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) 374 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
367 375
368 // This message notifies the browser process that the renderer 376 // This message notifies the browser process that the renderer
369 // swapped a portion of the buffers associated with the given "window", which 377 // swapped a portion of the buffers associated with the given "window", which
370 // should cause the browser to redraw the compositor's contents. 378 // should cause the browser to redraw the compositor's contents.
371 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfacePostSubBuffer, 379 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfacePostSubBuffer,
372 GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params) 380 GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params)
373 381
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetStateFast, 503 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetStateFast,
496 gpu::CommandBuffer::State /* state */) 504 gpu::CommandBuffer::State /* state */)
497 505
498 // Asynchronously synchronize the put and get offsets of both processes. 506 // Asynchronously synchronize the put and get offsets of both processes.
499 // Caller passes its current put offset. Current state (including get offset) 507 // Caller passes its current put offset. Current state (including get offset)
500 // is returned in shared memory. 508 // is returned in shared memory.
501 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_AsyncFlush, 509 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_AsyncFlush,
502 int32 /* put_offset */, 510 int32 /* put_offset */,
503 uint32 /* flush_count */) 511 uint32 /* flush_count */)
504 512
513 // Sends information about the latency of the current frame to the GPU
514 // process.
515 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetLatencyInfo,
516 cc::LatencyInfo /* latency_info */)
517
505 // Asynchronously process any commands known to the GPU process. This is only 518 // Asynchronously process any commands known to the GPU process. This is only
506 // used in the event that a channel is unscheduled and needs to be flushed 519 // used in the event that a channel is unscheduled and needs to be flushed
507 // again to process any commands issued subsequent to unscheduling. The GPU 520 // again to process any commands issued subsequent to unscheduling. The GPU
508 // process actually sends it (deferred) to itself. 521 // process actually sends it (deferred) to itself.
509 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_Rescheduled) 522 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_Rescheduled)
510 523
511 // Sent by the GPU process to display messages in the console. 524 // Sent by the GPU process to display messages in the console.
512 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg, 525 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg,
513 GPUCommandBufferConsoleMessage /* msg */) 526 GPUCommandBufferConsoleMessage /* msg */)
514 527
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 667
655 // Confirm decoder has been flushed. 668 // Confirm decoder has been flushed.
656 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) 669 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone)
657 670
658 // Confirm decoder has been reset. 671 // Confirm decoder has been reset.
659 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) 672 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone)
660 673
661 // Video decoder has encountered an error. 674 // Video decoder has encountered an error.
662 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, 675 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
663 uint32) /* Error ID */ 676 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