renderer: Do not set hdr metadata unless needed (#9014)

This commit is contained in:
UjinT34 2025-01-12 20:02:41 +03:00 committed by GitHub
parent b117fae3b4
commit a3a7499317
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 51 additions and 16 deletions

View file

@ -1,5 +1,6 @@
#pragma once
#include <drm_mode.h>
#include <memory>
#include <vector>
#include <cstdint>
@ -54,12 +55,18 @@ class CColorManagementSurface {
const SImageDescription& imageDescription();
bool hasImageDescription();
void setHasImageDescription(bool has);
const hdr_output_metadata& hdrMetadata();
void setHDRMetadata(const hdr_output_metadata& metadata);
bool needsHdrMetadataUpdate();
private:
SP<CXxColorManagementSurfaceV4> resource;
wl_client* pClient = nullptr;
SImageDescription m_imageDescription;
bool m_hasImageDescription = false;
bool m_needsNewMetadata = false;
hdr_output_metadata m_hdrMetadata;
friend class CFrogColorManagementSurface;
};