162306a36Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci.. _overlay:
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci***********************
662306a36Sopenharmony_ciVideo Overlay Interface
762306a36Sopenharmony_ci***********************
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci**Also known as Framebuffer Overlay or Previewing.**
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciVideo overlay devices have the ability to genlock (TV-)video into the
1262306a36Sopenharmony_ci(VGA-)video signal of a graphics card, or to store captured images
1362306a36Sopenharmony_cidirectly in video memory of a graphics card, typically with clipping.
1462306a36Sopenharmony_ciThis can be considerable more efficient than capturing images and
1562306a36Sopenharmony_cidisplaying them by other means. In the old days when only nuclear power
1662306a36Sopenharmony_ciplants needed cooling towers this used to be the only way to put live
1762306a36Sopenharmony_civideo into a window.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciVideo overlay devices are accessed through the same character special
2062306a36Sopenharmony_cifiles as :ref:`video capture <capture>` devices.
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci.. note::
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci   The default function of a ``/dev/video`` device is video
2562306a36Sopenharmony_ci   capturing. The overlay function is only available after calling
2662306a36Sopenharmony_ci   the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ciThe driver may support simultaneous overlay and capturing using the
2962306a36Sopenharmony_ciread/write and streaming I/O methods. If so, operation at the nominal
3062306a36Sopenharmony_ciframe rate of the video standard is not guaranteed. Frames may be
3162306a36Sopenharmony_cidirected away from overlay to capture, or one field may be used for
3262306a36Sopenharmony_cioverlay and the other for capture if the capture parameters permit this.
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciApplications should use different file descriptors for capturing and
3562306a36Sopenharmony_cioverlay. This must be supported by all drivers capable of simultaneous
3662306a36Sopenharmony_cicapturing and overlay. Optionally these drivers may also permit
3762306a36Sopenharmony_cicapturing and overlay with a single file descriptor for compatibility
3862306a36Sopenharmony_ciwith V4L and earlier versions of V4L2. [#f1]_
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ciA common application of two file descriptors is the X11
4162306a36Sopenharmony_ci:ref:`Xv/V4L <xvideo>` interface driver and a V4L2 application.
4262306a36Sopenharmony_ciWhile the X server controls video overlay, the application can take
4362306a36Sopenharmony_ciadvantage of memory mapping and DMA.
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ciQuerying Capabilities
4662306a36Sopenharmony_ci=====================
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciDevices supporting the video overlay interface set the
4962306a36Sopenharmony_ci``V4L2_CAP_VIDEO_OVERLAY`` flag in the ``capabilities`` field of struct
5062306a36Sopenharmony_ci:c:type:`v4l2_capability` returned by the
5162306a36Sopenharmony_ci:ref:`VIDIOC_QUERYCAP` ioctl. The overlay I/O
5262306a36Sopenharmony_cimethod specified below must be supported. Tuners and audio inputs are
5362306a36Sopenharmony_cioptional.
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciSupplemental Functions
5762306a36Sopenharmony_ci======================
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ciVideo overlay devices shall support :ref:`audio input <audio>`,
6062306a36Sopenharmony_ci:ref:`tuner`, :ref:`controls <control>`,
6162306a36Sopenharmony_ci:ref:`cropping and scaling <crop>` and
6262306a36Sopenharmony_ci:ref:`streaming parameter <streaming-par>` ioctls as needed. The
6362306a36Sopenharmony_ci:ref:`video input <video>` and :ref:`video standard <standard>`
6462306a36Sopenharmony_ciioctls must be supported by all video overlay devices.
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ciSetup
6862306a36Sopenharmony_ci=====
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci*Note: support for this has been removed.*
7162306a36Sopenharmony_ciBefore overlay can commence applications must program the driver with
7262306a36Sopenharmony_ciframe buffer parameters, namely the address and size of the frame buffer
7362306a36Sopenharmony_ciand the image format, for example RGB 5:6:5. The
7462306a36Sopenharmony_ci:ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` and
7562306a36Sopenharmony_ci:ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctls are available to get and
7662306a36Sopenharmony_ciset these parameters, respectively. The :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctl is
7762306a36Sopenharmony_ciprivileged because it allows to set up DMA into physical memory,
7862306a36Sopenharmony_cibypassing the memory protection mechanisms of the kernel. Only the
7962306a36Sopenharmony_cisuperuser can change the frame buffer address and size. Users are not
8062306a36Sopenharmony_cisupposed to run TV applications as root or with SUID bit set. A small
8162306a36Sopenharmony_cihelper application with suitable privileges should query the graphics
8262306a36Sopenharmony_cisystem and program the V4L2 driver at the appropriate time.
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ciSome devices add the video overlay to the output signal of the graphics
8562306a36Sopenharmony_cicard. In this case the frame buffer is not modified by the video device,
8662306a36Sopenharmony_ciand the frame buffer address and pixel format are not needed by the
8762306a36Sopenharmony_cidriver. The :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctl is not privileged. An application
8862306a36Sopenharmony_cican check for this type of device by calling the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`
8962306a36Sopenharmony_ciioctl.
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ciA driver may support any (or none) of five clipping/blending methods:
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci1. Chroma-keying displays the overlaid image only where pixels in the
9462306a36Sopenharmony_ci   primary graphics surface assume a certain color.
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ci2. *Note: support for this has been removed.*
9762306a36Sopenharmony_ci   A bitmap can be specified where each bit corresponds to a pixel in
9862306a36Sopenharmony_ci   the overlaid image. When the bit is set, the corresponding video
9962306a36Sopenharmony_ci   pixel is displayed, otherwise a pixel of the graphics surface.
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ci3. *Note: support for this has been removed.*
10262306a36Sopenharmony_ci   A list of clipping rectangles can be specified. In these regions *no*
10362306a36Sopenharmony_ci   video is displayed, so the graphics surface can be seen here.
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ci4. The framebuffer has an alpha channel that can be used to clip or
10662306a36Sopenharmony_ci   blend the framebuffer with the video.
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci5. A global alpha value can be specified to blend the framebuffer
10962306a36Sopenharmony_ci   contents with video images.
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ciWhen simultaneous capturing and overlay is supported and the hardware
11262306a36Sopenharmony_ciprohibits different image and frame buffer formats, the format requested
11362306a36Sopenharmony_cifirst takes precedence. The attempt to capture
11462306a36Sopenharmony_ci(:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) or overlay
11562306a36Sopenharmony_ci(:ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`) may fail with an ``EBUSY`` error
11662306a36Sopenharmony_cicode or return accordingly modified parameters..
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ciOverlay Window
12062306a36Sopenharmony_ci==============
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ciThe overlaid image is determined by cropping and overlay window
12362306a36Sopenharmony_ciparameters. The former select an area of the video picture to capture,
12462306a36Sopenharmony_cithe latter how images are overlaid and clipped. Cropping initialization
12562306a36Sopenharmony_ciat minimum requires to reset the parameters to defaults. An example is
12662306a36Sopenharmony_cigiven in :ref:`crop`.
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ciThe overlay window is described by a struct
12962306a36Sopenharmony_ci:c:type:`v4l2_window`. It defines the size of the image,
13062306a36Sopenharmony_ciits position over the graphics surface and the clipping to be applied.
13162306a36Sopenharmony_ciTo get the current parameters applications set the ``type`` field of a
13262306a36Sopenharmony_cistruct :c:type:`v4l2_format` to
13362306a36Sopenharmony_ci``V4L2_BUF_TYPE_VIDEO_OVERLAY`` and call the
13462306a36Sopenharmony_ci:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the
13562306a36Sopenharmony_cistruct :c:type:`v4l2_window` substructure named ``win``. It is not
13662306a36Sopenharmony_cipossible to retrieve a previously programmed clipping list or bitmap.
13762306a36Sopenharmony_ci
13862306a36Sopenharmony_ciTo program the overlay window applications set the ``type`` field of a
13962306a36Sopenharmony_cistruct :c:type:`v4l2_format` to
14062306a36Sopenharmony_ci``V4L2_BUF_TYPE_VIDEO_OVERLAY``, initialize the ``win`` substructure and
14162306a36Sopenharmony_cicall the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. The driver
14262306a36Sopenharmony_ciadjusts the parameters against hardware limits and returns the actual
14362306a36Sopenharmony_ciparameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, the
14462306a36Sopenharmony_ci:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to learn
14562306a36Sopenharmony_ciabout driver capabilities without actually changing driver state. Unlike
14662306a36Sopenharmony_ci:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled.
14762306a36Sopenharmony_ci
14862306a36Sopenharmony_ciThe scaling factor of the overlaid image is implied by the width and
14962306a36Sopenharmony_ciheight given in struct :c:type:`v4l2_window` and the size
15062306a36Sopenharmony_ciof the cropping rectangle. For more information see :ref:`crop`.
15162306a36Sopenharmony_ci
15262306a36Sopenharmony_ciWhen simultaneous capturing and overlay is supported and the hardware
15362306a36Sopenharmony_ciprohibits different image and window sizes, the size requested first
15462306a36Sopenharmony_citakes precedence. The attempt to capture or overlay as well
15562306a36Sopenharmony_ci(:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) may fail with an ``EBUSY`` error
15662306a36Sopenharmony_cicode or return accordingly modified parameters.
15762306a36Sopenharmony_ci
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci.. c:type:: v4l2_window
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_cistruct v4l2_window
16262306a36Sopenharmony_ci------------------
16362306a36Sopenharmony_ci
16462306a36Sopenharmony_ci``struct v4l2_rect w``
16562306a36Sopenharmony_ci    Size and position of the window relative to the top, left corner of
16662306a36Sopenharmony_ci    the frame buffer defined with
16762306a36Sopenharmony_ci    :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`. The window can extend the
16862306a36Sopenharmony_ci    frame buffer width and height, the ``x`` and ``y`` coordinates can
16962306a36Sopenharmony_ci    be negative, and it can lie completely outside the frame buffer. The
17062306a36Sopenharmony_ci    driver clips the window accordingly, or if that is not possible,
17162306a36Sopenharmony_ci    modifies its size and/or position.
17262306a36Sopenharmony_ci
17362306a36Sopenharmony_ci``enum v4l2_field field``
17462306a36Sopenharmony_ci    Applications set this field to determine which video field shall be
17562306a36Sopenharmony_ci    overlaid, typically one of ``V4L2_FIELD_ANY`` (0),
17662306a36Sopenharmony_ci    ``V4L2_FIELD_TOP``, ``V4L2_FIELD_BOTTOM`` or
17762306a36Sopenharmony_ci    ``V4L2_FIELD_INTERLACED``. Drivers may have to choose a different
17862306a36Sopenharmony_ci    field order and return the actual setting here.
17962306a36Sopenharmony_ci
18062306a36Sopenharmony_ci``__u32 chromakey``
18162306a36Sopenharmony_ci    When chroma-keying has been negotiated with
18262306a36Sopenharmony_ci    :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` applications set this field
18362306a36Sopenharmony_ci    to the desired pixel value for the chroma key. The format is the
18462306a36Sopenharmony_ci    same as the pixel format of the framebuffer (struct
18562306a36Sopenharmony_ci    :c:type:`v4l2_framebuffer` ``fmt.pixelformat``
18662306a36Sopenharmony_ci    field), with bytes in host order. E. g. for
18762306a36Sopenharmony_ci    :ref:`V4L2_PIX_FMT_BGR24 <V4L2-PIX-FMT-BGR32>` the value should
18862306a36Sopenharmony_ci    be 0xRRGGBB on a little endian, 0xBBGGRR on a big endian host.
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ci``struct v4l2_clip * clips``
19162306a36Sopenharmony_ci    *Note: support for this has been removed.*
19262306a36Sopenharmony_ci    When chroma-keying has *not* been negotiated and
19362306a36Sopenharmony_ci    :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` indicated this capability,
19462306a36Sopenharmony_ci    applications can set this field to point to an array of clipping
19562306a36Sopenharmony_ci    rectangles.
19662306a36Sopenharmony_ci
19762306a36Sopenharmony_ci    Like the window coordinates w, clipping rectangles are defined
19862306a36Sopenharmony_ci    relative to the top, left corner of the frame buffer. However
19962306a36Sopenharmony_ci    clipping rectangles must not extend the frame buffer width and
20062306a36Sopenharmony_ci    height, and they must not overlap. If possible applications
20162306a36Sopenharmony_ci    should merge adjacent rectangles. Whether this must create
20262306a36Sopenharmony_ci    x-y or y-x bands, or the order of rectangles, is not defined. When
20362306a36Sopenharmony_ci    clip lists are not supported the driver ignores this field. Its
20462306a36Sopenharmony_ci    contents after calling :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
20562306a36Sopenharmony_ci    are undefined.
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_ci``__u32 clipcount``
20862306a36Sopenharmony_ci    *Note: support for this has been removed.*
20962306a36Sopenharmony_ci    When the application set the ``clips`` field, this field must
21062306a36Sopenharmony_ci    contain the number of clipping rectangles in the list. When clip
21162306a36Sopenharmony_ci    lists are not supported the driver ignores this field, its contents
21262306a36Sopenharmony_ci    after calling :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` are undefined. When clip lists are
21362306a36Sopenharmony_ci    supported but no clipping is desired this field must be set to zero.
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ci``void * bitmap``
21662306a36Sopenharmony_ci    *Note: support for this has been removed.*
21762306a36Sopenharmony_ci    When chroma-keying has *not* been negotiated and
21862306a36Sopenharmony_ci    :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` indicated this capability,
21962306a36Sopenharmony_ci    applications can set this field to point to a clipping bit mask.
22062306a36Sopenharmony_ci
22162306a36Sopenharmony_ciIt must be of the same size as the window, ``w.width`` and ``w.height``.
22262306a36Sopenharmony_ciEach bit corresponds to a pixel in the overlaid image, which is
22362306a36Sopenharmony_cidisplayed only when the bit is *set*. Pixel coordinates translate to
22462306a36Sopenharmony_cibits like:
22562306a36Sopenharmony_ci
22662306a36Sopenharmony_ci
22762306a36Sopenharmony_ci.. code-block:: c
22862306a36Sopenharmony_ci
22962306a36Sopenharmony_ci    ((__u8 *) bitmap)[w.width * y + x / 8] & (1 << (x & 7))
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ciwhere ``0`` ≤ x < ``w.width`` and ``0`` ≤ y <``w.height``. [#f2]_
23262306a36Sopenharmony_ci
23362306a36Sopenharmony_ciWhen a clipping bit mask is not supported the driver ignores this field,
23462306a36Sopenharmony_ciits contents after calling :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` are
23562306a36Sopenharmony_ciundefined. When a bit mask is supported but no clipping is desired this
23662306a36Sopenharmony_cifield must be set to ``NULL``.
23762306a36Sopenharmony_ci
23862306a36Sopenharmony_ciApplications need not create a clip list or bit mask. When they pass
23962306a36Sopenharmony_ciboth, or despite negotiating chroma-keying, the results are undefined.
24062306a36Sopenharmony_ciRegardless of the chosen method, the clipping abilities of the hardware
24162306a36Sopenharmony_cimay be limited in quantity or quality. The results when these limits are
24262306a36Sopenharmony_ciexceeded are undefined. [#f3]_
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci``__u8 global_alpha``
24562306a36Sopenharmony_ci    The global alpha value used to blend the framebuffer with video
24662306a36Sopenharmony_ci    images, if global alpha blending has been negotiated
24762306a36Sopenharmony_ci    (``V4L2_FBUF_FLAG_GLOBAL_ALPHA``, see
24862306a36Sopenharmony_ci    :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`,
24962306a36Sopenharmony_ci    :ref:`framebuffer-flags`).
25062306a36Sopenharmony_ci
25162306a36Sopenharmony_ci.. note::
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_ci   This field was added in Linux 2.6.23, extending the
25462306a36Sopenharmony_ci   structure. However the :ref:`VIDIOC_[G|S|TRY]_FMT <VIDIOC_G_FMT>`
25562306a36Sopenharmony_ci   ioctls, which take a pointer to a :c:type:`v4l2_format`
25662306a36Sopenharmony_ci   parent structure with padding bytes at the end, are not affected.
25762306a36Sopenharmony_ci
25862306a36Sopenharmony_ci
25962306a36Sopenharmony_ci.. c:type:: v4l2_clip
26062306a36Sopenharmony_ci
26162306a36Sopenharmony_cistruct v4l2_clip [#f4]_
26262306a36Sopenharmony_ci-----------------------
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci``struct v4l2_rect c``
26562306a36Sopenharmony_ci    Coordinates of the clipping rectangle, relative to the top, left
26662306a36Sopenharmony_ci    corner of the frame buffer. Only window pixels *outside* all
26762306a36Sopenharmony_ci    clipping rectangles are displayed.
26862306a36Sopenharmony_ci
26962306a36Sopenharmony_ci``struct v4l2_clip * next``
27062306a36Sopenharmony_ci    Pointer to the next clipping rectangle, ``NULL`` when this is the last
27162306a36Sopenharmony_ci    rectangle. Drivers ignore this field, it cannot be used to pass a
27262306a36Sopenharmony_ci    linked list of clipping rectangles.
27362306a36Sopenharmony_ci
27462306a36Sopenharmony_ci
27562306a36Sopenharmony_ci.. c:type:: v4l2_rect
27662306a36Sopenharmony_ci
27762306a36Sopenharmony_cistruct v4l2_rect
27862306a36Sopenharmony_ci----------------
27962306a36Sopenharmony_ci
28062306a36Sopenharmony_ci``__s32 left``
28162306a36Sopenharmony_ci    Horizontal offset of the top, left corner of the rectangle, in
28262306a36Sopenharmony_ci    pixels.
28362306a36Sopenharmony_ci
28462306a36Sopenharmony_ci``__s32 top``
28562306a36Sopenharmony_ci    Vertical offset of the top, left corner of the rectangle, in pixels.
28662306a36Sopenharmony_ci    Offsets increase to the right and down.
28762306a36Sopenharmony_ci
28862306a36Sopenharmony_ci``__u32 width``
28962306a36Sopenharmony_ci    Width of the rectangle, in pixels.
29062306a36Sopenharmony_ci
29162306a36Sopenharmony_ci``__u32 height``
29262306a36Sopenharmony_ci    Height of the rectangle, in pixels.
29362306a36Sopenharmony_ci
29462306a36Sopenharmony_ci
29562306a36Sopenharmony_ciEnabling Overlay
29662306a36Sopenharmony_ci================
29762306a36Sopenharmony_ci
29862306a36Sopenharmony_ciTo start or stop the frame buffer overlay applications call the
29962306a36Sopenharmony_ci:ref:`VIDIOC_OVERLAY` ioctl.
30062306a36Sopenharmony_ci
30162306a36Sopenharmony_ci.. [#f1]
30262306a36Sopenharmony_ci   In the opinion of the designers of this API, no driver writer taking
30362306a36Sopenharmony_ci   the efforts to support simultaneous capturing and overlay will
30462306a36Sopenharmony_ci   restrict this ability by requiring a single file descriptor, as in
30562306a36Sopenharmony_ci   V4L and earlier versions of V4L2. Making this optional means
30662306a36Sopenharmony_ci   applications depending on two file descriptors need backup routines
30762306a36Sopenharmony_ci   to be compatible with all drivers, which is considerable more work
30862306a36Sopenharmony_ci   than using two fds in applications which do not. Also two fd's fit
30962306a36Sopenharmony_ci   the general concept of one file descriptor for each logical stream.
31062306a36Sopenharmony_ci   Hence as a complexity trade-off drivers *must* support two file
31162306a36Sopenharmony_ci   descriptors and *may* support single fd operation.
31262306a36Sopenharmony_ci
31362306a36Sopenharmony_ci.. [#f2]
31462306a36Sopenharmony_ci   Should we require ``w.width`` to be a multiple of eight?
31562306a36Sopenharmony_ci
31662306a36Sopenharmony_ci.. [#f3]
31762306a36Sopenharmony_ci   When the image is written into frame buffer memory it will be
31862306a36Sopenharmony_ci   undesirable if the driver clips out less pixels than expected,
31962306a36Sopenharmony_ci   because the application and graphics system are not aware these
32062306a36Sopenharmony_ci   regions need to be refreshed. The driver should clip out more pixels
32162306a36Sopenharmony_ci   or not write the image at all.
32262306a36Sopenharmony_ci
32362306a36Sopenharmony_ci.. [#f4]
32462306a36Sopenharmony_ci   The X Window system defines "regions" which are vectors of ``struct
32562306a36Sopenharmony_ci   BoxRec { short x1, y1, x2, y2; }`` with ``width = x2 - x1`` and
32662306a36Sopenharmony_ci   ``height = y2 - y1``, so one cannot pass X11 clip lists directly.
327