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

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

Issue 10695181: [Android] Upstream all the IPC communications/handlings for stream texture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nits Created 8 years, 5 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 "gpu/command_buffer/common/command_buffer.h" 17 #include "gpu/command_buffer/common/command_buffer.h"
18 #include "gpu/command_buffer/common/constants.h" 18 #include "gpu/command_buffer/common/constants.h"
19 #include "gpu/ipc/gpu_command_buffer_traits.h" 19 #include "gpu/ipc/gpu_command_buffer_traits.h"
20 #include "ipc/ipc_channel_handle.h" 20 #include "ipc/ipc_channel_handle.h"
21 #include "ipc/ipc_message_macros.h" 21 #include "ipc/ipc_message_macros.h"
22 #include "media/video/video_decode_accelerator.h" 22 #include "media/video/video_decode_accelerator.h"
23 #include "ui/gfx/native_widget_types.h" 23 #include "ui/gfx/native_widget_types.h"
24 #include "ui/gfx/size.h" 24 #include "ui/gfx/size.h"
25 #include "ui/gl/gpu_preference.h" 25 #include "ui/gl/gpu_preference.h"
26 #include "ui/surface/transport_dib.h" 26 #include "ui/surface/transport_dib.h"
27 27
28 #if defined(OS_ANDROID)
29 #include "ui/gfx/rect.h"
apatrick_chromium 2012/07/12 23:51:31 I don't think you used Rect.
qinmin 2012/07/13 00:41:33 removed On 2012/07/12 23:51:31, apatrick_chromium
30 #include "content/common/android/surface_texture_peer.h"
31 #endif
32
28 #define IPC_MESSAGE_START GpuMsgStart 33 #define IPC_MESSAGE_START GpuMsgStart
29 34
30 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) 35 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig)
31 IPC_STRUCT_MEMBER(int32, share_group_id) 36 IPC_STRUCT_MEMBER(int32, share_group_id)
32 IPC_STRUCT_MEMBER(std::string, allowed_extensions) 37 IPC_STRUCT_MEMBER(std::string, allowed_extensions)
33 IPC_STRUCT_MEMBER(std::vector<int>, attribs) 38 IPC_STRUCT_MEMBER(std::vector<int>, attribs)
34 IPC_STRUCT_MEMBER(GURL, active_url) 39 IPC_STRUCT_MEMBER(GURL, active_url)
35 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) 40 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference)
36 IPC_STRUCT_END() 41 IPC_STRUCT_END()
37 42
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #if defined(OS_MACOSX) 87 #if defined(OS_MACOSX)
83 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) 88 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window)
84 #endif 89 #endif
85 IPC_STRUCT_END() 90 IPC_STRUCT_END()
86 91
87 IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage) 92 IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage)
88 IPC_STRUCT_MEMBER(int32, id) 93 IPC_STRUCT_MEMBER(int32, id)
89 IPC_STRUCT_MEMBER(std::string, message) 94 IPC_STRUCT_MEMBER(std::string, message)
90 IPC_STRUCT_END() 95 IPC_STRUCT_END()
91 96
97 #if defined(OS_ANDROID)
98 IPC_STRUCT_BEGIN(GpuStreamTextureMsg_MatrixChanged_Params)
99 IPC_STRUCT_MEMBER(float, m00)
100 IPC_STRUCT_MEMBER(float, m01)
101 IPC_STRUCT_MEMBER(float, m02)
102 IPC_STRUCT_MEMBER(float, m03)
103 IPC_STRUCT_MEMBER(float, m10)
104 IPC_STRUCT_MEMBER(float, m11)
105 IPC_STRUCT_MEMBER(float, m12)
106 IPC_STRUCT_MEMBER(float, m13)
107 IPC_STRUCT_MEMBER(float, m20)
108 IPC_STRUCT_MEMBER(float, m21)
109 IPC_STRUCT_MEMBER(float, m22)
110 IPC_STRUCT_MEMBER(float, m23)
111 IPC_STRUCT_MEMBER(float, m30)
112 IPC_STRUCT_MEMBER(float, m31)
113 IPC_STRUCT_MEMBER(float, m32)
114 IPC_STRUCT_MEMBER(float, m33)
115 IPC_STRUCT_END()
116 IPC_ENUM_TRAITS(content::SurfaceTexturePeer::SurfaceTextureTarget)
117 #endif
118
92 IPC_STRUCT_TRAITS_BEGIN(content::DxDiagNode) 119 IPC_STRUCT_TRAITS_BEGIN(content::DxDiagNode)
93 IPC_STRUCT_TRAITS_MEMBER(values) 120 IPC_STRUCT_TRAITS_MEMBER(values)
94 IPC_STRUCT_TRAITS_MEMBER(children) 121 IPC_STRUCT_TRAITS_MEMBER(children)
95 IPC_STRUCT_TRAITS_END() 122 IPC_STRUCT_TRAITS_END()
96 123
97 IPC_STRUCT_TRAITS_BEGIN(content::GpuPerformanceStats) 124 IPC_STRUCT_TRAITS_BEGIN(content::GpuPerformanceStats)
98 IPC_STRUCT_TRAITS_MEMBER(graphics) 125 IPC_STRUCT_TRAITS_MEMBER(graphics)
99 IPC_STRUCT_TRAITS_MEMBER(gaming) 126 IPC_STRUCT_TRAITS_MEMBER(gaming)
100 IPC_STRUCT_TRAITS_MEMBER(overall) 127 IPC_STRUCT_TRAITS_MEMBER(overall)
101 IPC_STRUCT_TRAITS_END() 128 IPC_STRUCT_TRAITS_END()
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 gfx::Size, /* size */ 331 gfx::Size, /* size */
305 GPUCreateCommandBufferConfig, /* init_params */ 332 GPUCreateCommandBufferConfig, /* init_params */
306 int32 /* route_id */) 333 int32 /* route_id */)
307 334
308 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its 335 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its
309 // destructor, so that the stub deletes the actual CommandBufferService 336 // destructor, so that the stub deletes the actual CommandBufferService
310 // object that it's hosting. 337 // object that it's hosting.
311 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyCommandBuffer, 338 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyCommandBuffer,
312 int32 /* instance_id */) 339 int32 /* instance_id */)
313 340
341
342 #if defined(OS_ANDROID)
343 // Register the StreamTextureProxy class with the GPU process, so that
344 // the renderer process will get notified whenever a frame becomes available.
345 IPC_SYNC_MESSAGE_CONTROL2_1(GpuChannelMsg_RegisterStreamTextureProxy,
346 int32, /* stream_id */
347 gfx::Size, /* initial_size */
348 int /* route_id */)
349
350 // Tells the GPU process create and send the java surface texture object to
351 // the renderer process through the binder thread.
352 IPC_MESSAGE_CONTROL4(GpuChannelMsg_EstablishStreamTexture,
353 int32, /* stream_id */
354 content::SurfaceTexturePeer::SurfaceTextureTarget,
355 /* type */
356 int32, /* primary_id */
357 int32 /* secondary_id */)
358
359 //------------------------------------------------------------------------------
360 // Stream Texture Messages
361 // Inform the renderer that a new frame is available.
362 IPC_MESSAGE_ROUTED0(GpuStreamTextureMsg_FrameAvailable)
363
364 // Inform the renderer process that the transform matrix has changed.
365 IPC_MESSAGE_ROUTED1(GpuStreamTextureMsg_MatrixChanged,
366 GpuStreamTextureMsg_MatrixChanged_Params /* params */)
367 #endif
368
314 //------------------------------------------------------------------------------ 369 //------------------------------------------------------------------------------
315 // GPU Command Buffer Messages 370 // GPU Command Buffer Messages
316 // These are messages between a renderer process to the GPU process relating to 371 // These are messages between a renderer process to the GPU process relating to
317 // a single OpenGL context. 372 // a single OpenGL context.
318 // Initialize a command buffer with the given number of command entries. 373 // Initialize a command buffer with the given number of command entries.
319 // Returns the shared memory handle for the command buffer mapped to the 374 // Returns the shared memory handle for the command buffer mapped to the
320 // calling process. 375 // calling process.
321 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_Initialize, 376 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_Initialize,
322 bool /* result */) 377 bool /* result */)
323 378
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 586
532 // Confirm decoder has been flushed. 587 // Confirm decoder has been flushed.
533 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) 588 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone)
534 589
535 // Confirm decoder has been reset. 590 // Confirm decoder has been reset.
536 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) 591 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone)
537 592
538 // Video decoder has encountered an error. 593 // Video decoder has encountered an error.
539 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, 594 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
540 uint32) /* Error ID */ 595 uint32) /* Error ID */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698