summaryrefslogtreecommitdiff
path: root/chromium/content/common/gpu/gpu_messages.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/common/gpu/gpu_messages.h')
-rw-r--r--chromium/content/common/gpu/gpu_messages.h128
1 files changed, 60 insertions, 68 deletions
diff --git a/chromium/content/common/gpu/gpu_messages.h b/chromium/content/common/gpu/gpu_messages.h
index 3952d796dab..084b2d80676 100644
--- a/chromium/content/common/gpu/gpu_messages.h
+++ b/chromium/content/common/gpu/gpu_messages.h
@@ -10,15 +10,15 @@
#include "base/memory/shared_memory.h"
#include "content/common/content_export.h"
-#include "content/common/gpu/gpu_memory_allocation.h"
#include "content/common/gpu/gpu_memory_uma_stats.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
#include "content/common/gpu/gpu_rendering_stats.h"
-#include "content/common/gpu/surface_capturer.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/gpu_memory_stats.h"
+#include "gpu/command_buffer/common/capabilities.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "gpu/command_buffer/common/constants.h"
+#include "gpu/command_buffer/common/gpu_memory_allocation.h"
#include "gpu/command_buffer/common/mailbox.h"
#include "gpu/config/gpu_info.h"
#include "gpu/ipc/gpu_command_buffer_traits.h"
@@ -28,6 +28,7 @@
#include "media/video/video_decode_accelerator.h"
#include "media/video/video_encode_accelerator.h"
#include "ui/events/latency_info.h"
+#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
#include "ui/gl/gpu_preference.h"
@@ -75,7 +76,6 @@ IPC_STRUCT_END()
IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceRelease_Params)
IPC_STRUCT_MEMBER(int32, surface_id)
- IPC_STRUCT_MEMBER(int32, route_id)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params)
@@ -169,6 +169,20 @@ IPC_STRUCT_TRAITS_BEGIN(gpu::GPUInfo)
#endif
IPC_STRUCT_TRAITS_END()
+IPC_STRUCT_TRAITS_BEGIN(gpu::Capabilities)
+ IPC_STRUCT_TRAITS_MEMBER(post_sub_buffer)
+ IPC_STRUCT_TRAITS_MEMBER(fast_npot_mo8_textures)
+ IPC_STRUCT_TRAITS_MEMBER(egl_image_external)
+ IPC_STRUCT_TRAITS_MEMBER(texture_format_bgra8888)
+ IPC_STRUCT_TRAITS_MEMBER(texture_format_etc1)
+ IPC_STRUCT_TRAITS_MEMBER(texture_rectangle)
+ IPC_STRUCT_TRAITS_MEMBER(iosurface)
+ IPC_STRUCT_TRAITS_MEMBER(texture_usage)
+ IPC_STRUCT_TRAITS_MEMBER(texture_storage)
+ IPC_STRUCT_TRAITS_MEMBER(discard_framebuffer)
+ IPC_STRUCT_TRAITS_MEMBER(map_image)
+IPC_STRUCT_TRAITS_END()
+
IPC_STRUCT_TRAITS_BEGIN(content::GPUVideoMemoryUsageStats::ProcessStats)
IPC_STRUCT_TRAITS_MEMBER(video_memory)
IPC_STRUCT_TRAITS_MEMBER(has_duplicates)
@@ -186,16 +200,13 @@ IPC_STRUCT_TRAITS_BEGIN(content::GPUMemoryUmaStats)
IPC_STRUCT_TRAITS_MEMBER(bytes_limit)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(content::GpuMemoryAllocationForRenderer)
+IPC_STRUCT_TRAITS_BEGIN(gpu::MemoryAllocation)
IPC_STRUCT_TRAITS_MEMBER(bytes_limit_when_visible)
IPC_STRUCT_TRAITS_MEMBER(priority_cutoff_when_visible)
- IPC_STRUCT_TRAITS_MEMBER(bytes_limit_when_not_visible)
- IPC_STRUCT_TRAITS_MEMBER(priority_cutoff_when_not_visible)
- IPC_STRUCT_TRAITS_MEMBER(have_backbuffer_when_not_visible)
IPC_STRUCT_TRAITS_END()
-IPC_ENUM_TRAITS(content::GpuMemoryAllocationForRenderer::PriorityCutoff)
+IPC_ENUM_TRAITS(gpu::MemoryAllocation::PriorityCutoff)
-IPC_STRUCT_TRAITS_BEGIN(content::GpuManagedMemoryStats)
+IPC_STRUCT_TRAITS_BEGIN(gpu::ManagedMemoryStats)
IPC_STRUCT_TRAITS_MEMBER(bytes_required)
IPC_STRUCT_TRAITS_MEMBER(bytes_nice_to_have)
IPC_STRUCT_TRAITS_MEMBER(bytes_allocated)
@@ -223,14 +234,13 @@ IPC_STRUCT_TRAITS_BEGIN(content::GpuRenderingStats)
IPC_STRUCT_TRAITS_MEMBER(total_texture_upload_time)
IPC_STRUCT_TRAITS_MEMBER(global_total_processing_commands_time)
IPC_STRUCT_TRAITS_MEMBER(total_processing_commands_time)
+ IPC_STRUCT_TRAITS_MEMBER(global_video_memory_bytes_allocated)
IPC_STRUCT_TRAITS_END()
IPC_ENUM_TRAITS(media::VideoFrame::Format)
IPC_ENUM_TRAITS(media::VideoEncodeAccelerator::Error)
-IPC_ENUM_TRAITS(content::SurfaceCapturer::Error)
-
//------------------------------------------------------------------------------
// GPU Messages
// These are messages from the browser to the GPU process.
@@ -295,6 +305,9 @@ IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_ResizeViewACK)
IPC_MESSAGE_ROUTED1(AcceleratedSurfaceMsg_BufferPresented,
AcceleratedSurfaceMsg_BufferPresented_Params)
+// Tells the GPU process to wake up the GPU because we're about to draw.
+IPC_MESSAGE_ROUTED0(AcceleratedSurfaceMsg_WakeUpGpu)
+
// Tells the GPU process to remove all contexts.
IPC_MESSAGE_CONTROL0(GpuMsg_Clean)
@@ -384,6 +397,11 @@ IPC_MESSAGE_CONTROL3(GpuHostMsg_ResizeView,
int32 /* route_id */,
gfx::Size /* size */)
+// Tells the browser that a new accelerated surface was initialized.
+IPC_MESSAGE_CONTROL2(GpuHostMsg_AcceleratedSurfaceInitialized,
+ int32 /* surface_id */,
+ int32 /* route_id */)
+
// Tells the browser that a frame with the specific latency info was drawn to
// the screen
IPC_MESSAGE_CONTROL1(GpuHostMsg_FrameDrawn,
@@ -493,6 +511,14 @@ IPC_SYNC_MESSAGE_CONTROL1_1(GpuChannelMsg_CollectRenderingStatsForSurface,
int32 /* surface_id */,
content::GpuRenderingStats /* stats */)
+// Sent by DevTools agent in the inspected renderer process to initiate GPU
+// instrumentation events recording.
+IPC_SYNC_MESSAGE_CONTROL0_1(GpuChannelMsg_DevToolsStartEventsRecording,
+ int32 /* route_id */)
+
+// The message is sent when DevTools want to stop events recording.
+IPC_MESSAGE_CONTROL0(GpuChannelMsg_DevToolsStopEventsRecording)
+
#if defined(OS_ANDROID)
//------------------------------------------------------------------------------
// Stream Texture Messages
@@ -511,9 +537,10 @@ IPC_MESSAGE_ROUTED1(GpuStreamTextureMsg_MatrixChanged,
// Initialize a command buffer with the given number of command entries.
// Returns the shared memory handle for the command buffer mapped to the
// calling process.
-IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_Initialize,
+IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_Initialize,
base::SharedMemoryHandle /* shared_state */,
- bool /* result */)
+ bool /* result */,
+ gpu::Capabilities /* capabilities */)
// Sets the shared memory buffer used for commands.
IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_SetGetBuffer,
@@ -554,7 +581,7 @@ IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_Rescheduled)
IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ConsoleMsg,
GPUCommandBufferConsoleMessage /* msg */)
-// Register an existing shared memory transfer buffer. Returns an id that can be
+// Register an existing shared memory transfer buffer. The id that can be
// used to identify the transfer buffer from a command buffer.
IPC_MESSAGE_ROUTED3(GpuCommandBufferMsg_RegisterTransferBuffer,
int32 /* id */,
@@ -579,12 +606,6 @@ IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder,
media::VideoCodecProfile /* profile */,
int /* route_id */)
-// Create and initialize a surface capturer, returning its new route_id.
-// Created capturers should be freed with SurfaceCapturerMsg_Destroy when no
-// longer needed.
-IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_CreateSurfaceCapturer,
- int /* route_id */)
-
// Tells the proxy that there was an error and the command buffer had to be
// destroyed for some reason.
IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed,
@@ -601,18 +622,14 @@ IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_EchoAck)
// Send to stub on surface visibility change.
IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetSurfaceVisible, bool /* visible */)
-IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_DiscardBackbuffer)
-IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_EnsureBackbuffer)
-
// Sent to proxy when the gpu memory manager changes its memory allocation.
IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetMemoryAllocation,
- content::GpuMemoryAllocationForRenderer /* allocation */)
+ gpu::MemoryAllocation /* allocation */)
// Sent to stub from the proxy with statistics on managed memory usage and
// requirements.
-IPC_MESSAGE_ROUTED1(
- GpuCommandBufferMsg_SendClientManagedMemoryStats,
- content::GpuManagedMemoryStats /* stats */)
+IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SendClientManagedMemoryStats,
+ gpu::ManagedMemoryStats /* stats */)
// Sent to stub when proxy is assigned a memory allocation changed callback.
IPC_MESSAGE_ROUTED1(
@@ -649,6 +666,19 @@ IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SignalQuery,
uint32 /* query */,
uint32 /* signal_id */)
+// Register an existing gpu memory buffer. The id that can be
+// used to identify the gpu memory buffer from a command buffer.
+IPC_MESSAGE_ROUTED5(GpuCommandBufferMsg_RegisterGpuMemoryBuffer,
+ int32 /* id */,
+ gfx::GpuMemoryBufferHandle /* gpu_memory_buffer */,
+ uint32 /* width */,
+ uint32 /* height */,
+ uint32 /* internalformat */)
+
+// Destroy a previously created gpu memory buffer.
+IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyGpuMemoryBuffer,
+ int32 /* id */)
+
//------------------------------------------------------------------------------
// Accelerated Video Decoder Messages
// These messages are sent from Renderer process to GPU process.
@@ -661,10 +691,9 @@ IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode,
// Sent from Renderer process to the GPU process to give the texture IDs for
// the textures the decoder will use for output.
-IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_AssignPictureBuffers,
- std::vector<int32>, /* Picture buffer ID */
- std::vector<uint32>, /* Texture ID */
- std::vector<gfx::Size>) /* Size */
+IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers,
+ std::vector<int32>, /* Picture buffer ID */
+ std::vector<uint32>) /* Texture ID */
// Send from Renderer process to the GPU process to recycle the given picture
// buffer for further decoding.
@@ -777,40 +806,3 @@ IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady,
// Report error condition.
IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError,
media::VideoEncodeAccelerator::Error /* error */)
-
-//------------------------------------------------------------------------------
-// Gpu Surface Capturer Messages
-// These messages are sent from the Browser process to the GPU process.
-
-// Initialize the capturer.
-IPC_MESSAGE_ROUTED1(SurfaceCapturerMsg_Initialize,
- media::VideoFrame::Format /* format */)
-
-// Attempt to start a capture.
-IPC_MESSAGE_ROUTED0(SurfaceCapturerMsg_TryCapture)
-
-// Copy captured contents to a video frame.
-IPC_MESSAGE_ROUTED3(SurfaceCapturerMsg_CopyCaptureToVideoFrame,
- int32 /* buffer_id */,
- base::SharedMemoryHandle /* buffer_shm */,
- uint32 /* buffer_size */)
-
-// Destroy the capturer.
-IPC_MESSAGE_ROUTED0(SurfaceCapturerMsg_Destroy)
-
-//------------------------------------------------------------------------------
-// Gpu Surface Capturer Host Messages
-// These messages are sent from GPU process to Browser process.
-
-// Report the capture output parameters to the Browser process.
-IPC_MESSAGE_ROUTED2(SurfaceCapturerHostMsg_NotifyCaptureParameters,
- gfx::Size /* buffer_size */,
- gfx::Rect /* visible_rect */)
-
-// Report successful copy of a capture of a surface.
-IPC_MESSAGE_ROUTED1(SurfaceCapturerHostMsg_NotifyCopyCaptureDone,
- int32 /* frame_id */)
-
-// Report error.
-IPC_MESSAGE_ROUTED1(SurfaceCapturerHostMsg_NotifyError,
- content::SurfaceCapturer::Error /* error */)