libliftoff/test/include/libdrm_mock.h
Simon Ser b16078769e
test/libdrm_mock: a test-only commit applies properties
The previous mock library assumed the DRM client would always set all
properties in the atomic request. However, if a previous test-only commit
has set a property, there's no need to set it again.

Accomodate for this in libdrm_mock. This will be useful when we'll skip
setting properties that haven't changed in libliftoff.

References: https://github.com/emersion/libliftoff/issues/37
2020-01-13 12:14:33 +01:00

21 lines
682 B
C

#ifndef LIFTOFF_LIBDRM_MOCK_H
#define LIFTOFF_LIBDRM_MOCK_H
#include <stddef.h>
#include <stdint.h>
#include <xf86drmMode.h>
extern uint32_t liftoff_mock_drm_crtc_id;
extern size_t liftoff_mock_commit_count;
struct liftoff_layer;
int liftoff_mock_drm_open(void);
uint32_t liftoff_mock_drm_create_fb(struct liftoff_layer *layer);
struct liftoff_mock_plane *liftoff_mock_drm_create_plane(int type);
struct liftoff_mock_plane *liftoff_mock_drm_get_plane(uint32_t id);
void 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);
#endif