Codebase list wlroots / a71649d
render/gles2: remove duplicated format list Simon Ser authored 4 years ago Drew DeVault committed 4 years ago
1 changed file(s) with 5 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
4040 },
4141 };
4242
43 static const enum wl_shm_format wl_formats[] = {
44 WL_SHM_FORMAT_ARGB8888,
45 WL_SHM_FORMAT_XRGB8888,
46 WL_SHM_FORMAT_ABGR8888,
47 WL_SHM_FORMAT_XBGR8888,
48 };
49
5043 // TODO: more pixel formats
5144
5245 const struct wlr_gles2_pixel_format *get_gles2_format_from_wl(
7265 }
7366
7467 const enum wl_shm_format *get_gles2_wl_formats(size_t *len) {
75 *len = sizeof(wl_formats) / sizeof(wl_formats[0]);
68 static enum wl_shm_format wl_formats[sizeof(formats) / sizeof(formats[0])];
69 *len = sizeof(formats) / sizeof(formats[0]);
70 for (size_t i = 0; i < sizeof(formats) / sizeof(formats[0]); i++) {
71 wl_formats[i] = formats[i].wl_format;
72 }
7673 return wl_formats;
7774 }