protocols: Don't update hdr metadata if image description is unchanged (#9776)
This commit is contained in:
parent
46b00a4a86
commit
86c279d7d0
3 changed files with 9 additions and 3 deletions
|
|
@ -331,11 +331,16 @@ const hdr_output_metadata& CColorManagementSurface::hdrMetadata() {
|
|||
}
|
||||
|
||||
void CColorManagementSurface::setHDRMetadata(const hdr_output_metadata& metadata) {
|
||||
m_hdrMetadata = metadata;
|
||||
m_needsNewMetadata = false;
|
||||
m_hdrMetadata = metadata;
|
||||
m_lastImageDescription = m_imageDescription;
|
||||
m_needsNewMetadata = false;
|
||||
}
|
||||
|
||||
bool CColorManagementSurface::needsHdrMetadataUpdate() {
|
||||
if (!m_needsNewMetadata)
|
||||
return false;
|
||||
if (m_imageDescription == m_lastImageDescription)
|
||||
m_needsNewMetadata = false;
|
||||
return m_needsNewMetadata;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue