summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/wayland/protocols/color-management/REUSE.toml5
-rw-r--r--src/3rdparty/wayland/protocols/color-management/color-management-v1.xml (renamed from src/3rdparty/wayland/protocols/color-management/xx-color-management-v4.xml)638
-rw-r--r--src/3rdparty/wayland/protocols/color-management/qt_attribution.json8
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp2
-rw-r--r--src/corelib/time/qdatetime.cpp2
-rw-r--r--src/plugins/platforms/wayland/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/wayland/qwaylandcolormanagement.cpp115
-rw-r--r--src/plugins/platforms/wayland/qwaylandcolormanagement_p.h52
-rw-r--r--src/plugins/platforms/wayland/qwaylanddisplay.cpp12
-rw-r--r--src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp4
-rw-r--r--src/plugins/platforms/wayland/qwaylandwindow.cpp10
-rw-r--r--src/plugins/platforms/wayland/qwaylandwindow_p.h4
-rw-r--r--src/widgets/styles/qfusionstyle.cpp4
-rw-r--r--src/widgets/styles/qstylesheetstyle_default.cpp2
14 files changed, 531 insertions, 329 deletions
diff --git a/src/3rdparty/wayland/protocols/color-management/REUSE.toml b/src/3rdparty/wayland/protocols/color-management/REUSE.toml
index c7b978663b1..a2803d886f5 100644
--- a/src/3rdparty/wayland/protocols/color-management/REUSE.toml
+++ b/src/3rdparty/wayland/protocols/color-management/REUSE.toml
@@ -1,11 +1,12 @@
version = 1
[[annotations]]
-path = "xx-color-management-v4.xml"
+path = "color-management-v1.xml"
precedence = "closest"
SPDX-FileCopyrightText = ["Copyright 2019 Sebastian Wick",
"Copyright 2019 Erwin Burema",
"Copyright 2020 AMD",
"Copyright 2020-2024 Collabora, Ltd.",
- "Copyright 2024 Xaver Hugl"]
+ "Copyright 2024 Xaver Hugl",
+ "Copyright 2022-2025 Red Hat, Inc."]
SPDX-License-Identifier = "MIT"
diff --git a/src/3rdparty/wayland/protocols/color-management/xx-color-management-v4.xml b/src/3rdparty/wayland/protocols/color-management/color-management-v1.xml
index eab84dfd992..4c1bc759c39 100644
--- a/src/3rdparty/wayland/protocols/color-management/xx-color-management-v4.xml
+++ b/src/3rdparty/wayland/protocols/color-management/color-management-v1.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<protocol name="xx_color_management_v4">
+<protocol name="color_management_v1">
<copyright>
Copyright 2019 Sebastian Wick
Copyright 2019 Erwin Burema
Copyright 2020 AMD
Copyright 2020-2024 Collabora, Ltd.
Copyright 2024 Xaver Hugl
+ Copyright 2022-2025 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -63,20 +64,27 @@
color encoding terminology where possible. The glossary in the color-and-hdr
repository shall be the authority on the definition of terms in this
protocol.
+
+ Warning! The protocol described in this file is currently in the testing
+ phase. Backward compatible changes may be added together with the
+ corresponding interface version bump. Backward incompatible changes can
+ only be done by creating a new major version of the extension.
</description>
- <interface name="xx_color_manager_v4" version="1">
+ <interface name="wp_color_manager_v1" version="1">
<description summary="color manager singleton">
- A global interface used for getting color management extensions for
- wl_surface and wl_output objects, and for creating client defined image
- description objects. The extension interfaces allow
+ A singleton global interface used for getting color management extensions
+ for wl_surface and wl_output objects, and for creating client defined
+ image description objects. The extension interfaces allow
getting the image description of outputs and setting the image
description of surfaces.
+
+ Compositors should never remove this global.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the color manager">
- Destroy the xx_color_manager_v4 object. This does not affect any other
+ Destroy the wp_color_manager_v1 object. This does not affect any other
objects in any way.
</description>
</request>
@@ -116,9 +124,9 @@
<description summary="compositor supported features"/>
<entry name="icc_v2_v4" value="0"
- summary="new_icc_creator request"/>
+ summary="create_icc_creator request"/>
<entry name="parametric" value="1"
- summary="new_parametric_creator request"/>
+ summary="create_parametric_creator request"/>
<entry name="set_primaries" value="2"
summary="parametric set_primaries request"/>
<entry name="set_tf_power" value="3"
@@ -140,6 +148,8 @@
is supported as well.
</description>
</entry>
+ <entry name="windows_scrgb" value="7"
+ summary="create_windows_scrgb request"/>
</enum>
<enum name="primaries">
@@ -148,10 +158,12 @@
is the authority, when it comes to the exact values of primaries and
authoritative specifications, where an equivalent code point exists.
+ A value of 0 is invalid and will never be present in the list of enums.
+
Descriptions do list the specifications for convenience.
</description>
- <entry name="srgb" value="0">
+ <entry name="srgb" value="1">
<description summary="Color primaries for the sRGB color space as defined by the BT.709 standard">
Color primaries as defined by
- Rec. ITU-R BT.709-6
@@ -164,7 +176,7 @@
Equivalent to H.273 ColourPrimaries code point 1.
</description>
</entry>
- <entry name="pal_m" value="1">
+ <entry name="pal_m" value="2">
<description summary="Color primaries for PAL-M as defined by the BT.470 standard">
Color primaries as defined by
- Rec. ITU-R BT.470-6 System M (historical)
@@ -175,7 +187,7 @@
Equivalent to H.273 ColourPrimaries code point 4.
</description>
</entry>
- <entry name="pal" value="2">
+ <entry name="pal" value="3">
<description summary="Color primaries for PAL as defined by the BT.601 standard">
Color primaries as defined by
- Rec. ITU-R BT.470-6 System B, G (historical)
@@ -185,7 +197,7 @@
Equivalent to H.273 ColourPrimaries code point 5.
</description>
</entry>
- <entry name="ntsc" value="3">
+ <entry name="ntsc" value="4">
<description summary="Color primaries for NTSC as defined by the BT.601 standard">
Color primaries as defined by
- Rec. ITU-R BT.601-7 525
@@ -196,13 +208,13 @@
Equivalent to H.273 ColourPrimaries code point 6 and 7.
</description>
</entry>
- <entry name="generic_film" value="4">
+ <entry name="generic_film" value="5">
<description summary="Generic film with colour filters using Illuminant C">
Color primaries as defined by H.273 for generic film.
Equivalent to H.273 ColourPrimaries code point 8.
</description>
</entry>
- <entry name="bt2020" value="5">
+ <entry name="bt2020" value="6">
<description summary="Color primaries as defined by the BT.2020 and BT.2100 standard">
Color primaries as defined by
- Rec. ITU-R BT.2020-2
@@ -210,7 +222,7 @@
Equivalent to H.273 ColourPrimaries code point 9.
</description>
</entry>
- <entry name="cie1931_xyz" value="6">
+ <entry name="cie1931_xyz" value="7">
<description summary="Color primaries of the full CIE 1931 XYZ color space">
Color primaries as defined as the maximum of the CIE 1931 XYZ color
space by
@@ -219,21 +231,21 @@
Equivalent to H.273 ColourPrimaries code point 10.
</description>
</entry>
- <entry name="dci_p3" value="7">
+ <entry name="dci_p3" value="8">
<description summary="Color primaries of the DCI P3 color space as defined by the SMPTE RP 431 standard">
Color primaries as defined by Digital Cinema System and published in
SMPTE RP 431-2 (2011). Equivalent to H.273 ColourPrimaries code point
11.
</description>
</entry>
- <entry name="display_p3" value="8">
+ <entry name="display_p3" value="9">
<description summary="Color primaries of Display P3 variant of the DCI-P3 color space as defined by the SMPTE EG 432 standard">
Color primaries as defined by Digital Cinema System and published in
SMPTE EG 432-1 (2010).
Equivalent to H.273 ColourPrimaries code point 12.
</description>
</entry>
- <entry name="adobe_rgb" value="9">
+ <entry name="adobe_rgb" value="10">
<description summary="Color primaries of the Adobe RGB color space as defined by the ISO 12640 standard">
Color primaries as defined by Adobe as "Adobe RGB" and later published
by ISO 12640-4 (2011).
@@ -243,23 +255,32 @@
<enum name="transfer_function">
<description summary="named transfer functions">
- Named transfer functions used to encode well-known transfer
+ Named transfer functions used to represent well-known transfer
characteristics. H.273 is the authority, when it comes to the exact
formulas and authoritative specifications, where an equivalent code
point exists.
+ A value of 0 is invalid and will never be present in the list of enums.
+
Descriptions do list the specifications for convenience.
</description>
- <entry name="bt709" value="0">
- <description summary="BT.709 transfer function">
- Transfer characteristics as defined by
+ <entry name="bt1886" value="1">
+ <description summary="BT.1886 display transfer characteristic">
+ Rec. ITU-R BT.1886 is the display transfer characteristic assumed by
+ - Rec. ITU-R BT.601-7 525 and 625
- Rec. ITU-R BT.709-6
- - Rec. ITU-R BT.1361-0 conventional colour gamut system (historical)
- Equivalent to H.273 TransferCharacteristics code point 1, 6, 14, 15.
+ - Rec. ITU-R BT.2020-2
+ These recommendations are referred to by H.273 TransferCharacteristics
+ code points 1, 6, 14, and 15, which are all equivalent.
+
+ This TF implies these default luminances from Rec. ITU-R BT.2035:
+ - primary color volume minimum: 0.01 cd/m²
+ - primary color volume maximum: 100 cd/m²
+ - reference white: 100 cd/m²
</description>
</entry>
- <entry name="gamma22" value="1">
+ <entry name="gamma22" value="2">
<description summary="Assumed display gamma 2.2 transfer function">
Transfer characteristics as defined by
- Rec. ITU-R BT.470-6 System M (historical)
@@ -269,60 +290,62 @@
of Federal Regulations 73.682 (a) (20)
- Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
Equivalent to H.273 TransferCharacteristics code point 4.
+
+ Note: an sRGB display (IEC 61966-2-1) uses this transfer function.
</description>
</entry>
- <entry name="gamma28" value="2">
+ <entry name="gamma28" value="3">
<description summary="Assumed display gamma 2.8 transfer function">
Transfer characteristics as defined by
- Rec. ITU-R BT.470-6 System B, G (historical)
Equivalent to H.273 TransferCharacteristics code point 5.
</description>
</entry>
- <entry name="st240" value="3">
+ <entry name="st240" value="4">
<description summary="SMPTE ST 240 transfer function">
Transfer characteristics as defined by
- SMPTE ST 240 (1999)
Equivalent to H.273 TransferCharacteristics code point 7.
</description>
</entry>
- <entry name="linear" value="4">
- <description summary="linear transfer function">
- Linear transfer characteristics.
- Equivalent to H.273 TransferCharacteristics code point 8.
+ <entry name="ext_linear" value="5">
+ <description summary="extended linear transfer function">
+ Linear transfer function defined over all real numbers.
+ Normalised electrical values are equal the normalised optical values.
+
+ The differences to H.273 TransferCharacteristics code point 8 are
+ the definition over all real numbers.
</description>
</entry>
- <entry name="log_100" value="5">
+ <entry name="log_100" value="6">
<description summary="logarithmic 100:1 transfer function">
Logarithmic transfer characteristic (100:1 range).
Equivalent to H.273 TransferCharacteristics code point 9.
</description>
</entry>
- <entry name="log_316" value="6">
+ <entry name="log_316" value="7">
<description summary="logarithmic (100*Sqrt(10) : 1) transfer function">
Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range).
Equivalent to H.273 TransferCharacteristics code point 10.
</description>
</entry>
- <entry name="xvycc" value="7">
+ <entry name="xvycc" value="8">
<description summary="IEC 61966-2-4 transfer function">
Transfer characteristics as defined by
- IEC 61966-2-4
Equivalent to H.273 TransferCharacteristics code point 11.
</description>
</entry>
- <entry name="bt1361" value="8">
- <description summary="BT.1361 extended transfer function">
- Transfer characteristics as defined by
- - Rec. ITU-R BT.1361-0 extended colour gamut system (historical)
- Equivalent to H.273 TransferCharacteristics code point 12.
- </description>
- </entry>
<entry name="srgb" value="9">
<description summary="sRGB piece-wise transfer function">
Transfer characteristics as defined by
- IEC 61966-2-1 sRGB
Equivalent to H.273 TransferCharacteristics code point 13 with
MatrixCoefficients set to 0.
+
+ Note: This is not appropriate for describing sRGB material.
+ sRGB material is intended to be viewed on an sRGB display, and
+ that is described by gamma22.
</description>
</entry>
<entry name="ext_srgb" value="10">
@@ -344,6 +367,12 @@
- primary color volume minimum: 0.005 cd/m²
- primary color volume maximum: 10000 cd/m²
- reference white: 203 cd/m²
+
+ The difference between the primary color volume minimum and maximum
+ must be approximately 10000 cd/m² as that is the swing of the EOTF
+ defined by ST 2084 and BT.2100. The default value for the
+ reference white is a protocol addition: it is suggested by
+ Report ITU-R BT.2408-7 and is not part of ST 2084 or BT.2100.
</description>
</entry>
<entry name="st428" value="12">
@@ -364,87 +393,146 @@
- primary color volume minimum: 0.005 cd/m²
- primary color volume maximum: 1000 cd/m²
- reference white: 203 cd/m²
- Note: HLG is a scene referred signal. All absolute luminance values
- used here for HLG assume a 1000 cd/m² display.
+
+ HLG is a relative display-referred signal with a specified
+ non-linear mapping to the display peak luminance (the HLG OOTF).
+ All absolute luminance values used here for HLG assume a 1000 cd/m²
+ peak display.
+
+ The default value for the reference white is a protocol addition:
+ it is suggested by Report ITU-R BT.2408-7 and is not part of
+ ARIB STD-B67 or BT.2100.
</description>
</entry>
</enum>
<request name="get_output">
<description summary="create a color management interface for a wl_output">
- This creates a new xx_color_management_output_v4 object for the
+ This creates a new wp_color_management_output_v1 object for the
given wl_output.
- See the xx_color_management_output_v4 interface for more details.
+ See the wp_color_management_output_v1 interface for more details.
</description>
- <arg name="id" type="new_id" interface="xx_color_management_output_v4"/>
+ <arg name="id" type="new_id" interface="wp_color_management_output_v1"/>
<arg name="output" type="object" interface="wl_output"/>
</request>
<request name="get_surface">
<description summary="create a color management interface for a wl_surface">
- If a xx_color_management_surface_v4 object already exists for the given
+ If a wp_color_management_surface_v1 object already exists for the given
wl_surface, the protocol error surface_exists is raised.
- This creates a new color xx_color_management_surface_v4 object for the
+ This creates a new color wp_color_management_surface_v1 object for the
given wl_surface.
- See the xx_color_management_surface_v4 interface for more details.
+ See the wp_color_management_surface_v1 interface for more details.
</description>
- <arg name="id" type="new_id" interface="xx_color_management_surface_v4"/>
+ <arg name="id" type="new_id" interface="wp_color_management_surface_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
- <request name="get_feedback_surface">
+ <request name="get_surface_feedback">
<description summary="create a color management feedback interface">
- This creates a new color xx_color_management_feedback_surface_v4 object
+ This creates a new color wp_color_management_surface_feedback_v1 object
for the given wl_surface.
- See the xx_color_management_feedback_surface_v4 interface for more
+ See the wp_color_management_surface_feedback_v1 interface for more
details.
</description>
<arg name="id" type="new_id"
- interface="xx_color_management_feedback_surface_v4"/>
+ interface="wp_color_management_surface_feedback_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
- <request name="new_icc_creator">
+ <request name="create_icc_creator">
<description summary="make a new ICC-based image description creator object">
Makes a new ICC-based image description creator object with all
properties initially unset. The client can then use the object's
interface to define all the required properties for an image description
- and finally create a xx_image_description_v4 object.
+ and finally create a wp_image_description_v1 object.
This request can be used when the compositor advertises
- xx_color_manager_v4.feature.icc_v2_v4.
+ wp_color_manager_v1.feature.icc_v2_v4.
Otherwise this request raises the protocol error unsupported_feature.
</description>
<arg name="obj"
- type="new_id" interface="xx_image_description_creator_icc_v4"
+ type="new_id" interface="wp_image_description_creator_icc_v1"
summary="the new creator object"/>
</request>
- <request name="new_parametric_creator">
+ <request name="create_parametric_creator">
<description summary="make a new parametric image description creator object">
Makes a new parametric image description creator object with all
properties initially unset. The client can then use the object's
interface to define all the required properties for an image description
- and finally create a xx_image_description_v4 object.
+ and finally create a wp_image_description_v1 object.
This request can be used when the compositor advertises
- xx_color_manager_v4.feature.parametric.
+ wp_color_manager_v1.feature.parametric.
Otherwise this request raises the protocol error unsupported_feature.
</description>
<arg name="obj"
- type="new_id" interface="xx_image_description_creator_params_v4"
+ type="new_id" interface="wp_image_description_creator_params_v1"
summary="the new creator object"/>
</request>
+ <request name="create_windows_scrgb">
+ <description summary="create Windows-scRGB image description object">
+ This creates a pre-defined image description for the so-called
+ Windows-scRGB stimulus encoding. This comes from the Windows 10 handling
+ of its own definition of an scRGB color space for an HDR screen
+ driven in BT.2100/PQ signalling mode.
+
+ Windows-scRGB uses sRGB (BT.709) color primaries and white point.
+ The transfer characteristic is extended linear.
+
+ The nominal color channel value range is extended, meaning it includes
+ negative and greater than 1.0 values. Negative values are used to
+ escape the sRGB color gamut boundaries. To make use of the extended
+ range, the client needs to use a pixel format that can represent those
+ values, e.g. floating-point 16 bits per channel.
+
+ Nominal color value R=G=B=0.0 corresponds to BT.2100/PQ system
+ 0 cd/m², and R=G=B=1.0 corresponds to BT.2100/PQ system 80 cd/m².
+ The maximum is R=G=B=125.0 corresponding to 10k cd/m².
+
+ Windows-scRGB is displayed by Windows 10 by converting it to
+ BT.2100/PQ, maintaining the CIE 1931 chromaticity and mapping the
+ luminance as above. No adjustment is made to the signal to account
+ for the viewing conditions.
+
+ The reference white level of Windows-scRGB is unknown. If a
+ reference white level must be assumed for compositor processing, it
+ should be R=G=B=2.5375 corresponding to 203 cd/m² of Report ITU-R
+ BT.2408-7.
+
+ The target color volume of Windows-scRGB is unknown. The color gamut
+ may be anything between sRGB and BT.2100.
+
+ Note: EGL_EXT_gl_colorspace_scrgb_linear definition differs from
+ Windows-scRGB by using R=G=B=1.0 as the reference white level, while
+ Windows-scRGB reference white level is unknown or varies. However,
+ it seems probable that Windows implements both
+ EGL_EXT_gl_colorspace_scrgb_linear and Vulkan
+ VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT as Windows-scRGB.
+
+ This request can be used when the compositor advertises
+ wp_color_manager_v1.feature.windows_scrgb.
+ Otherwise this request raises the protocol error unsupported_feature.
+
+ The resulting image description object does not allow get_information
+ request. The wp_image_description_v1.ready event shall be sent.
+ </description>
+
+ <arg name="image_description"
+ type="new_id" interface="wp_image_description_v1"/>
+ </request>
+
<event name="supported_intent">
<description summary="supported rendering intent">
When this object is created, it shall immediately send this event once
@@ -486,22 +574,29 @@
<arg name="primaries" type="uint" enum="primaries"
summary="Named color primaries"/>
</event>
+
+ <event name="done">
+ <description summary="all features have been sent">
+ This event is sent when all supported rendering intents, features,
+ transfer functions and named primaries have been sent.
+ </description>
+ </event>
</interface>
- <interface name="xx_color_management_output_v4" version="1">
+ <interface name="wp_color_management_output_v1" version="1">
<description summary="output color properties">
- A xx_color_management_output_v4 describes the color properties of an
+ A wp_color_management_output_v1 describes the color properties of an
output.
- The xx_color_management_output_v4 is associated with the wl_output global
+ The wp_color_management_output_v1 is associated with the wl_output global
underlying the wl_output object. Therefore the client destroying the
wl_output object has no impact, but the compositor removing the output
- global makes the xx_color_management_output_v4 object inert.
+ global makes the wp_color_management_output_v1 object inert.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the color management output">
- Destroy the color xx_color_management_output_v4 object. This does not
+ Destroy the color wp_color_management_output_v1 object. This does not
affect any remaining protocol objects.
</description>
</request>
@@ -520,12 +615,12 @@
<request name="get_image_description">
<description summary="get the image description of the output">
- This creates a new xx_image_description_v4 object for the current image
+ This creates a new wp_image_description_v1 object for the current image
description of the output. There always is exactly one image description
active for an output so the client should destroy the image description
created by earlier invocations of this request. This request is usually
sent as a reaction to the image_description_changed event or when
- creating a xx_color_management_output_v4 object.
+ creating a wp_color_management_output_v1 object.
The image description of an output represents the color encoding the
output expects. There might be performance and power advantages, as well
@@ -535,41 +630,41 @@
of, then the color reproduction on those outputs might be considerably
worse.
- The created xx_image_description_v4 object preserves the image
+ The created wp_image_description_v1 object preserves the image
description of the output from the time the object was created.
The resulting image description object allows get_information request.
If this protocol object is inert, the resulting image description object
- shall immediately deliver the xx_image_description_v4.failed event with
+ shall immediately deliver the wp_image_description_v1.failed event with
the no_output cause.
If the interface version is inadequate for the output's image
description, meaning that the client does not support all the events
needed to deliver the crucial information, the resulting image
description object shall immediately deliver the
- xx_image_description_v4.failed event with the low_version cause.
+ wp_image_description_v1.failed event with the low_version cause.
Otherwise the object shall immediately deliver the ready event.
</description>
<arg name="image_description"
- type="new_id" interface="xx_image_description_v4"/>
+ type="new_id" interface="wp_image_description_v1"/>
</request>
</interface>
- <interface name="xx_color_management_surface_v4" version="1">
+ <interface name="wp_color_management_surface_v1" version="1">
<description summary="color management extension to a surface">
- A xx_color_management_surface_v4 allows the client to set the color
+ A wp_color_management_surface_v1 allows the client to set the color
space and HDR properties of a surface.
- If the wl_surface associated with the xx_color_management_surface_v4 is
- destroyed, the xx_color_management_surface_v4 object becomes inert.
+ If the wl_surface associated with the wp_color_management_surface_v1 is
+ destroyed, the wp_color_management_surface_v1 object becomes inert.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the color management interface for a surface">
- Destroy the xx_color_management_surface_v4 object and do the same as
+ Destroy the wp_color_management_surface_v1 object and do the same as
unset_image_description.
</description>
</request>
@@ -580,10 +675,14 @@
summary="unsupported rendering intent"/>
<entry name="image_description" value="1"
summary="invalid image description"/>
+ <entry name="inert" value="2"
+ summary="forbidden request on inert object"/>
</enum>
<request name="set_image_description">
<description summary="set the surface image description">
+ If this protocol object is inert, the protocol error inert is raised.
+
Set the image description of the underlying surface. The image
description and rendering intent are double-buffered state, see
wl_surface.commit.
@@ -593,36 +692,47 @@
description. Compositors might convert images to match their own or any
other image descriptions.
- Image description whose creation gracefully failed (received
- xx_image_description_v4.failed) are forbidden in this request, and in
- such case the protocol error image_description is raised.
+ Image descriptions which are not ready (see wp_image_description_v1)
+ are forbidden in this request, and in such case the protocol error
+ image_description is raised.
- All image descriptions whose creation succeeded (received
- xx_image_description_v4.ready) are allowed and must always be accepted
- by the compositor.
+ All image descriptions which are ready (see wp_image_description_v1)
+ are allowed and must always be accepted by the compositor.
A rendering intent provides the client's preference on how content
colors should be mapped to each output. The render_intent value must
be one advertised by the compositor with
- xx_color_manager_v4.render_intent event, otherwise the protocol error
+ wp_color_manager_v1.render_intent event, otherwise the protocol error
render_intent is raised.
+ When an image description is set on a surface, the Transfer
+ Characteristics of the image description defines the valid range of
+ the nominal (real-valued) color channel values. The processing of
+ out-of-range color channel values is undefined, but compositors are
+ recommended to clamp the values to the valid range when possible.
+
By default, a surface does not have an associated image description
nor a rendering intent. The handling of color on such surfaces is
compositor implementation defined. Compositors should handle such
- surfaces as sRGB but may handle them differently if they have specific
+ surfaces as sRGB, but may handle them differently if they have specific
requirements.
+
+ Setting the image description has copy semantics; after this request,
+ the image description can be immediately destroyed without affecting
+ the pending state of the surface.
</description>
<arg name="image_description"
- type="object" interface="xx_image_description_v4"/>
+ type="object" interface="wp_image_description_v1"/>
<arg name="render_intent"
- type="uint" enum="xx_color_manager_v4.render_intent"
+ type="uint" enum="wp_color_manager_v1.render_intent"
summary="rendering intent"/>
</request>
<request name="unset_image_description">
<description summary="remove the surface image description">
+ If this protocol object is inert, the protocol error inert is raised.
+
This request removes any image description from the surface. See
set_image_description for how a compositor handles a surface without
an image description. This is double-buffered state, see
@@ -631,18 +741,18 @@
</request>
</interface>
- <interface name="xx_color_management_feedback_surface_v4" version="1">
+ <interface name="wp_color_management_surface_feedback_v1" version="1">
<description summary="color management extension to a surface">
- A xx_color_management_feedback_surface_v4 allows the client to get the
- preferred color description of a surface.
+ A wp_color_management_surface_feedback_v1 allows the client to get the
+ preferred image description of a surface.
If the wl_surface associated with this object is destroyed, the
- xx_color_management_feedback_surface_v4 object becomes inert.
+ wp_color_management_surface_feedback_v1 object becomes inert.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the color management interface for a surface">
- Destroy the xx_color_management_feedback_surface_v4 object.
+ Destroy the wp_color_management_surface_feedback_v1 object.
</description>
</request>
@@ -650,6 +760,8 @@
<description summary="protocol errors"/>
<entry name="inert" value="0"
summary="forbidden request on inert object"/>
+ <entry name="unsupported_feature" value="1"
+ summary="attempted to use an unsupported feature"/>
</enum>
<event name="preferred_changed">
@@ -659,17 +771,20 @@
client for its wl_surface contents. This event is sent whenever the
compositor changes the wl_surface's preferred image description.
- This event is merely a notification. When the client wants to know
- what the preferred image description is, it shall use the get_preferred
- request.
+ This event sends the identity of the new preferred state as the argument,
+ so clients who are aware of the image description already can reuse it.
+ Otherwise, if the client client wants to know what the preferred image
+ description is, it shall use the get_preferred request.
The preferred image description is not automatically used for anything.
It is only a hint, and clients may set any valid image description with
- set_image_description but there might be performance and color accuracy
+ set_image_description, but there might be performance and color accuracy
improvements by providing the wl_surface contents in the preferred
image description. Therefore clients that can, should render according
to the preferred image description
</description>
+
+ <arg name="identity" type="uint" summary="image description id number"/>
</event>
<request name="get_preferred">
@@ -682,36 +797,56 @@
reproduction, if the image description of a content update matches the
preferred image description.
- This creates a new xx_image_description_v4 object for the currently
+ This creates a new wp_image_description_v1 object for the currently
preferred image description for the wl_surface. The client should
stop using and destroy the image descriptions created by earlier
invocations of this request for the associated wl_surface.
This request is usually sent as a reaction to the preferred_changed
- event or when creating a xx_color_management_feedback_surface_v4 object
+ event or when creating a wp_color_management_surface_feedback_v1 object
if the client is capable of adapting to image descriptions.
- The created xx_image_description_v4 object preserves the preferred image
+ The created wp_image_description_v1 object preserves the preferred image
description of the wl_surface from the time the object was created.
The resulting image description object allows get_information request.
+ If the image description is parametric, the client should set it on its
+ wl_surface only if the image description is an exact match with the
+ client content. Particularly if everything else matches, but the target
+ color volume is greater than what the client needs, the client should
+ create its own parameric image description with its exact parameters.
+
If the interface version is inadequate for the preferred image
description, meaning that the client does not support all the
events needed to deliver the crucial information, the resulting image
description object shall immediately deliver the
- xx_image_description_v4.failed event with the low_version cause,
+ wp_image_description_v1.failed event with the low_version cause,
otherwise the object shall immediately deliver the ready event.
</description>
<arg name="image_description"
- type="new_id" interface="xx_image_description_v4"/>
+ type="new_id" interface="wp_image_description_v1"/>
+ </request>
+
+ <request name="get_preferred_parametric">
+ <description summary="get the preferred image description">
+ The same description as for get_preferred applies, except the returned
+ image description is guaranteed to be parametric. This is meant for
+ clients that can only deal with parametric image descriptions.
+
+ If the compositor doesn't support parametric image descriptions, the
+ unsupported_feature error is emitted.
+ </description>
+
+ <arg name="image_description"
+ type="new_id" interface="wp_image_description_v1"/>
</request>
</interface>
- <interface name="xx_image_description_creator_icc_v4" version="1">
+ <interface name="wp_image_description_creator_icc_v1" version="1">
<description summary="holder of image description ICC information">
This type of object is used for collecting all the information required
- to create a xx_image_description_v4 object from an ICC file. A complete
+ to create a wp_image_description_v1 object from an ICC file. A complete
set of required parameters consists of these properties:
- ICC file
@@ -753,19 +888,19 @@
If the particular combination of the information is not supported
by the compositor, the resulting image description object shall
- immediately deliver the xx_image_description_v4.failed event with the
+ immediately deliver the wp_image_description_v1.failed event with the
'unsupported' cause. If a valid image description was created from the
- information, the xx_image_description_v4.ready event will eventually
+ information, the wp_image_description_v1.ready event will eventually
be sent instead.
- This request destroys the xx_image_description_creator_icc_v4 object.
+ This request destroys the wp_image_description_creator_icc_v1 object.
The resulting image description object does not allow get_information
request.
</description>
<arg name="image_description"
- type="new_id" interface="xx_image_description_v4"/>
+ type="new_id" interface="wp_image_description_v1"/>
</request>
<request name="set_icc_file">
@@ -774,23 +909,23 @@
description.
The data shall be found through the given fd at the given offset, having
- the given length. The fd must seekable and readable. Violating these
+ the given length. The fd must be seekable and readable. Violating these
requirements raises the bad_fd protocol error.
If reading the data fails due to an error independent of the client, the
- compositor shall send the xx_image_description_v4.failed event on the
- created xx_image_description_v4 with the 'operating_system' cause.
+ compositor shall send the wp_image_description_v1.failed event on the
+ created wp_image_description_v1 with the 'operating_system' cause.
- The maximum size of the ICC profile is 4 MB. If length is greater than
+ The maximum size of the ICC profile is 32 MB. If length is greater than
that or zero, the protocol error bad_size is raised. If offset + length
exceeds the file size, the protocol error out_of_file is raised.
A compositor may read the file at any time starting from this request
and only until whichever happens first:
- - If create request was issued, the xx_image_description_v4 object
+ - If create request was issued, the wp_image_description_v1 object
delivers either failed or ready event; or
- if create request was not issued, this
- xx_image_description_creator_icc_v4 object is destroyed.
+ wp_image_description_creator_icc_v1 object is destroyed.
A compositor shall not modify the contents of the file, and the fd may
be sealed for writes and size changes. The client must ensure to its
@@ -800,9 +935,9 @@
The data must represent a valid ICC profile. The ICC profile version
must be 2 or 4, it must be a 3 channel profile and the class must be
Display or ColorSpace. Violating these requirements will not result in a
- protocol error but will eventually send the
- xx_image_description_v4.failed event on the created
- xx_image_description_v4 with the 'unsupported' cause.
+ protocol error, but will eventually send the
+ wp_image_description_v1.failed event on the created
+ wp_image_description_v1 with the 'unsupported' cause.
See the International Color Consortium specification ICC.1:2022 for more
details about ICC profiles.
@@ -820,10 +955,10 @@
</request>
</interface>
- <interface name="xx_image_description_creator_params_v4" version="1">
+ <interface name="wp_image_description_creator_params_v1" version="1">
<description summary="holder of image description parameters">
This type of object is used for collecting all the parameters required
- to create a xx_image_description_v4 object. A complete set of required
+ to create a wp_image_description_v1 object. A complete set of required
parameters consists of these properties:
- transfer characteristic function (tf)
- chromaticities of primaries and white point (primary color volume)
@@ -834,6 +969,9 @@
- reference white luminance level
- mastering display primaries and white point (target color volume)
- mastering luminance range
+
+ The following properties are optional and will be ignored
+ if not explicitly set:
- maximum content light level
- maximum frame-average light level
@@ -853,20 +991,16 @@
<entry name="incomplete_set" value="0"
summary="incomplete parameter set"/>
- <entry name="inconsistent_set" value="1"
- summary="invalid combination of parameters"/>
- <entry name="already_set" value="2"
+ <entry name="already_set" value="1"
summary="property already set"/>
- <entry name="unsupported_feature" value="3"
+ <entry name="unsupported_feature" value="2"
summary="request not supported"/>
- <entry name="invalid_tf" value="4"
+ <entry name="invalid_tf" value="3"
summary="invalid transfer characteristic"/>
- <entry name="invalid_primaries" value="5"
- summary="invalid primaries or white point"/>
- <entry name="invalid_luminance" value="6"
+ <entry name="invalid_primaries_named" value="4"
+ summary="invalid primaries named"/>
+ <entry name="invalid_luminance" value="5"
summary="invalid luminance value or range"/>
- <entry name="invalid_mastering" value="7"
- summary="invalid mastering information"/>
</enum>
<request name="create" type="destructor">
@@ -878,17 +1012,23 @@
complete, the protocol error incomplete_set is raised. For the
definition of a complete set, see the description of this interface.
- Also, the combination of the parameter set is verified. If the set is
- not consistent, the protocol error inconsistent_set is raised.
+ The protocol error invalid_luminance is raised if any of the following
+ requirements is not met:
+ - When max_cll is set, it must be greater than min L and less or equal
+ to max L of the mastering luminance range.
+ - When max_fall is set, it must be greater than min L and less or equal
+ to max L of the mastering luminance range.
+ - When both max_cll and max_fall are set, max_fall must be less or equal
+ to max_cll.
If the particular combination of the parameter set is not supported
by the compositor, the resulting image description object shall
- immediately deliver the xx_image_description_v4.failed event with the
+ immediately deliver the wp_image_description_v1.failed event with the
'unsupported' cause. If a valid image description was created from the
- parameter set, the xx_image_description_v4.ready event will eventually
+ parameter set, the wp_image_description_v1.ready event will eventually
be sent instead.
- This request destroys the xx_image_description_creator_params_v4
+ This request destroys the wp_image_description_creator_params_v1
object.
The resulting image description object does not allow get_information
@@ -896,7 +1036,7 @@
</description>
<arg name="image_description"
- type="new_id" interface="xx_image_description_v4"/>
+ type="new_id" interface="wp_image_description_v1"/>
</request>
<request name="set_tf_named">
@@ -908,22 +1048,24 @@
content should be encoded and decoded according to the industry standard
practices for the transfer characteristic.
- Only names advertised with xx_color_manager_v4 event supported_tf_named
+ Only names advertised with wp_color_manager_v1 event supported_tf_named
are allowed. Other values shall raise the protocol error invalid_tf.
If transfer characteristic has already been set on this object, the
protocol error already_set is raised.
</description>
- <arg name="tf" type="uint" enum="xx_color_manager_v4.transfer_function"
+ <arg name="tf" type="uint" enum="wp_color_manager_v1.transfer_function"
summary="named transfer function"/>
</request>
<request name="set_tf_power">
<description summary="transfer characteristic as a power curve">
Sets the color component transfer characteristic to a power curve with
- the given exponent. This curve represents the conversion from electrical
- to optical pixel or color values.
+ the given exponent. Negative values are handled by mirroring the
+ positive half of the curve through the origin. The valid domain and
+ range of the curve are all finite real numbers. This curve represents
+ the conversion from electrical to optical color channel values.
When the resulting image description is attached to an image, the
content should be encoded with the inverse of the power curve.
@@ -938,7 +1080,7 @@
protocol error already_set is raised.
This request can be used when the compositor advertises
- xx_color_manager_v4.feature.set_tf_power. Otherwise this request raises
+ wp_color_manager_v1.feature.set_tf_power. Otherwise this request raises
the protocol error unsupported_feature.
</description>
@@ -951,15 +1093,15 @@
This describes the primary color volume which is the basis for color
value encoding.
- Only names advertised with xx_color_manager_v4 event
+ Only names advertised with wp_color_manager_v1 event
supported_primaries_named are allowed. Other values shall raise the
- protocol error invalid_primaries.
+ protocol error invalid_primaries_named.
If primaries have already been set on this object, the protocol error
already_set is raised.
</description>
- <arg name="primaries" type="uint" enum="xx_color_manager_v4.primaries"
+ <arg name="primaries" type="uint" enum="wp_color_manager_v1.primaries"
summary="named primaries"/>
</request>
@@ -969,33 +1111,36 @@
coordinates. This describes the primary color volume which is the basis
for color value encoding.
- Each coordinate value is multiplied by 10000 to get the argument value
- to carry precision of 4 decimals.
+ Each coordinate value is multiplied by 1 million to get the argument
+ value to carry precision of 6 decimals.
If primaries have already been set on this object, the protocol error
already_set is raised.
This request can be used if the compositor advertises
- xx_color_manager_v4.feature.set_primaries. Otherwise this request raises
+ wp_color_manager_v1.feature.set_primaries. Otherwise this request raises
the protocol error unsupported_feature.
</description>
- <arg name="r_x" type="int" summary="Red x * 10000"/>
- <arg name="r_y" type="int" summary="Red y * 10000"/>
- <arg name="g_x" type="int" summary="Green x * 10000"/>
- <arg name="g_y" type="int" summary="Green y * 10000"/>
- <arg name="b_x" type="int" summary="Blue x * 10000"/>
- <arg name="b_y" type="int" summary="Blue y * 10000"/>
- <arg name="w_x" type="int" summary="White x * 10000"/>
- <arg name="w_y" type="int" summary="White y * 10000"/>
+ <arg name="r_x" type="int" summary="Red x * 1M"/>
+ <arg name="r_y" type="int" summary="Red y * 1M"/>
+ <arg name="g_x" type="int" summary="Green x * 1M"/>
+ <arg name="g_y" type="int" summary="Green y * 1M"/>
+ <arg name="b_x" type="int" summary="Blue x * 1M"/>
+ <arg name="b_y" type="int" summary="Blue y * 1M"/>
+ <arg name="w_x" type="int" summary="White x * 1M"/>
+ <arg name="w_y" type="int" summary="White y * 1M"/>
</request>
<request name="set_luminances">
<description summary="primary color volume luminance range and reference white">
Sets the primary color volume luminance range and the reference white
- luminance level.
+ luminance level. These values include the minimum display emission
+ and ambient flare luminances, assumed to be optically additive and have
+ the chromaticity of the primary color volume white point.
- The default luminances are
+ The default luminances from
+ https://www.color.org/chardata/rgb/srgb.xalter are
- primary color volume minimum: 0.2 cd/m²
- primary color volume maximum: 80 cd/m²
- reference white: 80 cd/m²
@@ -1004,6 +1149,8 @@
luminances.
The default luminances get overwritten when this request is used.
+ With transfer_function.st2084_pq the given 'max_lum' value is ignored,
+ and 'max_lum' is taken as 'min_lum' + 10000 cd/m².
'min_lum' and 'max_lum' specify the minimum and maximum luminances of
the primary color volume as reproduced by the targeted display.
@@ -1018,9 +1165,12 @@
description should produce the same output level, even though the
'reference_lum' on both image representations can be different.
- If 'max_lum' is less than the 'reference_lum', or 'reference_lum' is
- less than or equal to 'min_lum', the protocol error invalid_luminance is
- raised.
+ 'reference_lum' may be higher than 'max_lum'. In that case reaching
+ the reference white output level in image content requires the
+ 'extended_target_volume' feature support.
+
+ If 'max_lum' or 'reference_lum' are less than or equal to 'min_lum',
+ the protocol error invalid_luminance is raised.
The minimum luminance is multiplied by 10000 to get the argument
'min_lum' value and carries precision of 4 decimals. The maximum
@@ -1031,7 +1181,7 @@
already_set is raised.
This request can be used if the compositor advertises
- xx_color_manager_v4.feature.set_luminances. Otherwise this request
+ wp_color_manager_v1.feature.set_luminances. Otherwise this request
raises the protocol error unsupported_feature.
</description>
@@ -1049,10 +1199,11 @@
using CIE 1931 xy chromaticity coordinates. This is compatible with the
SMPTE ST 2086 definition of HDR static metadata.
- The mastering display primaries define the target color volume.
+ The mastering display primaries and mastering display luminances define
+ the target color volume.
If mastering display primaries are not explicitly set, the target color
- volume is assumed to be equal to the primary color volume.
+ volume is assumed to have the same primaries as the primary color volume.
The target color volume is defined by all tristimulus values between 0.0
and 1.0 (inclusive) of the color space defined by the given mastering
@@ -1071,50 +1222,72 @@
has to be chosen (e.g. floating point to exceed the primary color
volume, or abusing limited quantization range as with xvYCC).
- Each coordinate value is multiplied by 10000 to get the argument value
- to carry precision of 4 decimals.
+ Each coordinate value is multiplied by 1 million to get the argument
+ value to carry precision of 6 decimals.
If mastering display primaries have already been set on this object, the
protocol error already_set is raised.
This request can be used if the compositor advertises
- xx_color_manager_v4.feature.set_mastering_display_primaries. Otherwise
+ wp_color_manager_v1.feature.set_mastering_display_primaries. Otherwise
this request raises the protocol error unsupported_feature. The
advertisement implies support only for target color volumes fully
contained within the primary color volume.
If a compositor additionally supports target color volume exceeding the
primary color volume, it must advertise
- xx_color_manager_v4.feature.extended_target_volume. If a client uses
+ wp_color_manager_v1.feature.extended_target_volume. If a client uses
target color volume exceeding the primary color volume and the
compositor does not support it, the result is implementation defined.
Compositors are recommended to detect this case and fail the image
description gracefully, but it may as well result in color artifacts.
</description>
- <arg name="r_x" type="int" summary="Red x * 10000"/>
- <arg name="r_y" type="int" summary="Red y * 10000"/>
- <arg name="g_x" type="int" summary="Green x * 10000"/>
- <arg name="g_y" type="int" summary="Green y * 10000"/>
- <arg name="b_x" type="int" summary="Blue x * 10000"/>
- <arg name="b_y" type="int" summary="Blue y * 10000"/>
- <arg name="w_x" type="int" summary="White x * 10000"/>
- <arg name="w_y" type="int" summary="White y * 10000"/>
+ <arg name="r_x" type="int" summary="Red x * 1M"/>
+ <arg name="r_y" type="int" summary="Red y * 1M"/>
+ <arg name="g_x" type="int" summary="Green x * 1M"/>
+ <arg name="g_y" type="int" summary="Green y * 1M"/>
+ <arg name="b_x" type="int" summary="Blue x * 1M"/>
+ <arg name="b_y" type="int" summary="Blue y * 1M"/>
+ <arg name="w_x" type="int" summary="White x * 1M"/>
+ <arg name="w_y" type="int" summary="White y * 1M"/>
</request>
<request name="set_mastering_luminance">
<description summary="display mastering luminance range">
Sets the luminance range that was used during the content mastering
- process as the minimum and maximum absolute luminance L. This is
+ process as the minimum and maximum absolute luminance L. These values
+ include the minimum display emission and ambient flare luminances,
+ assumed to be optically additive and have the chromaticity of the
+ primary color volume white point. This should be
compatible with the SMPTE ST 2086 definition of HDR static metadata.
- The mastering luminance range is undefined by default.
+ The mastering display primaries and mastering display luminances define
+ the target color volume.
+
+ If mastering luminances are not explicitly set, the target color volume
+ is assumed to have the same min and max luminances as the primary color
+ volume.
If max L is less than or equal to min L, the protocol error
invalid_luminance is raised.
Min L value is multiplied by 10000 to get the argument min_lum value
and carry precision of 4 decimals. Max L value is unscaled for max_lum.
+
+ This request can be used if the compositor advertises
+ wp_color_manager_v1.feature.set_mastering_display_primaries. Otherwise
+ this request raises the protocol error unsupported_feature. The
+ advertisement implies support only for target color volumes fully
+ contained within the primary color volume.
+
+ If a compositor additionally supports target color volume exceeding the
+ primary color volume, it must advertise
+ wp_color_manager_v1.feature.extended_target_volume. If a client uses
+ target color volume exceeding the primary color volume and the
+ compositor does not support it, the result is implementation defined.
+ Compositors are recommended to detect this case and fail the image
+ description gracefully, but it may as well result in color artifacts.
</description>
<arg name="min_lum" type="uint" summary="min L (cd/m²) * 10000"/>
@@ -1125,11 +1298,6 @@
<description summary="maximum content light level">
Sets the maximum content light level (max_cll) as defined by CTA-861-H.
- This can only be set when set_tf_cicp is used to set the transfer
- characteristic to Rec. ITU-R BT.2100-2 perceptual quantization system.
- Otherwise, 'create' request shall raise inconsistent_set protocol
- error.
-
max_cll is undefined by default.
</description>
@@ -1141,10 +1309,6 @@
Sets the maximum frame-average light level (max_fall) as defined by
CTA-861-H.
- This can only be set when set_tf_cicp is used to set the transfer
- characteristic to Rec. ITU-R BT.2100-2 perceptual quantization system.
- Otherwise, 'create' request shall raise inconsistent_set protocol error.
-
max_fall is undefined by default.
</description>
@@ -1152,15 +1316,15 @@
</request>
</interface>
- <interface name="xx_image_description_v4" version="1">
+ <interface name="wp_image_description_v1" version="1">
<description summary="Colorimetric image description">
An image description carries information about the color encoding used on
a surface when attached to a wl_surface via
- xx_color_management_surface_v4.set_image_description. A compositor can use
+ wp_color_management_surface_v1.set_image_description. A compositor can use
this information to decode pixel values into colorimetrically meaningful
quantities.
- Note, that the xx_image_description_v4 object is not ready to be used
+ Note, that the wp_image_description_v1 object is not ready to be used
immediately after creation. The object eventually delivers either the
'ready' or the 'failed' event, specified in all requests creating it. The
object is deemed "ready" after receiving the 'ready' event.
@@ -1171,7 +1335,7 @@
interfaces shall raise protocol errors defined there.
Once created and regardless of how it was created, a
- xx_image_description_v4 object always refers to one fixed image
+ wp_image_description_v1 object always refers to one fixed image
description. It cannot change after creation.
</description>
@@ -1179,8 +1343,8 @@
<description summary="destroy the image description">
Destroy this object. It is safe to destroy an object which is not ready.
- Destroying a xx_image_description_v4 object has no side-effects, not
- even if a xx_color_management_surface_v4.set_image_description has not
+ Destroying a wp_image_description_v1 object has no side-effects, not
+ even if a wp_color_management_surface_v1.set_image_description has not
yet been followed by a wl_surface.commit.
</description>
</request>
@@ -1209,7 +1373,7 @@
<event name="failed">
<description summary="graceful error on creating the image description">
- If creating a xx_image_description_v4 object fails for a reason that is
+ If creating a wp_image_description_v1 object fails for a reason that is
not defined as a protocol error, this event is sent.
The requests that create image description objects define whether and
@@ -1217,7 +1381,7 @@
This event cannot be triggered after the image description was
successfully formed.
- Once this event has been sent, the xx_image_description_v4 object will
+ Once this event has been sent, the wp_image_description_v1 object will
never become ready and it can only be destroyed.
</description>
@@ -1229,11 +1393,11 @@
<event name="ready">
<description summary="indication that the object is ready to be used">
- Once this event has been sent, the xx_image_description_v4 object is
+ Once this event has been sent, the wp_image_description_v1 object is
deemed "ready". Ready objects can be used to send requests and can be
used through other interfaces.
- Every ready xx_image_description_v4 protocol object refers to an
+ Every ready wp_image_description_v1 protocol object refers to an
underlying image description record in the compositor. Multiple protocol
objects may end up referring to the same record. Clients may identify
these "copies" by comparing their id numbers: if the numbers from two
@@ -1250,7 +1414,8 @@
Image description id number is not a protocol object id. Zero is
reserved as an invalid id number. It shall not be possible for a client
to refer to an image description by its id number in protocol. The id
- numbers might not be portable between Wayland connections.
+ numbers might not be portable between Wayland connections. A compositor
+ shall not send an invalid id number.
This identity allows clients to de-duplicate image description records
and avoid get_information request if they already have the image
@@ -1262,7 +1427,7 @@
<request name="get_information">
<description summary="get information about the image description">
- Creates a xx_image_description_info_v4 object which delivers the
+ Creates a wp_image_description_info_v1 object which delivers the
information that makes up the image description.
Not all image description protocol objects allow get_information
@@ -1272,20 +1437,34 @@
</description>
<arg name="information"
- type="new_id" interface="xx_image_description_info_v4"/>
+ type="new_id" interface="wp_image_description_info_v1"/>
</request>
</interface>
- <interface name="xx_image_description_info_v4" version="1">
+ <interface name="wp_image_description_info_v1" version="1">
<description summary="Colorimetric image description information">
Sends all matching events describing an image description object exactly
once and finally sends the 'done' event.
- Once a xx_image_description_info_v4 object has delivered a 'done' event it
+ This means
+ - if the image description is parametric, it must send
+ - primaries
+ - named_primaries, if applicable
+ - at least one of tf_power and tf_named, as applicable
+ - luminances
+ - target_primaries
+ - target_luminance
+ - if the image description is parametric, it may send, if applicable,
+ - target_max_cll
+ - target_max_fall
+ - if the image description contains an ICC profile, it must send the
+ icc_file event
+
+ Once a wp_image_description_info_v1 object has delivered a 'done' event it
is automatically destroyed.
- Every xx_image_description_info_v4 created from the same
- xx_image_description_v4 shall always return the exact same data.
+ Every wp_image_description_info_v1 created from the same
+ wp_image_description_v1 shall always return the exact same data.
</description>
<event name="done" type="destructor">
@@ -1316,18 +1495,18 @@
Delivers the primary color volume primaries and white point using CIE
1931 xy chromaticity coordinates.
- Each coordinate value is multiplied by 10000 to get the argument value
- to carry precision of 4 decimals.
+ Each coordinate value is multiplied by 1 million to get the argument
+ value to carry precision of 6 decimals.
</description>
- <arg name="r_x" type="int" summary="Red x * 10000"/>
- <arg name="r_y" type="int" summary="Red y * 10000"/>
- <arg name="g_x" type="int" summary="Green x * 10000"/>
- <arg name="g_y" type="int" summary="Green y * 10000"/>
- <arg name="b_x" type="int" summary="Blue x * 10000"/>
- <arg name="b_y" type="int" summary="Blue y * 10000"/>
- <arg name="w_x" type="int" summary="White x * 10000"/>
- <arg name="w_y" type="int" summary="White y * 10000"/>
+ <arg name="r_x" type="int" summary="Red x * 1M"/>
+ <arg name="r_y" type="int" summary="Red y * 1M"/>
+ <arg name="g_x" type="int" summary="Green x * 1M"/>
+ <arg name="g_y" type="int" summary="Green y * 1M"/>
+ <arg name="b_x" type="int" summary="Blue x * 1M"/>
+ <arg name="b_y" type="int" summary="Blue y * 1M"/>
+ <arg name="w_x" type="int" summary="White x * 1M"/>
+ <arg name="w_y" type="int" summary="White y * 1M"/>
</event>
<event name="primaries_named">
@@ -1336,7 +1515,7 @@
explicitly enumerated named set.
</description>
- <arg name="primaries" type="uint" enum="xx_color_manager_v4.primaries"
+ <arg name="primaries" type="uint" enum="wp_color_manager_v1.primaries"
summary="named primaries"/>
</event>
@@ -1360,14 +1539,16 @@
named function.
</description>
- <arg name="tf" type="uint" enum="xx_color_manager_v4.transfer_function"
+ <arg name="tf" type="uint" enum="wp_color_manager_v1.transfer_function"
summary="named transfer function"/>
</event>
<event name="luminances">
<description summary="primary color volume luminance range and reference white">
Delivers the primary color volume luminance range and the reference
- white luminance level.
+ white luminance level. These values include the minimum display emission
+ and ambient flare luminances, assumed to be optically additive and have
+ the chromaticity of the primary color volume white point.
The minimum luminance is multiplied by 10000 to get the argument
'min_lum' value and carries precision of 4 decimals. The maximum
@@ -1393,25 +1574,28 @@
volume is equal to the primary color volume, then this event is not
sent.
- Each coordinate value is multiplied by 10000 to get the argument value
- to carry precision of 4 decimals.
+ Each coordinate value is multiplied by 1 million to get the argument
+ value to carry precision of 6 decimals.
</description>
- <arg name="r_x" type="int" summary="Red x * 10000"/>
- <arg name="r_y" type="int" summary="Red y * 10000"/>
- <arg name="g_x" type="int" summary="Green x * 10000"/>
- <arg name="g_y" type="int" summary="Green y * 10000"/>
- <arg name="b_x" type="int" summary="Blue x * 10000"/>
- <arg name="b_y" type="int" summary="Blue y * 10000"/>
- <arg name="w_x" type="int" summary="White x * 10000"/>
- <arg name="w_y" type="int" summary="White y * 10000"/>
+ <arg name="r_x" type="int" summary="Red x * 1M"/>
+ <arg name="r_y" type="int" summary="Red y * 1M"/>
+ <arg name="g_x" type="int" summary="Green x * 1M"/>
+ <arg name="g_y" type="int" summary="Green y * 1M"/>
+ <arg name="b_x" type="int" summary="Blue x * 1M"/>
+ <arg name="b_y" type="int" summary="Blue y * 1M"/>
+ <arg name="w_x" type="int" summary="White x * 1M"/>
+ <arg name="w_y" type="int" summary="White y * 1M"/>
</event>
<event name="target_luminance">
<description summary="target luminance range">
Provides the luminance range that the image description is targeting as
- the minimum and maximum absolute luminance L. This is compatible with
- the SMPTE ST 2086 definition of HDR static metadata.
+ the minimum and maximum absolute luminance L. These values include the
+ minimum display emission and ambient flare luminances, assumed to be
+ optically additive and have the chromaticity of the primary color
+ volume white point. This should be compatible with the SMPTE ST 2086
+ definition of HDR static metadata.
This luminance range is only theoretical and may not correspond to the
luminance of light emitted on an actual display.
diff --git a/src/3rdparty/wayland/protocols/color-management/qt_attribution.json b/src/3rdparty/wayland/protocols/color-management/qt_attribution.json
index 246e9df70fa..1001cc9b90d 100644
--- a/src/3rdparty/wayland/protocols/color-management/qt_attribution.json
+++ b/src/3rdparty/wayland/protocols/color-management/qt_attribution.json
@@ -4,15 +4,15 @@
"Name": "Wayland Color Management Protocol",
"QDocModule": "qtwaylandcompositor",
"QtUsage": "Used in the Qt Wayland platform plugin.",
- "Files": "xx-color-management-v4.xml",
+ "Files": "color-management-v1.xml",
"Description": "An extension to use different colorspaces from sRGB",
"Homepage": "https://wayland.freedesktop.org",
- "Version": "experimental v4",
- "DownloadLocation": "https://gitlab.freedesktop.org/swick/wayland-protocols/-/blob/708a8b4119d4072820158a115166598733d378f4/staging/color-management/xx-color-management-v4.xml",
+ "Version": "1",
+ "DownloadLocation": "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/raw/1.45/staging/color-management/color-management-v1.xml",
"LicenseId": "MIT",
"License": "MIT License",
"LicenseFile": "../MIT_LICENSE.txt",
- "Copyright": "Copyright 2019 Sebastian Wick\nCopyright 2019 Erwin Burema\nCopyright 2020 AMD\nCopyright 2020-2024 Collabora, Ltd.\nCopyright 2024 Xaver Hugl"
+ "Copyright": "Copyright 2019 Sebastian Wick\nCopyright 2019 Erwin Burema\nCopyright 2020 AMD\nCopyright 2020-2024 Collabora, Ltd.\nCopyright 2024 Xaver Hugl\nCopyright 2022-2025 Red Hat, Inc."
}
]
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index de7c4df6d1d..afc85fe36fb 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -2917,7 +2917,7 @@ void QCoreApplication::requestPermissionImpl(const QPermission &requestedPermiss
}
private:
- QtPrivate::SlotObjSharedPtr slotObject;
+ QtPrivate::SlotObjUniquePtr slotObject;
QPointer<const QObject> context;
};
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp
index 974c486b915..deac396061d 100644
--- a/src/corelib/time/qdatetime.cpp
+++ b/src/corelib/time/qdatetime.cpp
@@ -3991,7 +3991,7 @@ QDateTime::Data QDateTimePrivate::create(QDate toDate, QTime toTime, const QTime
\c{'compatible'} option corresponds to \c RelativeToBefore (and Python's
\c{fold = True}).
- \sa {Timezone transitions}, QDateTime::TransitionResolution
+ \sa {Timezone transitions}
*/
/*!
diff --git a/src/plugins/platforms/wayland/CMakeLists.txt b/src/plugins/platforms/wayland/CMakeLists.txt
index 0ce9a4b091c..d9415f0a011 100644
--- a/src/plugins/platforms/wayland/CMakeLists.txt
+++ b/src/plugins/platforms/wayland/CMakeLists.txt
@@ -157,7 +157,7 @@ qt6_generate_wayland_protocol_client_sources(WaylandClient
${CMAKE_CURRENT_SOURCE_DIR}/../../../3rdparty/wayland/extensions/qt-windowmanager.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../../3rdparty/wayland/extensions/hardware-integration.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../../3rdparty/wayland/extensions/server-buffer-extension.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/../../../3rdparty/wayland/protocols/color-management/xx-color-management-v4.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../3rdparty/wayland/protocols/color-management/color-management-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../../3rdparty/wayland/protocols/pointer-warp/pointer-warp-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../../../3rdparty/wayland/protocols/session-management/xx-session-management-v1.xml
)
diff --git a/src/plugins/platforms/wayland/qwaylandcolormanagement.cpp b/src/plugins/platforms/wayland/qwaylandcolormanagement.cpp
index 2114e59328b..2a0c8a4c854 100644
--- a/src/plugins/platforms/wayland/qwaylandcolormanagement.cpp
+++ b/src/plugins/platforms/wayland/qwaylandcolormanagement.cpp
@@ -13,7 +13,7 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
ColorManager::ColorManager(struct ::wl_registry *registry, uint32_t id, int version)
- : QtWayland::xx_color_manager_v4(registry, id, version)
+ : QtWayland::wp_color_manager_v1(registry, id, version)
{
}
@@ -22,7 +22,7 @@ ColorManager::~ColorManager()
destroy();
}
-void ColorManager::xx_color_manager_v4_supported_feature(uint32_t feature)
+void ColorManager::wp_color_manager_v1_supported_feature(uint32_t feature)
{
switch (feature) {
case feature_icc_v2_v4:
@@ -49,14 +49,14 @@ void ColorManager::xx_color_manager_v4_supported_feature(uint32_t feature)
}
}
-void ColorManager::xx_color_manager_v4_supported_primaries_named(uint32_t primaries)
+void ColorManager::wp_color_manager_v1_supported_primaries_named(uint32_t primaries)
{
- mPrimaries.push_back(QtWayland::xx_color_manager_v4::primaries(primaries));
+ mPrimaries.push_back(QtWayland::wp_color_manager_v1::primaries(primaries));
}
-void ColorManager::xx_color_manager_v4_supported_tf_named(uint32_t transferFunction)
+void ColorManager::wp_color_manager_v1_supported_tf_named(uint32_t transferFunction)
{
- mTransferFunctions.push_back(QtWayland::xx_color_manager_v4::transfer_function(transferFunction));
+ mTransferFunctions.push_back(QtWayland::wp_color_manager_v1::transfer_function(transferFunction));
}
ColorManager::Features ColorManager::supportedFeatures() const
@@ -64,12 +64,12 @@ ColorManager::Features ColorManager::supportedFeatures() const
return mFeatures;
}
-bool ColorManager::supportsNamedPrimary(QtWayland::xx_color_manager_v4::primaries primaries) const
+bool ColorManager::supportsNamedPrimary(QtWayland::wp_color_manager_v1::primaries primaries) const
{
return mPrimaries.contains(primaries);
}
-bool ColorManager::supportsTransferFunction(QtWayland::xx_color_manager_v4::transfer_function transferFunction) const
+bool ColorManager::supportsTransferFunction(QtWayland::wp_color_manager_v1::transfer_function transferFunction) const
{
return mTransferFunctions.contains(transferFunction);
}
@@ -92,8 +92,8 @@ std::unique_ptr<ImageDescription> ColorManager::createImageDescription(const QCo
return nullptr;
constexpr std::array tfMapping = {
- std::make_pair(QColorSpace::TransferFunction::Linear, transfer_function_linear),
- std::make_pair(QColorSpace::TransferFunction::SRgb, transfer_function_srgb),
+ std::make_pair(QColorSpace::TransferFunction::Linear, transfer_function_ext_linear),
+ std::make_pair(QColorSpace::TransferFunction::SRgb, transfer_function_gamma22),
std::make_pair(QColorSpace::TransferFunction::St2084, transfer_function_st2084_pq),
std::make_pair(QColorSpace::TransferFunction::Hlg, transfer_function_hlg),
};
@@ -106,99 +106,105 @@ std::unique_ptr<ImageDescription> ColorManager::createImageDescription(const QCo
transferFunction = transfer_function_gamma22;
else if (qFuzzyCompare(colorspace.gamma(), 2.8f) && supportsTransferFunction(transfer_function_gamma28))
transferFunction = transfer_function_gamma28;
- if (!transferFunction && !(mFeatures & Feature::PowerTransferFunction))
- return nullptr;
- } else if (!transferFunction) {
+ if (!transferFunction && !(mFeatures & Feature::PowerTransferFunction)) {
+ if (qFuzzyCompare(colorspace.gamma(), 563.0f / 256.0f) && supportsTransferFunction(transfer_function_gamma22)) {
+ // If power tf is not supported, we can use Adobe RGB gamma approximation
+ transferFunction = transfer_function_gamma22;
+ } else {
+ return nullptr;
+ }
+ }
+ } else if (!transferFunction || !supportsTransferFunction(*transferFunction)) {
return nullptr;
}
- auto creator = new_parametric_creator();
+ auto creator = create_parametric_creator();
if (primary != primaryMapping.end()) {
- xx_image_description_creator_params_v4_set_primaries_named(creator, primary->second);
+ wp_image_description_creator_params_v1_set_primaries_named(creator, primary->second);
} else {
const auto primaries = colorspace.primaryPoints();
- xx_image_description_creator_params_v4_set_primaries(creator,
- std::round(10'000 * primaries.redPoint.x()), std::round(10'000 * primaries.redPoint.y()),
- std::round(10'000 * primaries.greenPoint.x()), std::round(10'000 * primaries.greenPoint.y()),
- std::round(10'000 * primaries.bluePoint.x()), std::round(10'000 * primaries.bluePoint.y()),
- std::round(10'000 * primaries.whitePoint.x()), std::round(10'000 * primaries.whitePoint.y())
+ wp_image_description_creator_params_v1_set_primaries(creator,
+ std::round(1'000'000 * primaries.redPoint.x()), std::round(1'000'000 * primaries.redPoint.y()),
+ std::round(1'000'000 * primaries.greenPoint.x()), std::round(1'000'000 * primaries.greenPoint.y()),
+ std::round(1'000'000 * primaries.bluePoint.x()), std::round(1'000'000 * primaries.bluePoint.y()),
+ std::round(1'000'000 * primaries.whitePoint.x()), std::round(1'000'000 * primaries.whitePoint.y())
);
}
if (transferFunction) {
- xx_image_description_creator_params_v4_set_tf_named(creator, *transferFunction);
+ wp_image_description_creator_params_v1_set_tf_named(creator, *transferFunction);
} else {
Q_ASSERT(colorspace.transferFunction() == QColorSpace::TransferFunction::Gamma);
- xx_image_description_creator_params_v4_set_tf_power(creator, std::round(colorspace.gamma() * 10'000));
+ wp_image_description_creator_params_v1_set_tf_power(creator, std::round(colorspace.gamma() * 10'000));
}
- return std::make_unique<ImageDescription>(xx_image_description_creator_params_v4_create(creator));
+ return std::make_unique<ImageDescription>(wp_image_description_creator_params_v1_create(creator));
}
ImageDescriptionInfo::ImageDescriptionInfo(ImageDescription *descr)
- : QtWayland::xx_image_description_info_v4(descr->get_information())
+ : QtWayland::wp_image_description_info_v1(descr->get_information())
{
}
ImageDescriptionInfo::~ImageDescriptionInfo()
{
- xx_image_description_info_v4_destroy(object());
+ wp_image_description_info_v1_destroy(object());
}
-void ImageDescriptionInfo::xx_image_description_info_v4_done()
+void ImageDescriptionInfo::wp_image_description_info_v1_done()
{
Q_EMIT done();
}
-void ImageDescriptionInfo::xx_image_description_info_v4_icc_file(int32_t icc, uint32_t icc_size)
+void ImageDescriptionInfo::wp_image_description_info_v1_icc_file(int32_t icc, uint32_t icc_size)
{
Q_UNUSED(icc_size)
close(icc);
}
-void ImageDescriptionInfo::xx_image_description_info_v4_primaries(int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y)
+void ImageDescriptionInfo::wp_image_description_info_v1_primaries(int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y)
{
- mContainerRed = QPointF(r_x, r_y) / 10'000.0;
- mContainerGreen = QPointF(g_x, g_y) / 10'000.0;
- mContainerBlue = QPointF(b_x, b_y) / 10'000.0;
- mContainerWhite = QPointF(w_x, w_y) / 10'000.0;
+ mContainerRed = QPointF(r_x, r_y) / 1'000'000.0;
+ mContainerGreen = QPointF(g_x, g_y) / 1'000'000.0;
+ mContainerBlue = QPointF(b_x, b_y) / 1'000'000.0;
+ mContainerWhite = QPointF(w_x, w_y) / 1'000'000.0;
}
-void ImageDescriptionInfo::xx_image_description_info_v4_tf_named(uint32_t transferFunction)
+void ImageDescriptionInfo::wp_image_description_info_v1_tf_named(uint32_t transferFunction)
{
mTransferFunction = transferFunction;
}
-void ImageDescriptionInfo::xx_image_description_info_v4_luminances(uint32_t min_lum, uint32_t max_lum, uint32_t reference_lum)
+void ImageDescriptionInfo::wp_image_description_info_v1_luminances(uint32_t min_lum, uint32_t max_lum, uint32_t reference_lum)
{
mMinLuminance = min_lum / 10'000.0;
mMaxLuminance = max_lum;
mReferenceLuminance = reference_lum;
}
-void ImageDescriptionInfo::xx_image_description_info_v4_target_primaries(int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y)
+void ImageDescriptionInfo::wp_image_description_info_v1_target_primaries(int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y)
{
- mTargetRed = QPointF(r_x, r_y) / 10'000.0;
- mTargetGreen = QPointF(g_x, g_y) / 10'000.0;
- mTargetBlue = QPointF(b_x, b_y) / 10'000.0;
- mTargetWhite = QPointF(w_x, w_y) / 10'000.0;
+ mTargetRed = QPointF(r_x, r_y) / 1'000'000.0;
+ mTargetGreen = QPointF(g_x, g_y) / 1'000'000.0;
+ mTargetBlue = QPointF(b_x, b_y) / 1'000'000.0;
+ mTargetWhite = QPointF(w_x, w_y) / 1'000'000.0;
}
-void ImageDescriptionInfo::xx_image_description_info_v4_target_luminance(uint32_t min_lum, uint32_t max_lum)
+void ImageDescriptionInfo::wp_image_description_info_v1_target_luminance(uint32_t min_lum, uint32_t max_lum)
{
mTargetMinLuminance = min_lum / 10'000.0;
mTargetMaxLuminance = max_lum;
}
-ImageDescription::ImageDescription(::xx_image_description_v4 *descr)
- : QtWayland::xx_image_description_v4(descr)
+ImageDescription::ImageDescription(::wp_image_description_v1 *descr)
+ : QtWayland::wp_image_description_v1(descr)
{
}
ImageDescription::~ImageDescription()
{
- xx_image_description_v4_destroy(object());
+ wp_image_description_v1_destroy(object());
}
-void ImageDescription::xx_image_description_v4_failed(uint32_t cause, const QString &msg)
+void ImageDescription::wp_image_description_v1_failed(uint32_t cause, const QString &msg)
{
Q_UNUSED(cause);
qCWarning(lcQpaWayland) << "image description failed!" << msg;
@@ -206,25 +212,26 @@ void ImageDescription::xx_image_description_v4_failed(uint32_t cause, const QStr
// maybe fall back to the previous or preferred image description
}
-void ImageDescription::xx_image_description_v4_ready(uint32_t identity)
+void ImageDescription::wp_image_description_v1_ready(uint32_t identity)
{
Q_UNUSED(identity);
Q_EMIT ready();
}
-ColorManagementFeedback::ColorManagementFeedback(::xx_color_management_feedback_surface_v4 *obj)
- : QtWayland::xx_color_management_feedback_surface_v4(obj)
+ColorManagementFeedback::ColorManagementFeedback(::wp_color_management_surface_feedback_v1 *obj)
+ : QtWayland::wp_color_management_surface_feedback_v1(obj)
, mPreferred(std::make_unique<ImageDescription>(get_preferred()))
{
}
ColorManagementFeedback::~ColorManagementFeedback()
{
- xx_color_management_feedback_surface_v4_destroy(object());
+ wp_color_management_surface_feedback_v1_destroy(object());
}
-void ColorManagementFeedback::xx_color_management_feedback_surface_v4_preferred_changed()
+void ColorManagementFeedback::wp_color_management_surface_feedback_v1_preferred_changed(uint32_t identity)
{
+ Q_UNUSED(identity);
mPreferred = std::make_unique<ImageDescription>(get_preferred());
mPendingPreferredInfo = std::make_unique<ImageDescriptionInfo>(mPreferred.get());
connect(mPendingPreferredInfo.get(), &ImageDescriptionInfo::done, this, &ColorManagementFeedback::preferredChanged);
@@ -235,22 +242,22 @@ void ColorManagementFeedback::handlePreferredDone()
mPreferredInfo = std::move(mPendingPreferredInfo);
}
-ColorManagementSurface::ColorManagementSurface(::xx_color_management_surface_v4 *obj)
- : QtWayland::xx_color_management_surface_v4(obj)
+ColorManagementSurface::ColorManagementSurface(::wp_color_management_surface_v1 *obj)
+ : QtWayland::wp_color_management_surface_v1(obj)
{
}
ColorManagementSurface::~ColorManagementSurface()
{
- xx_color_management_surface_v4_destroy(object());
+ wp_color_management_surface_v1_destroy(object());
}
void ColorManagementSurface::setImageDescription(ImageDescription *descr)
{
if (descr)
- xx_color_management_surface_v4_set_image_description(object(), descr->object(), QtWayland::xx_color_manager_v4::render_intent::render_intent_perceptual);
+ wp_color_management_surface_v1_set_image_description(object(), descr->object(), QtWayland::wp_color_manager_v1::render_intent::render_intent_perceptual);
else
- xx_color_management_surface_v4_unset_image_description(object());
+ wp_color_management_surface_v1_unset_image_description(object());
}
}
diff --git a/src/plugins/platforms/wayland/qwaylandcolormanagement_p.h b/src/plugins/platforms/wayland/qwaylandcolormanagement_p.h
index 8e44bd66b7b..04c3962ff8d 100644
--- a/src/plugins/platforms/wayland/qwaylandcolormanagement_p.h
+++ b/src/plugins/platforms/wayland/qwaylandcolormanagement_p.h
@@ -20,7 +20,7 @@
#include <QColorSpace>
#include <QList>
-#include "qwayland-xx-color-management-v4.h"
+#include "qwayland-color-management-v1.h"
QT_BEGIN_NAMESPACE
@@ -28,7 +28,7 @@ namespace QtWaylandClient {
class ImageDescription;
-class ColorManager : public QObject, public QtWayland::xx_color_manager_v4
+class ColorManager : public QObject, public QtWayland::wp_color_manager_v1
{
Q_OBJECT
public:
@@ -48,22 +48,22 @@ public:
~ColorManager() override;
Features supportedFeatures() const;
- bool supportsNamedPrimary(QtWayland::xx_color_manager_v4::primaries primaries) const;
- bool supportsTransferFunction(QtWayland::xx_color_manager_v4::transfer_function transferFunction) const;
+ bool supportsNamedPrimary(QtWayland::wp_color_manager_v1::primaries primaries) const;
+ bool supportsTransferFunction(QtWayland::wp_color_manager_v1::transfer_function transferFunction) const;
std::unique_ptr<ImageDescription> createImageDescription(const QColorSpace &colorspace);
private:
- void xx_color_manager_v4_supported_feature(uint32_t feature) override;
- void xx_color_manager_v4_supported_primaries_named(uint32_t primaries) override;
- void xx_color_manager_v4_supported_tf_named(uint32_t transferFunction) override;
+ void wp_color_manager_v1_supported_feature(uint32_t feature) override;
+ void wp_color_manager_v1_supported_primaries_named(uint32_t primaries) override;
+ void wp_color_manager_v1_supported_tf_named(uint32_t transferFunction) override;
Features mFeatures;
- QList<QtWayland::xx_color_manager_v4::primaries> mPrimaries;
- QList<QtWayland::xx_color_manager_v4::transfer_function> mTransferFunctions;
+ QList<QtWayland::wp_color_manager_v1::primaries> mPrimaries;
+ QList<QtWayland::wp_color_manager_v1::transfer_function> mTransferFunctions;
};
-class ImageDescriptionInfo : public QObject, public QtWayland::xx_image_description_info_v4
+class ImageDescriptionInfo : public QObject, public QtWayland::wp_image_description_info_v1
{
Q_OBJECT
public:
@@ -88,34 +88,34 @@ public:
double mTargetMaxLuminance;
private:
- void xx_image_description_info_v4_done() override;
- void xx_image_description_info_v4_icc_file(int32_t icc, uint32_t icc_size) override;
- void xx_image_description_info_v4_primaries(int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y) override;
- void xx_image_description_info_v4_tf_named(uint32_t transferFunction) override;
- void xx_image_description_info_v4_luminances(uint32_t min_lum, uint32_t max_lum, uint32_t reference_lum) override;
- void xx_image_description_info_v4_target_primaries(int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y) override;
- void xx_image_description_info_v4_target_luminance(uint32_t min_lum, uint32_t max_lum) override;
+ void wp_image_description_info_v1_done() override;
+ void wp_image_description_info_v1_icc_file(int32_t icc, uint32_t icc_size) override;
+ void wp_image_description_info_v1_primaries(int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y) override;
+ void wp_image_description_info_v1_tf_named(uint32_t transferFunction) override;
+ void wp_image_description_info_v1_luminances(uint32_t min_lum, uint32_t max_lum, uint32_t reference_lum) override;
+ void wp_image_description_info_v1_target_primaries(int32_t r_x, int32_t r_y, int32_t g_x, int32_t g_y, int32_t b_x, int32_t b_y, int32_t w_x, int32_t w_y) override;
+ void wp_image_description_info_v1_target_luminance(uint32_t min_lum, uint32_t max_lum) override;
};
-class ImageDescription : public QObject, public QtWayland::xx_image_description_v4
+class ImageDescription : public QObject, public QtWayland::wp_image_description_v1
{
Q_OBJECT
public:
- explicit ImageDescription(::xx_image_description_v4 *descr);
+ explicit ImageDescription(::wp_image_description_v1 *descr);
~ImageDescription();
Q_SIGNAL void ready();
private:
- void xx_image_description_v4_failed(uint32_t cause, const QString &msg) override;
- void xx_image_description_v4_ready(uint32_t identity) override;
+ void wp_image_description_v1_failed(uint32_t cause, const QString &msg) override;
+ void wp_image_description_v1_ready(uint32_t identity) override;
};
-class ColorManagementFeedback : public QObject, public QtWayland::xx_color_management_feedback_surface_v4
+class ColorManagementFeedback : public QObject, public QtWayland::wp_color_management_surface_feedback_v1
{
Q_OBJECT
public:
- explicit ColorManagementFeedback(::xx_color_management_feedback_surface_v4 *obj);
+ explicit ColorManagementFeedback(::wp_color_management_surface_feedback_v1 *obj);
~ColorManagementFeedback();
Q_SIGNAL void preferredChanged();
@@ -123,7 +123,7 @@ public:
std::unique_ptr<ImageDescriptionInfo> mPreferredInfo;
private:
- void xx_color_management_feedback_surface_v4_preferred_changed() override;
+ void wp_color_management_surface_feedback_v1_preferred_changed(uint32_t identity) override;
void handlePreferredDone();
std::unique_ptr<ImageDescription> mPreferred;
@@ -131,11 +131,11 @@ private:
};
-class ColorManagementSurface : public QObject, public QtWayland::xx_color_management_surface_v4
+class ColorManagementSurface : public QObject, public QtWayland::wp_color_management_surface_v1
{
Q_OBJECT
public:
- explicit ColorManagementSurface(::xx_color_management_surface_v4 *obj);
+ explicit ColorManagementSurface(::wp_color_management_surface_v1 *obj);
~ColorManagementSurface();
void setImageDescription(ImageDescription *descr);
diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
index 10bc2d5bfa2..1fc5e5c30a0 100644
--- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp
@@ -485,9 +485,13 @@ void QWaylandDisplay::reconnect()
connect(
this, &QWaylandDisplay::connected, this,
- [&allPlatformWindows] {
+ [this, &allPlatformWindows] {
for (auto &window : std::as_const(allPlatformWindows)) {
- window->initializeWlSurface();
+ window->initializeWlSurface(false);
+ }
+ forceRoundTrip(); // we need a roundtrip to receive the color space features the compositor supports
+ for (auto &window : std::as_const(allPlatformWindows)) {
+ window->initializeColorSpace();
}
},
Qt::SingleShotConnection);
@@ -797,10 +801,8 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
inputDevice->setDataControlDevice(mGlobals.dataControlManager->createDevice(inputDevice));
}
#endif
- } else if (interface == QLatin1String(QtWayland::xx_color_manager_v4::interface()->name)) {
+ } else if (interface == QLatin1String(QtWayland::wp_color_manager_v1::interface()->name)) {
mGlobals.colorManager = std::make_unique<ColorManager>(registry, id, 1);
- // we need a roundtrip to receive the features the compositor supports
- forceRoundTrip();
} else if (interface == QLatin1String(QtWayland::wp_pointer_warp_v1::interface()->name)) {
mGlobals.pointerWarp.reset(new WithDestructor<QtWayland::wp_pointer_warp_v1, wp_pointer_warp_v1_destroy>(
registry, id, 1));
diff --git a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
index b853db21529..fa70b53cbd0 100644
--- a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
+++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp
@@ -229,7 +229,7 @@ void QWaylandShmBackingStore::endPaint()
// Inspired by QCALayerBackingStore.
bool QWaylandShmBackingStore::scroll(const QRegion &region, int dx, int dy)
{
- if (Q_UNLIKELY(!mBackBuffer || !mFrontBuffer))
+ if (Q_UNLIKELY(!mBackBuffer))
return false;
const qreal devicePixelRatio = waylandWindow()->scale();
@@ -241,6 +241,8 @@ bool QWaylandShmBackingStore::scroll(const QRegion &region, int dx, int dy)
return false;
recreateBackBufferIfNeeded();
+ if (!mFrontBuffer)
+ return false;
const QPoint scrollDelta(dx, dy);
const QMargins margins = windowDecorationMargins();
diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp
index be527b08f4d..0be22ff80e7 100644
--- a/src/plugins/platforms/wayland/qwaylandwindow.cpp
+++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp
@@ -62,6 +62,7 @@ QWaylandWindow::QWaylandWindow(QWindow *window, QWaylandDisplay *display)
mFrameCallbackTimeout = frameCallbackTimeout;
}
+ mSurfaceFormat.setColorSpace(QColorSpace{});
initializeWlSurface();
mFlags = window->flags();
@@ -214,7 +215,7 @@ void QWaylandWindow::setPendingImageDescription()
mColorManagementSurface->setImageDescription(mPendingImageDescription.get());
}
-void QWaylandWindow::initializeWlSurface()
+void QWaylandWindow::initializeWlSurface(bool colorSpace)
{
Q_ASSERT(!mSurface);
{
@@ -242,6 +243,13 @@ void QWaylandWindow::initializeWlSurface()
mViewport.reset(new QWaylandViewport(display()->createViewport(this)));
}
+ if (colorSpace) {
+ initializeColorSpace();
+ }
+}
+
+void QWaylandWindow::initializeColorSpace()
+{
QColorSpace requestedColorSpace = window()->requestedFormat().colorSpace();
if (requestedColorSpace != QColorSpace{} && mDisplay->colorManager()) {
// TODO try a similar (same primaries + supported transfer function) color space if this fails?
diff --git a/src/plugins/platforms/wayland/qwaylandwindow_p.h b/src/plugins/platforms/wayland/qwaylandwindow_p.h
index d6b24d0569f..9e1bd92af30 100644
--- a/src/plugins/platforms/wayland/qwaylandwindow_p.h
+++ b/src/plugins/platforms/wayland/qwaylandwindow_p.h
@@ -247,7 +247,9 @@ public:
virtual void reinit();
void reset();
- void initializeWlSurface();
+ void initializeWlSurface(bool colorSpace = true);
+
+ void initializeColorSpace();
bool windowEvent(QEvent *event) override;
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 33777933495..ae5894661a2 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -2984,8 +2984,6 @@ void QFusionStyle::polish(QWidget *widget)
#if QT_CONFIG(spinbox)
|| qobject_cast<QAbstractSpinBox *>(widget)
#endif
- || (widget->inherits("QDockSeparator"))
- || (widget->inherits("QDockWidgetSeparator"))
) {
widget->setAttribute(Qt::WA_Hover, true);
widget->setAttribute(Qt::WA_OpaquePaintEvent, false);
@@ -3028,8 +3026,6 @@ void QFusionStyle::unpolish(QWidget *widget)
#if QT_CONFIG(spinbox)
|| qobject_cast<QAbstractSpinBox *>(widget)
#endif
- || (widget->inherits("QDockSeparator"))
- || (widget->inherits("QDockWidgetSeparator"))
) {
widget->setAttribute(Qt::WA_Hover, false);
}
diff --git a/src/widgets/styles/qstylesheetstyle_default.cpp b/src/widgets/styles/qstylesheetstyle_default.cpp
index 73e7c9524d6..ae6b10560fe 100644
--- a/src/widgets/styles/qstylesheetstyle_default.cpp
+++ b/src/widgets/styles/qstylesheetstyle_default.cpp
@@ -306,7 +306,7 @@ StyleSheet QStyleSheetStyle::getDefaultStyleSheet() const
{
-qt-background-role: button;
}*/
- if (baseStyle()->inherits("QPlastiqueStyle") || baseStyle()->inherits("QCleanlooksStyle") || baseStyle()->inherits("QFusionStyle"))
+ if (baseStyle()->inherits("QFusionStyle"))
{
SET_ELEMENT_NAME("QComboBox"_L1);
ADD_ATTRIBUTE_SELECTOR("readOnly"_L1, "true"_L1, AttributeSelector::MatchEqual);