mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-15 20:02:05 +00:00
[client] wayland: implement HDR support
This commit is contained in:
@@ -53,6 +53,14 @@ typedef enum LG_DSProperty
|
||||
* return data type: bool
|
||||
*/
|
||||
LG_DS_WARP_SUPPORT,
|
||||
|
||||
/**
|
||||
* returns true if the display server supports native HDR via
|
||||
* setHDRImageDescription (i.e., the compositor actually has the
|
||||
* required color-management features to process HDR content).
|
||||
* return data type: bool
|
||||
*/
|
||||
LG_DS_NATIVE_HDR,
|
||||
}
|
||||
LG_DSProperty;
|
||||
|
||||
@@ -213,6 +221,13 @@ struct LG_DisplayServerOps
|
||||
void (*setFullscreen)(bool fs);
|
||||
void (*minimize)(void);
|
||||
|
||||
/* HDR color management - set display image description.
|
||||
* Optional, if not supported set to NULL.
|
||||
* Returns true on success, false if the description could not be applied
|
||||
* (e.g., compositor doesn't support the required transfer function or
|
||||
* primaries, or the image description creation failed). */
|
||||
bool (*setHDRImageDescription)(const void * rendererFormat);
|
||||
|
||||
/* clipboard support, optional, if not supported set to NULL */
|
||||
bool (*cbInit)(void);
|
||||
void (*cbNotice)(LG_ClipboardData type);
|
||||
|
||||
@@ -84,6 +84,14 @@ typedef struct LG_RendererFormat
|
||||
unsigned int pitch; // scanline bytes (or compressed size)
|
||||
unsigned int bpp; // bits per pixel (zero if compressed)
|
||||
LG_RendererRotate rotate; // guest rotation
|
||||
|
||||
// HDR static metadata (from KVMFRFrame, valid when hdr is true)
|
||||
uint16_t hdrDisplayPrimary[3][2];
|
||||
uint16_t hdrWhitePoint[2];
|
||||
uint32_t hdrMaxDisplayLuminance;
|
||||
uint32_t hdrMinDisplayLuminance;
|
||||
uint32_t hdrMaxContentLightLevel;
|
||||
uint32_t hdrMaxFrameAverageLightLevel;
|
||||
}
|
||||
LG_RendererFormat;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user