wayland: render SDR gamma22 outputs as piece-wise sRGB [chromium/src : main]

1 view
Skip to first unread message

Xaver Hugl (Gerrit)

unread,
Aug 4, 2026, 2:56:03 PM (9 days ago) Aug 4
to Dianda Lin, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Dianda Lin

Xaver Hugl added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Xaver Hugl . unresolved

This doesn't seem right.

It doesn't matter which transfer function is used on the output (meaning both the Wayland surface and the physical display), sRGB needs to be displayed as gamma 2.2.

With this change, if you use gamma22 as the transfer function, the result would look different than if you used PQ, even though the same picture is shown. That wouldn't even be restricted to sRGB, it would affect all content.

Open in Gerrit

Related details

Attention is currently required from:
  • Dianda Lin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib3011fa3292650daa5bf52b78ed8259875d1a734
Gerrit-Change-Number: 8193094
Gerrit-PatchSet: 1
Gerrit-Owner: Dianda Lin <ted.l...@gmail.com>
Gerrit-CC: Xaver Hugl <xaver...@gmail.com>
Gerrit-Attention: Dianda Lin <ted.l...@gmail.com>
Gerrit-Comment-Date: Tue, 04 Aug 2026 18:55:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Dianda Lin (Gerrit)

unread,
Aug 5, 2026, 2:09:56 AM (8 days ago) Aug 5
to Xaver Hugl, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Xaver Hugl

Dianda Lin added 1 comment

Patchset-level comments
Xaver Hugl . unresolved

This doesn't seem right.

It doesn't matter which transfer function is used on the output (meaning both the Wayland surface and the physical display), sRGB needs to be displayed as gamma 2.2.

With this change, if you use gamma22 as the transfer function, the result would look different than if you used PQ, even though the same picture is shown. That wouldn't even be restricted to sRGB, it would affect all content.

Dianda Lin
Thanks — you're right, and I'll abandon this change.

To confirm I've followed: the transfer function chosen for a Wayland surface or physical output must not change the rendered appearance, because the compositor converts between those encodings. My change made the result depend on the preferred description. Since that description also feeds Chromium's render and blending configuration on this path, the effect would not be limited to sRGB content.

Before trying again, could you clarify the intended source model? Should ordinary SDR web content have a gamma-2.2 reference-display interpretation regardless of the compositor's preferred surface encoding? If so, two possible models seem invariant:

- Keep Chromium's usual sRGB-encoded SDR buffer, describe it as gamma22, and let the compositor convert it to gamma22, piecewise srgb, gamma28, or PQ.

- Render directly into the preferred encoding, but transform from that same gamma-2.2 reference interpretation.

Is either model intended, or have I still misunderstood the protocol semantics?
Open in Gerrit

Related details

Attention is currently required from:
  • Xaver Hugl
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib3011fa3292650daa5bf52b78ed8259875d1a734
Gerrit-Change-Number: 8193094
Gerrit-PatchSet: 1
Gerrit-Owner: Dianda Lin <ted.l...@gmail.com>
Gerrit-CC: Xaver Hugl <xaver...@gmail.com>
Gerrit-Attention: Xaver Hugl <xaver...@gmail.com>
Gerrit-Comment-Date: Wed, 05 Aug 2026 06:09:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Xaver Hugl <xaver...@gmail.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Xaver Hugl (Gerrit)

unread,
Aug 6, 2026, 5:19:58 AM (7 days ago) Aug 6
to Dianda Lin, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Dianda Lin

Xaver Hugl added 1 comment

Patchset-level comments
Xaver Hugl . unresolved

This doesn't seem right.

It doesn't matter which transfer function is used on the output (meaning both the Wayland surface and the physical display), sRGB needs to be displayed as gamma 2.2.

With this change, if you use gamma22 as the transfer function, the result would look different than if you used PQ, even though the same picture is shown. That wouldn't even be restricted to sRGB, it would affect all content.

Dianda Lin
Thanks — you're right, and I'll abandon this change.

To confirm I've followed: the transfer function chosen for a Wayland surface or physical output must not change the rendered appearance, because the compositor converts between those encodings. My change made the result depend on the preferred description. Since that description also feeds Chromium's render and blending configuration on this path, the effect would not be limited to sRGB content.

Before trying again, could you clarify the intended source model? Should ordinary SDR web content have a gamma-2.2 reference-display interpretation regardless of the compositor's preferred surface encoding? If so, two possible models seem invariant:

- Keep Chromium's usual sRGB-encoded SDR buffer, describe it as gamma22, and let the compositor convert it to gamma22, piecewise srgb, gamma28, or PQ.

- Render directly into the preferred encoding, but transform from that same gamma-2.2 reference interpretation.

Is either model intended, or have I still misunderstood the protocol semantics?
Xaver Hugl

Keep Chromium's usual sRGB-encoded SDR buffer

That would break every non-sRGB content it attempts to show.

Render directly into the preferred encoding, but transform from that same gamma-2.2 reference interpretation.

Yes, sRGB needs to be interpreted as gamma 2.2 during rendering.

Open in Gerrit

Related details

Attention is currently required from:
  • Dianda Lin
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib3011fa3292650daa5bf52b78ed8259875d1a734
Gerrit-Change-Number: 8193094
Gerrit-PatchSet: 1
Gerrit-Owner: Dianda Lin <ted.l...@gmail.com>
Gerrit-CC: Xaver Hugl <xaver...@gmail.com>
Gerrit-Attention: Dianda Lin <ted.l...@gmail.com>
Gerrit-Comment-Date: Thu, 06 Aug 2026 09:19:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Xaver Hugl <xaver...@gmail.com>
Comment-In-Reply-To: Dianda Lin <ted.l...@gmail.com>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages