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

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

Issue 9702081: Splitting GpuMemoryAllocation into two parts: for renderer and browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 <vector> 8 #include <vector>
9 #include <string> 9 #include <string>
10 10
11 #include "base/shared_memory.h" 11 #include "base/shared_memory.h"
12 #include "content/common/gpu/gpu_memory_allocation.h" 12 #include "content/common/gpu/gpu_memory_allocation.h"
13 #include "content/common/gpu/gpu_process_launch_causes.h" 13 #include "content/common/gpu/gpu_process_launch_causes.h"
14 #include "content/public/common/common_param_traits.h" 14 #include "content/public/common/common_param_traits.h"
15 #include "content/public/common/gpu_info.h" 15 #include "content/public/common/gpu_info.h"
16 #include "gpu/command_buffer/common/command_buffer.h" 16 #include "gpu/command_buffer/common/command_buffer.h"
17 #include "gpu/command_buffer/common/constants.h" 17 #include "gpu/command_buffer/common/constants.h"
18 #include "gpu/ipc/gpu_command_buffer_traits.h" 18 #include "gpu/ipc/gpu_command_buffer_traits.h"
19 #include "ipc/ipc_channel_handle.h" 19 #include "ipc/ipc_channel_handle.h"
20 #include "ipc/ipc_message_macros.h" 20 #include "ipc/ipc_message_macros.h"
21 #include "media/video/video_decode_accelerator.h" 21 #include "media/video/video_decode_accelerator.h"
22 #include "ui/gfx/gl/gl_surface.h"
mmocny 2012/03/15 19:11:43 will remove.
22 #include "ui/gfx/gl/gpu_preference.h" 23 #include "ui/gfx/gl/gpu_preference.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/gfx/surface/transport_dib.h" 26 #include "ui/gfx/surface/transport_dib.h"
26 27
27 #define IPC_MESSAGE_START GpuMsgStart 28 #define IPC_MESSAGE_START GpuMsgStart
28 29
29 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) 30 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig)
30 IPC_STRUCT_MEMBER(int32, share_group_id) 31 IPC_STRUCT_MEMBER(int32, share_group_id)
31 IPC_STRUCT_MEMBER(std::string, allowed_extensions) 32 IPC_STRUCT_MEMBER(std::string, allowed_extensions)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 IPC_STRUCT_TRAITS_MEMBER(gl_renderer) 113 IPC_STRUCT_TRAITS_MEMBER(gl_renderer)
113 IPC_STRUCT_TRAITS_MEMBER(gl_extensions) 114 IPC_STRUCT_TRAITS_MEMBER(gl_extensions)
114 IPC_STRUCT_TRAITS_MEMBER(can_lose_context) 115 IPC_STRUCT_TRAITS_MEMBER(can_lose_context)
115 IPC_STRUCT_TRAITS_MEMBER(performance_stats) 116 IPC_STRUCT_TRAITS_MEMBER(performance_stats)
116 IPC_STRUCT_TRAITS_MEMBER(software_rendering) 117 IPC_STRUCT_TRAITS_MEMBER(software_rendering)
117 #if defined(OS_WIN) 118 #if defined(OS_WIN)
118 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) 119 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics)
119 #endif 120 #endif
120 IPC_STRUCT_TRAITS_END() 121 IPC_STRUCT_TRAITS_END()
121 122
122 IPC_STRUCT_TRAITS_BEGIN(GpuMemoryAllocation) 123 IPC_STRUCT_TRAITS_BEGIN(GpuMemoryAllocationForRenderer)
123 IPC_STRUCT_TRAITS_MEMBER(gpu_resource_size_in_bytes) 124 IPC_STRUCT_TRAITS_MEMBER(gpu_resource_size_in_bytes)
124 IPC_STRUCT_TRAITS_MEMBER(has_frontbuffer) 125 IPC_STRUCT_TRAITS_MEMBER(suggest_have_backbuffer)
125 IPC_STRUCT_TRAITS_MEMBER(has_backbuffer)
126 IPC_STRUCT_TRAITS_END() 126 IPC_STRUCT_TRAITS_END()
127 127
128 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle) 128 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle)
129 IPC_STRUCT_TRAITS_MEMBER(handle) 129 IPC_STRUCT_TRAITS_MEMBER(handle)
130 IPC_STRUCT_TRAITS_MEMBER(transport) 130 IPC_STRUCT_TRAITS_MEMBER(transport)
131 IPC_STRUCT_TRAITS_MEMBER(parent_gpu_process_id) 131 IPC_STRUCT_TRAITS_MEMBER(parent_gpu_process_id)
132 IPC_STRUCT_TRAITS_MEMBER(parent_client_id) 132 IPC_STRUCT_TRAITS_MEMBER(parent_client_id)
133 IPC_STRUCT_TRAITS_MEMBER(parent_context_id) 133 IPC_STRUCT_TRAITS_MEMBER(parent_context_id)
134 IPC_STRUCT_TRAITS_MEMBER(parent_texture_id[0]) 134 IPC_STRUCT_TRAITS_MEMBER(parent_texture_id[0])
135 IPC_STRUCT_TRAITS_MEMBER(parent_texture_id[1]) 135 IPC_STRUCT_TRAITS_MEMBER(parent_texture_id[1])
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 // delayed. 434 // delayed.
435 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Echo, 435 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Echo,
436 IPC::Message /* reply */) 436 IPC::Message /* reply */)
437 437
438 // Response to a GpuChannelMsg_Echo message. 438 // Response to a GpuChannelMsg_Echo message.
439 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_EchoAck) 439 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_EchoAck)
440 440
441 // Send to stub on surface visibility change. 441 // Send to stub on surface visibility change.
442 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetSurfaceVisible, bool /* visible */) 442 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetSurfaceVisible, bool /* visible */)
443 443
444 // Request that the GPU process create/destroy the surface backbuffer.
445 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_CreateBackbuffer)
446 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_DestroyBackbuffer)
447
444 // Sent to proxy when the gpu memory manager changes its memory allocation. 448 // Sent to proxy when the gpu memory manager changes its memory allocation.
445 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetMemoryAllocation, 449 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetMemoryAllocation,
446 GpuMemoryAllocation /* allocation */) 450 GpuMemoryAllocationForRenderer /* allocation */)
447 451
448 //------------------------------------------------------------------------------ 452 //------------------------------------------------------------------------------
449 // Accelerated Video Decoder Messages 453 // Accelerated Video Decoder Messages
450 // These messages are sent from Renderer process to GPU process. 454 // These messages are sent from Renderer process to GPU process.
451 455
452 // Send input buffer for decoding. 456 // Send input buffer for decoding.
453 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode, 457 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode,
454 base::SharedMemoryHandle, /* input_buffer_handle */ 458 base::SharedMemoryHandle, /* input_buffer_handle */
455 int32, /* bitstream_buffer_id */ 459 int32, /* bitstream_buffer_id */
456 int32) /* size */ 460 int32) /* size */
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 507
504 // Confirm decoder has been flushed. 508 // Confirm decoder has been flushed.
505 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) 509 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone)
506 510
507 // Confirm decoder has been reset. 511 // Confirm decoder has been reset.
508 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) 512 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone)
509 513
510 // Video decoder has encountered an error. 514 // Video decoder has encountered an error.
511 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, 515 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
512 uint32) /* Error ID */ 516 uint32) /* Error ID */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698