Skip to content

[FR] A solution to better image rendering and HDR display output without GTK migration #20477

@Auxx

Description

@Auxx

Is your feature request related to a problem? Please describe.
One thing I heard why HDR display is impossible at the moment is due to GTK3 being used. But there is a simple solution which doesn't require migration and is adopted by other applications like Lightroom and Resolve. That will also improve rendering accuracy in general.

Describe the solution you'd like
The solution is to use native rendering surfaces for each OS instead of GTK/Cairo. This is how it works in Adobe and Black Magic software.

As far as I understood the code (haven't written any C/C++ in over a decade, so I'm very rusty, sorry), the rendering canvas is already a stand alone component which uses Cairo. It can be replaced with an OS native surface (like DX11 for Windows, Metal or whatever for MacOS, etc) and render the image using all available tools, like 10 bit output, wide gamut support, HDR support, etc. This code will also be beneficial after GTK4 migration as I don't believe GTK4 supports any advanced colour management features from all OSes.

The workflow I see in my head is as follows:

  1. Detect image buffer requirements for current OS (8/10 bit, colour gamut, HDR support).
  2. Update renderer into buffer to use the expected data format.
  3. Replace Cairo surface with a native surface.
  4. Draw image buffer into native surface.

Cairo can still be used as a fallback for unsupported systems, like older Windows versions without ACM and HDR support or Linux distros running outdated stuff.

I can try and provide some assistance for Windows side of things, but since I haven't touched C/C++ in a long while I will definitely need some guidance navigating the code base. A good code example for Windows is dogegen (pattern generator for colour calibration).

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature: newnew features to addscope: UIuser interface and interactions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions