gpu: Add fields for DRM info
These will be used to communicate between Exo and the GPU process.
As both users have been subject of reverts before, land this
independently.
This has been split out of
https://chromium-review.googlesource.com/c/chromium/src/+/3925978
Bug: b:224580219
Change-Id: Ifbeb0dcd6691a8059a9f91a9bd77fc18f1f1c568
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3963041
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1061209}
diff --git a/gpu/command_buffer/common/capabilities.h b/gpu/command_buffer/common/capabilities.h
index d0a3be2..8d768b7 100644
--- a/gpu/command_buffer/common/capabilities.h
+++ b/gpu/command_buffer/common/capabilities.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <vector>
+#include "base/containers/flat_map.h"
#include "gpu/command_buffer/common/gpu_memory_buffer_support.h"
#include "gpu/gpu_export.h"
#include "ui/gfx/buffer_types.h"
@@ -219,6 +220,9 @@
gfx::BufferFormat::YVU_420,
};
std::vector<gfx::BufferUsageAndFormat> texture_target_exception_list;
+
+ base::flat_map<uint32_t, std::vector<uint64_t>> drm_formats_and_modifiers;
+ std::string drm_render_node;
};
} // namespace gpu
diff --git a/gpu/ipc/common/gpu_command_buffer_traits_multi.h b/gpu/ipc/common/gpu_command_buffer_traits_multi.h
index 5715668..f0474dc7 100644
--- a/gpu/ipc/common/gpu_command_buffer_traits_multi.h
+++ b/gpu/ipc/common/gpu_command_buffer_traits_multi.h
@@ -162,6 +162,8 @@
IPC_STRUCT_TRAITS_MEMBER(gpu_memory_buffer_formats)
IPC_STRUCT_TRAITS_MEMBER(texture_target_exception_list)
+ IPC_STRUCT_TRAITS_MEMBER(drm_formats_and_modifiers)
+ IPC_STRUCT_TRAITS_MEMBER(drm_render_node)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(gpu::CommandBuffer::State)