mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
render: unify getter for texture formats
Instead of having separate getters for shm formats and DMA-BUF formats, use the same pattern as wlr_output_impl.get_primary_formats with a single function which takes buffer caps as input.
This commit is contained in:
parent
c63275d75e
commit
85c1eda721
12 changed files with 78 additions and 67 deletions
|
|
@ -44,6 +44,8 @@ struct wlr_gles2_renderer {
|
|||
struct wlr_egl *egl;
|
||||
int drm_fd;
|
||||
|
||||
struct wlr_drm_format_set shm_texture_formats;
|
||||
|
||||
const char *exts_str;
|
||||
struct {
|
||||
bool EXT_read_format_bgra;
|
||||
|
|
@ -143,8 +145,8 @@ bool is_gles2_pixel_format_supported(const struct wlr_gles2_renderer *renderer,
|
|||
const struct wlr_gles2_pixel_format *get_gles2_format_from_drm(uint32_t fmt);
|
||||
const struct wlr_gles2_pixel_format *get_gles2_format_from_gl(
|
||||
GLint gl_format, GLint gl_type, bool alpha);
|
||||
const uint32_t *get_gles2_shm_formats(const struct wlr_gles2_renderer *renderer,
|
||||
size_t *len);
|
||||
void get_gles2_shm_formats(const struct wlr_gles2_renderer *renderer,
|
||||
struct wlr_drm_format_set *out);
|
||||
|
||||
GLuint gles2_buffer_get_fbo(struct wlr_gles2_buffer *buffer);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue