win: update window's image lazily

Use a flag to mark whether the image needs update, and only update once
per frame.

Also refactor some common code into functions, and handle image errors
properly.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-03-16 20:14:54 +00:00
parent b0820d847c
commit 8dc250a415
5 changed files with 106 additions and 89 deletions

View File

@ -118,13 +118,6 @@
// Window flags
// Window size is changed
#define WFLAG_SIZE_CHANGE 0x0001
// Window size/position is changed
#define WFLAG_POS_CHANGE 0x0002
// Window opacity / dim state changed
#define WFLAG_OPCT_CHANGE 0x0004
// === Types ===
typedef struct glx_fbconfig glx_fbconfig_t;