mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-16 11:55:39 +00:00
st/gui: Integrate new preview views into end-user UI
This commit is contained in:
parent
dbd8a5b323
commit
1de99e4ce7
|
@ -711,6 +711,7 @@ enum search_type
|
||||||
SEARCH_READBACK,
|
SEARCH_READBACK,
|
||||||
SEARCH_HAND_TRACKER,
|
SEARCH_HAND_TRACKER,
|
||||||
SEARCH_APP_TIMING,
|
SEARCH_APP_TIMING,
|
||||||
|
SEARCH_COMPOSITOR,
|
||||||
SEARCH_COMPOSITOR_TIMING,
|
SEARCH_COMPOSITOR_TIMING,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -730,6 +731,12 @@ struct curated_state
|
||||||
struct u_var_info *enable;
|
struct u_var_info *enable;
|
||||||
} readback; //!< Compositor readback variables.
|
} readback; //!< Compositor readback variables.
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
struct u_var_info *view_0;
|
||||||
|
struct u_var_info *enable;
|
||||||
|
} mirror; //!< Compositor mirror variables.
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
|
@ -786,8 +793,8 @@ curated_on_root_enter(struct u_var_root_info *info, void *priv)
|
||||||
CHECK_RAW("Controller emulation!", SEARCH_INVALID);
|
CHECK_RAW("Controller emulation!", SEARCH_INVALID);
|
||||||
CHECK_RAW("Camera-based Hand Tracker", SEARCH_HAND_TRACKER);
|
CHECK_RAW("Camera-based Hand Tracker", SEARCH_HAND_TRACKER);
|
||||||
CHECK_RAW("App timing info", SEARCH_APP_TIMING);
|
CHECK_RAW("App timing info", SEARCH_APP_TIMING);
|
||||||
|
CHECK_RAW("Compositor", SEARCH_COMPOSITOR);
|
||||||
CHECK_RAW("Compositor timing info", SEARCH_COMPOSITOR_TIMING);
|
CHECK_RAW("Compositor timing info", SEARCH_COMPOSITOR_TIMING);
|
||||||
CHECK_RAW("Compositor", SEARCH_INVALID);
|
|
||||||
CHECK_RAW("Readback", SEARCH_READBACK);
|
CHECK_RAW("Readback", SEARCH_READBACK);
|
||||||
|
|
||||||
// If we have too many app timing structs, ignore them.
|
// If we have too many app timing structs, ignore them.
|
||||||
|
@ -817,6 +824,10 @@ curated_on_elem(struct u_var_info *info, void *priv)
|
||||||
CHECK("Annotated camera feeds", hand_tracking.cams)
|
CHECK("Annotated camera feeds", hand_tracking.cams)
|
||||||
CHECK("Model inputs and outputs", hand_tracking.graph)
|
CHECK("Model inputs and outputs", hand_tracking.graph)
|
||||||
break;
|
break;
|
||||||
|
case SEARCH_COMPOSITOR: // Compositor main.
|
||||||
|
CHECK("Debug: Disable fast path", mirror.enable)
|
||||||
|
CHECK("View[0]", mirror.view_0)
|
||||||
|
break;
|
||||||
case SEARCH_COMPOSITOR_TIMING: // Compositor timing info
|
case SEARCH_COMPOSITOR_TIMING: // Compositor timing info
|
||||||
CHECK("Present to display offset(ms)", timing.present_to_display)
|
CHECK("Present to display offset(ms)", timing.present_to_display)
|
||||||
break;
|
break;
|
||||||
|
@ -856,9 +867,9 @@ curated_render(struct debug_scene *ds, struct gui_program *p)
|
||||||
// Collect the variables.
|
// Collect the variables.
|
||||||
u_var_visit(curated_on_root_enter, curated_on_root_exit, curated_on_elem, &cs);
|
u_var_visit(curated_on_root_enter, curated_on_root_exit, curated_on_elem, &cs);
|
||||||
|
|
||||||
// Always enable the readback sink.
|
// Always enable the mirror sink.
|
||||||
if (cs.readback.enable != NULL) {
|
if (cs.mirror.enable != NULL) {
|
||||||
*(bool *)cs.readback.enable->ptr = true;
|
*(bool *)cs.mirror.enable->ptr = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always set the clear colour.
|
// Always set the clear colour.
|
||||||
|
@ -902,9 +913,9 @@ curated_render(struct debug_scene *ds, struct gui_program *p)
|
||||||
igEndTabBar();
|
igEndTabBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If available draw the readback sink to the background.
|
// If available draw the mirror native images the background.
|
||||||
if (cs.readback.sink != NULL) {
|
if (cs.mirror.view_0 != NULL) {
|
||||||
draw_sink_to_background(cs.readback.sink, &cs.ds);
|
draw_native_images_to_background(cs.mirror.view_0, &cs.ds);
|
||||||
}
|
}
|
||||||
|
|
||||||
igEnd();
|
igEnd();
|
||||||
|
|
Loading…
Reference in a new issue