mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 05:46:03 +00:00
Tests: the terminal-callers harness stubs take_shm's game-frame detection
Main's take_shm now reads surface damage, parent/role/mapped and the HUD state to spot game frames; the harness declares them so the copied function compiles (setUpClass failed in Build APK run 40505286127). No damage, so it stays off.
This commit is contained in:
1 parent
53edc4882a
commit
948b9cbc8d
1 file changed
+14
@@ -99,11 +99,25 @@ int blendp_draw(VkCommandBuffer c, VkImage s, VkFormat sf, int sw, int sh, int s
|
||||
int droiddeck_color_requested(void) { return 0; }
|
||||
float droiddeck_color_sdr_white(void) { return 203.0f; }
|
||||
|
||||
enum surface_role { ROLE_NONE, ROLE_TOPLEVEL };
|
||||
struct damage_list { int n; };
|
||||
struct surface {
|
||||
struct vkp_image *shm_img;
|
||||
struct wl_resource *resource;
|
||||
int buf_w, buf_h, buf_alpha, has_content;
|
||||
/* Read by take_shm's game-frame detection; with no damage it stays off here. */
|
||||
int src_set; float src[4];
|
||||
struct damage_list damage_buf, damage_local;
|
||||
struct surface *parent; enum surface_role role; int mapped;
|
||||
};
|
||||
static void surface_size(const struct surface *s, int *w, int *h) { *w = s->buf_w; *h = s->buf_h; }
|
||||
static void scene_size(int *w, int *h) { *w = *h = 0; }
|
||||
static int64_t damage_area(const struct damage_list *d, int bound_w, int bound_h) { return 0; }
|
||||
static int64_t now_ns(void) { return 0; }
|
||||
static struct surface *g_hud_surface, *g_hud_shm;
|
||||
static int64_t g_hud_shm_ns, g_hud_last_ns;
|
||||
static int g_hud_new;
|
||||
static void droiddeck_on_game_frame(void) {}
|
||||
struct client_info { int asked_feedback, shm_frames; };
|
||||
struct wl_shm_buffer { int w, h, stride; const void *data; };
|
||||
#define WL_SHM_FORMAT_ARGB8888 0
|
||||
|
||||
Reference in new issue
Block a user