package wayland

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Pixel formats.

This describes the memory layout of an individual pixel.

All renderers should support argb8888 and xrgb8888 but any other formats are optional and may not be supported by the particular renderer in use.

The drm format codes match the macros defined in drm_fourcc.h, except argb8888 and xrgb8888. The formats actually supported by the compositor will be reported by the format event.

For all wl_shm formats and unless specified in another protocol extension, pre-multiplied alpha is used for pixel values.

type t =
  1. | Argb8888 : t
  2. | Xrgb8888 : t
  3. | C8 : t
  4. | Rgb332 : t
  5. | Bgr233 : t
  6. | Xrgb4444 : t
  7. | Xbgr4444 : t
  8. | Rgbx4444 : t
  9. | Bgrx4444 : t
  10. | Argb4444 : t
  11. | Abgr4444 : t
  12. | Rgba4444 : t
  13. | Bgra4444 : t
  14. | Xrgb1555 : t
  15. | Xbgr1555 : t
  16. | Rgbx5551 : t
  17. | Bgrx5551 : t
  18. | Argb1555 : t
  19. | Abgr1555 : t
  20. | Rgba5551 : t
  21. | Bgra5551 : t
  22. | Rgb565 : t
  23. | Bgr565 : t
  24. | Rgb888 : t
  25. | Bgr888 : t
  26. | Xbgr8888 : t
  27. | Rgbx8888 : t
  28. | Bgrx8888 : t
  29. | Abgr8888 : t
  30. | Rgba8888 : t
  31. | Bgra8888 : t
  32. | Xrgb2101010 : t
  33. | Xbgr2101010 : t
  34. | Rgbx1010102 : t
  35. | Bgrx1010102 : t
  36. | Argb2101010 : t
  37. | Abgr2101010 : t
  38. | Rgba1010102 : t
  39. | Bgra1010102 : t
  40. | Yuyv : t
  41. | Yvyu : t
  42. | Uyvy : t
  43. | Vyuy : t
  44. | Ayuv : t
  45. | Nv12 : t
  46. | Nv21 : t
  47. | Nv16 : t
  48. | Nv61 : t
  49. | Yuv410 : t
  50. | Yvu410 : t
  51. | Yuv411 : t
  52. | Yvu411 : t
  53. | Yuv420 : t
  54. | Yvu420 : t
  55. | Yuv422 : t
  56. | Yvu422 : t
  57. | Yuv444 : t
  58. | Yvu444 : t
  59. | R8 : t
  60. | R16 : t
  61. | Rg88 : t
  62. | Gr88 : t
  63. | Rg1616 : t
  64. | Gr1616 : t
  65. | Xrgb16161616f : t
  66. | Xbgr16161616f : t
  67. | Argb16161616f : t
  68. | Abgr16161616f : t
  69. | Xyuv8888 : t
  70. | Vuy888 : t
  71. | Vuy101010 : t
  72. | Y210 : t
  73. | Y212 : t
  74. | Y216 : t
  75. | Y410 : t
  76. | Y412 : t
  77. | Y416 : t
  78. | Xvyu2101010 : t
  79. | Xvyu12_16161616 : t
  80. | Xvyu16161616 : t
  81. | Y0l0 : t
  82. | X0l0 : t
  83. | Y0l2 : t
  84. | X0l2 : t
  85. | Yuv420_8bit : t
  86. | Yuv420_10bit : t
  87. | Xrgb8888_a8 : t
  88. | Xbgr8888_a8 : t
  89. | Rgbx8888_a8 : t
  90. | Bgrx8888_a8 : t
  91. | Rgb888_a8 : t
  92. | Bgr888_a8 : t
  93. | Rgb565_a8 : t
  94. | Bgr565_a8 : t
  95. | Nv24 : t
  96. | Nv42 : t
  97. | P210 : t
  98. | P010 : t
  99. | P012 : t
  100. | P016 : t
  101. | Axbxgxrx106106106106 : t
  102. | Nv15 : t
  103. | Q410 : t
  104. | Q401 : t
  105. | Xrgb16161616 : t
  106. | Xbgr16161616 : t
  107. | Argb16161616 : t
  108. | Abgr16161616 : t
val to_int32 : t -> int32
val of_int32 : int32 -> t