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

@ -374,7 +374,7 @@ glx_bind_pixmap(backend_t *base, xcb_pixmap_t pixmap, struct xvisual_info fmt, b
}
log_debug("depth %d, rgba %d", fmt.visual_depth,
(fbcfg->texture_fmt = GLX_TEXTURE_FORMAT_RGBA_EXT));
(fbcfg->texture_fmt == GLX_TEXTURE_FORMAT_RGBA_EXT));
GLint attrs[] = {
GLX_TEXTURE_FORMAT_EXT,