ephyr: Add a mode for skipping redisplay in glamor
This speeds up headless testing of Xephyr -glamor with softpipe from "a test per minute or so" to "a test every few seconds". Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
453f813bb4
commit
add4979260
|
@ -57,6 +57,7 @@ static Display *dpy;
|
||||||
static XVisualInfo *visual_info;
|
static XVisualInfo *visual_info;
|
||||||
static GLXFBConfig fb_config;
|
static GLXFBConfig fb_config;
|
||||||
Bool ephyr_glamor_gles2;
|
Bool ephyr_glamor_gles2;
|
||||||
|
Bool ephyr_glamor_skip_present;
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -220,6 +221,13 @@ ephyr_glamor_damage_redisplay(struct ephyr_glamor *glamor,
|
||||||
{
|
{
|
||||||
GLint old_vao;
|
GLint old_vao;
|
||||||
|
|
||||||
|
/* Skip presenting the output in this mode. Presentation is
|
||||||
|
* expensive, and if we're just running the X Test suite headless,
|
||||||
|
* nobody's watching.
|
||||||
|
*/
|
||||||
|
if (ephyr_glamor_skip_present)
|
||||||
|
return;
|
||||||
|
|
||||||
glXMakeCurrent(dpy, glamor->glx_win, glamor->ctx);
|
glXMakeCurrent(dpy, glamor->glx_win, glamor->ctx);
|
||||||
|
|
||||||
if (glamor->vao) {
|
if (glamor->vao) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ extern Bool EphyrWantResize;
|
||||||
extern Bool EphyrWantNoHostGrab;
|
extern Bool EphyrWantNoHostGrab;
|
||||||
extern Bool kdHasPointer;
|
extern Bool kdHasPointer;
|
||||||
extern Bool kdHasKbd;
|
extern Bool kdHasKbd;
|
||||||
extern Bool ephyr_glamor, ephyr_glamor_gles2;
|
extern Bool ephyr_glamor, ephyr_glamor_gles2, ephyr_glamor_skip_present;
|
||||||
|
|
||||||
extern Bool ephyrNoXV;
|
extern Bool ephyrNoXV;
|
||||||
|
|
||||||
|
@ -148,6 +148,7 @@ ddxUseMsg(void)
|
||||||
#ifdef GLAMOR
|
#ifdef GLAMOR
|
||||||
ErrorF("-glamor Enable 2D acceleration using glamor\n");
|
ErrorF("-glamor Enable 2D acceleration using glamor\n");
|
||||||
ErrorF("-glamor_gles2 Enable 2D acceleration using glamor (with GLES2 only)\n");
|
ErrorF("-glamor_gles2 Enable 2D acceleration using glamor (with GLES2 only)\n");
|
||||||
|
ErrorF("-glamor-skip-present Skip presenting the output when using glamor (for internal testing optimization)\n");
|
||||||
#endif
|
#endif
|
||||||
ErrorF
|
ErrorF
|
||||||
("-fakexa Simulate acceleration using software rendering\n");
|
("-fakexa Simulate acceleration using software rendering\n");
|
||||||
|
@ -288,6 +289,10 @@ ddxProcessArgument(int argc, char **argv, int i)
|
||||||
ephyrFuncs.finiAccel = ephyr_glamor_fini;
|
ephyrFuncs.finiAccel = ephyr_glamor_fini;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
else if (!strcmp (argv[i], "-glamor-skip-present")) {
|
||||||
|
ephyr_glamor_skip_present = TRUE;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
else if (!strcmp(argv[i], "-fakexa")) {
|
else if (!strcmp(argv[i], "-fakexa")) {
|
||||||
ephyrFuncs.initAccel = ephyrDrawInit;
|
ephyrFuncs.initAccel = ephyrDrawInit;
|
||||||
|
|
Loading…
Reference in New Issue