fbdev_window.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * This confidential and proprietary software may be used only as
  3. * authorised by a licensing agreement from ARM Limited
  4. * (C) COPYRIGHT 2008-2013 ARM Limited
  5. * ALL RIGHTS RESERVED
  6. * The entire notice above must be reproduced on all authorised
  7. * copies and copies may only be made to the extent permitted
  8. * by a licensing agreement from ARM Limited.
  9. */
  10. /**
  11. * @file fbdev_window.h
  12. * @brief A window type for the framebuffer device (used by egl and tests)
  13. */
  14. #ifndef _FBDEV_WINDOW_H_
  15. #define _FBDEV_WINDOW_H_
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. typedef enum
  20. {
  21. FBDEV_PIXMAP_DEFAULT = 0,
  22. FBDEV_PIXMAP_SUPPORTS_UMP = (1 << 0),
  23. FBDEV_PIXMAP_ALPHA_FORMAT_PRE = (1 << 1),
  24. FBDEV_PIXMAP_COLORSPACE_sRGB = (1 << 2),
  25. FBDEV_PIXMAP_EGL_MEMORY = (1 << 3), /* EGL allocates/frees this memory */
  26. FBDEV_PIXMAP_DMA_BUF = (1 << 4),
  27. } fbdev_pixmap_flags;
  28. typedef struct fbdev_window
  29. {
  30. unsigned short width;
  31. unsigned short height;
  32. } fbdev_window;
  33. typedef struct fbdev_pixmap
  34. {
  35. unsigned int height;
  36. unsigned int width;
  37. unsigned int bytes_per_pixel;
  38. unsigned char buffer_size;
  39. unsigned char red_size;
  40. unsigned char green_size;
  41. unsigned char blue_size;
  42. unsigned char alpha_size;
  43. unsigned char luminance_size;
  44. fbdev_pixmap_flags flags;
  45. unsigned short *data;
  46. unsigned int format; /* extra format information in case rgbal is not enough, especially for YUV formats */
  47. } fbdev_pixmap;
  48. #if MALI_USE_DMA_BUF
  49. struct fbdev_dma_buf
  50. {
  51. int fd;
  52. int size;
  53. void *ptr;
  54. };
  55. #endif
  56. #ifdef __cplusplus
  57. }
  58. #endif
  59. #endif