From 3e72fc3c5d869bd755cc44bb877fb93a3df0011e Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 9 Feb 2023 10:37:07 +0100 Subject: [PATCH] test/libdrm_mock: add liftoff_mock_plane_get_id() Useful when manually calling liftoff_plane_create() is desirable. --- test/libdrm_mock.c | 6 ++++++ test/libdrm_mock.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/test/libdrm_mock.c b/test/libdrm_mock.c index a180395..e2ffbf8 100644 --- a/test/libdrm_mock.c +++ b/test/libdrm_mock.c @@ -206,6 +206,12 @@ liftoff_mock_plane_add_compatible_layer(struct liftoff_mock_plane *plane, abort(); // unreachable } +uint32_t +liftoff_mock_plane_get_id(struct liftoff_mock_plane *plane) +{ + return plane->id; +} + uint32_t liftoff_mock_drm_create_fb(struct liftoff_layer *layer) { diff --git a/test/libdrm_mock.h b/test/libdrm_mock.h index e2e60ba..54a2a85 100644 --- a/test/libdrm_mock.h +++ b/test/libdrm_mock.h @@ -37,6 +37,8 @@ liftoff_mock_plane_add_compatible_layer(struct liftoff_mock_plane *plane, struct liftoff_layer *layer); struct liftoff_layer * liftoff_mock_plane_get_layer(struct liftoff_mock_plane *plane); +uint32_t +liftoff_mock_plane_get_id(struct liftoff_mock_plane *plane); uint32_t liftoff_mock_plane_add_property(struct liftoff_mock_plane *plane,