libweston: change read_format to struct pixel_format_info
Everywhere we are standardising to drm_fourcc.h pixel format codes, and using struct pixel_format_info as a general handle that allows us to access the equivalent format in various APIs. In the name of standardisation, convert weston_compositor::read_format to pixel_format_info. Pixman formats are defined CPU-endian, while DRM formats are defined always little-endian. OpenGL has various definitions. Correctly mapping between these when the CPU is big-endian is an extra chore we can hopefully offload to pixel-formats.c. GL-renderer read_format is still defined based on Pixman format, because of the pecualiar way OpenGL defines a pixel format with GL_UNSIGNED_BYTE. That matches the same Pixman format on big-endian but not the same drm_fourcc. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
committed by
Marius Vlad
parent
03c229f4ce
commit
b966fd07ea
@@ -81,6 +81,7 @@ struct weston_pointer_constraint;
|
||||
struct ro_anonymous_file;
|
||||
struct weston_color_profile;
|
||||
struct weston_color_transform;
|
||||
struct pixel_format_info;
|
||||
|
||||
enum weston_keyboard_modifier {
|
||||
MODIFIER_CTRL = (1 << 0),
|
||||
@@ -1252,7 +1253,7 @@ struct weston_compositor {
|
||||
|
||||
struct weston_color_manager *color_manager;
|
||||
struct weston_renderer *renderer;
|
||||
pixman_format_code_t read_format;
|
||||
const struct pixel_format_info *read_format;
|
||||
|
||||
struct weston_backend *backend;
|
||||
struct weston_launcher *launcher;
|
||||
|
||||
Reference in New Issue
Block a user