render/gles2: remove duplicated format list
Simon Ser authored 4 years ago
Drew DeVault committed 4 years ago
40 | 40 | }, |
41 | 41 | }; |
42 | 42 | |
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 | ||
50 | 43 | // TODO: more pixel formats |
51 | 44 | |
52 | 45 | const struct wlr_gles2_pixel_format *get_gles2_format_from_wl( |
72 | 65 | } |
73 | 66 | |
74 | 67 | 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 | } | |
76 | 73 | return wl_formats; |
77 | 74 | } |