optimization: Render on pixmaps and copy the result on Stack_Wins

This should speed up the rendering of Stack_Wins with many window
decorations and it should considerably reduce flicker.
This commit is contained in:
Michael Stapelberg
2009-07-17 18:32:40 +02:00
parent 0434b6ea3d
commit 5b51c8c6f0
7 changed files with 80 additions and 7 deletions

View File

@ -71,6 +71,9 @@ xcb_atom_t atoms[NUM_ATOMS];
int num_screens = 0;
/* The depth of the root screen (used e.g. for creating new pixmaps later) */
uint8_t root_depth;
/*
* This callback is only a dummy, see xcb_prepare_cb and xcb_check_cb.
* See also man libev(3): "ev_prepare" and "ev_check" - customise your event loop
@ -261,7 +264,9 @@ int main(int argc, char *argv[], char *env[]) {
xcb_property_set_handler(&prophs, WM_NORMAL_HINTS, UINT_MAX, handle_normal_hints, NULL);
/* Get the root window and set the event mask */
root = xcb_aux_get_screen(conn, screens)->root;
xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screens);
root = root_screen->root;
root_depth = root_screen->root_depth;
uint32_t mask = XCB_CW_EVENT_MASK;
uint32_t values[] = { XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |