mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 04:48:04 +02:00
rpi: Add support for SHM buffers in RGB565 format
This commit is contained in:
parent
1c1fc29cf1
commit
0368189bac
2 changed files with 5 additions and 0 deletions
|
|
@ -85,6 +85,7 @@ typedef enum
|
|||
/* these are not the right values: */
|
||||
VC_IMAGE_ARGB8888,
|
||||
VC_IMAGE_XRGB8888,
|
||||
VC_IMAGE_RGB565,
|
||||
} VC_IMAGE_TYPE_T;
|
||||
|
||||
/* from /opt/vc/include/interface/vmcs_host/vc_dispmanx_types.h */
|
||||
|
|
|
|||
|
|
@ -233,6 +233,8 @@ shm_buffer_get_vc_format(struct wl_shm_buffer *buffer)
|
|||
return VC_IMAGE_XRGB8888;
|
||||
case WL_SHM_FORMAT_ARGB8888:
|
||||
return VC_IMAGE_ARGB8888 | PREMULT_ALPHA_FLAG;
|
||||
case WL_SHM_FORMAT_RGB565:
|
||||
return VC_IMAGE_RGB565;
|
||||
default:
|
||||
/* invalid format */
|
||||
return VC_IMAGE_MIN;
|
||||
|
|
@ -1285,6 +1287,8 @@ rpi_renderer_create(struct weston_compositor *compositor,
|
|||
compositor->read_format = PIXMAN_a8r8g8b8;
|
||||
/* WESTON_CAP_ROTATION_ANY not supported */
|
||||
|
||||
wl_display_add_shm_format(compositor->wl_display, WL_SHM_FORMAT_RGB565);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue