diff options
author | Søren Sandmann <ssp@localhost.localdomain> | 2010-11-07 04:08:15 -0500 |
---|---|---|
committer | Søren Sandmann <ssp@localhost.localdomain> | 2010-11-07 04:08:15 -0500 |
commit | f9b4f5a03d8db0f1768dd495afbd5a4259c94543 (patch) | |
tree | 61171999d41a3f4710cb6b8ba866fadf8b6727cc | |
parent | 28598545042ea1c10074993c4b249adbf8acce73 (diff) |
uxa: In change_window_attributes() only read back if the backing pixmap changed
This speeds up log in time considerably.
-rw-r--r-- | src/uxa/uxa.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/uxa/uxa.c b/src/uxa/uxa.c index 141c497..7d6efe1 100644 --- a/src/uxa/uxa.c +++ b/src/uxa/uxa.c @@ -335,11 +335,16 @@ void uxa_finish_access_window(WindowPtr pWin) static Bool uxa_change_window_attributes(WindowPtr pWin, unsigned long mask) { Bool ret; + Bool need_access = !!(mask & (CWBackPixmap | CWBorderPixmap)); - if (!uxa_prepare_access_window(pWin)) + if (need_access) + { + if (!uxa_prepare_access_window(pWin)) return FALSE; + } ret = fbChangeWindowAttributes(pWin, mask); - uxa_finish_access_window(pWin); + if (need_access) + uxa_finish_access_window(pWin); return ret; } |