1c5e268c6Sopenharmony_ci/*
2c5e268c6Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
3c5e268c6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4c5e268c6Sopenharmony_ci * you may not use this file except in compliance with the License.
5c5e268c6Sopenharmony_ci * You may obtain a copy of the License at
6c5e268c6Sopenharmony_ci *
7c5e268c6Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8c5e268c6Sopenharmony_ci *
9c5e268c6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10c5e268c6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11c5e268c6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12c5e268c6Sopenharmony_ci * See the License for the specific language governing permissions and
13c5e268c6Sopenharmony_ci * limitations under the License.
14c5e268c6Sopenharmony_ci */
15c5e268c6Sopenharmony_ci
16c5e268c6Sopenharmony_ci#ifndef OHOS_HDI_DISPLAY_V1_0_IDISPLAY_COMPOSER_INTERFACE_H
17c5e268c6Sopenharmony_ci#define OHOS_HDI_DISPLAY_V1_0_IDISPLAY_COMPOSER_INTERFACE_H
18c5e268c6Sopenharmony_ci
19c5e268c6Sopenharmony_ci#include <vector>
20c5e268c6Sopenharmony_ci#include "buffer_handle.h"
21c5e268c6Sopenharmony_ci#include "common/include/display_common.h"
22c5e268c6Sopenharmony_ci#include "iproxy_broker.h"
23c5e268c6Sopenharmony_ci#include "v1_0/display_composer_type.h"
24c5e268c6Sopenharmony_ci
25c5e268c6Sopenharmony_cinamespace OHOS {
26c5e268c6Sopenharmony_cinamespace HDI {
27c5e268c6Sopenharmony_cinamespace Display {
28c5e268c6Sopenharmony_cinamespace Composer {
29c5e268c6Sopenharmony_cinamespace V1_0 {
30c5e268c6Sopenharmony_ciusing namespace OHOS::HDI::Display::Composer::V1_0;
31c5e268c6Sopenharmony_ci
32c5e268c6Sopenharmony_ciclass IDisplayComposerInterface : public virtual RefBase {
33c5e268c6Sopenharmony_cipublic:
34c5e268c6Sopenharmony_ci    virtual ~IDisplayComposerInterface() = default;
35c5e268c6Sopenharmony_ci
36c5e268c6Sopenharmony_ci    /**
37c5e268c6Sopenharmony_ci     * @brief Obtains all interfaces of IDisplayComposerInterface.
38c5e268c6Sopenharmony_ci     *
39c5e268c6Sopenharmony_ci     * @return Returns <b>IDisplayComposerInterface*</b> if the operation is successful;
40c5e268c6Sopenharmony_ci     * returns an null point otherwise.
41c5e268c6Sopenharmony_ci     * @since 4.0
42c5e268c6Sopenharmony_ci     * @version 1.0
43c5e268c6Sopenharmony_ci     */
44c5e268c6Sopenharmony_ci    static IDisplayComposerInterface* Get(bool needSMQ = true);
45c5e268c6Sopenharmony_ci
46c5e268c6Sopenharmony_ci    /**
47c5e268c6Sopenharmony_ci     * @brief Adds a recipient for death notifications of a remote stub object.
48c5e268c6Sopenharmony_ci     *
49c5e268c6Sopenharmony_ci     * @param recipient Indicates the recipient of the DeathRecipient pointer.
50c5e268c6Sopenharmony_ci     *
51c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
52c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
53c5e268c6Sopenharmony_ci     * @since 4.0
54c5e268c6Sopenharmony_ci     * @version 1.0
55c5e268c6Sopenharmony_ci     */
56c5e268c6Sopenharmony_ci    virtual bool AddDeathRecipient(const sptr<IRemoteObject::DeathRecipient>& recipient) = 0;
57c5e268c6Sopenharmony_ci
58c5e268c6Sopenharmony_ci    /**
59c5e268c6Sopenharmony_ci     * @brief Removes the recipient for death notifications of a remote stub object.
60c5e268c6Sopenharmony_ci     *
61c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
62c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
63c5e268c6Sopenharmony_ci     * @since 4.0
64c5e268c6Sopenharmony_ci     * @version 1.0
65c5e268c6Sopenharmony_ci     */
66c5e268c6Sopenharmony_ci    virtual bool RemoveDeathRecipient() = 0;
67c5e268c6Sopenharmony_ci
68c5e268c6Sopenharmony_ci    /* device func */
69c5e268c6Sopenharmony_ci    /**
70c5e268c6Sopenharmony_ci     * @brief Registers the callback to be invoked when a hot plug event occurs.
71c5e268c6Sopenharmony_ci     *
72c5e268c6Sopenharmony_ci     * @param cb Indicates the instance used to notify the graphics service of a hot plug event occurred.
73c5e268c6Sopenharmony_ci     * @param data Indicates the pointer to the private data returned to the graphics service in the
74c5e268c6Sopenharmony_ci     * <b>HotPlugCallback</b> callback.
75c5e268c6Sopenharmony_ci
76c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
77c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
78c5e268c6Sopenharmony_ci     * @since 4.0
79c5e268c6Sopenharmony_ci     * @version 1.0
80c5e268c6Sopenharmony_ci     */
81c5e268c6Sopenharmony_ci    virtual int32_t RegHotPlugCallback(HotPlugCallback cb, void* data) = 0;
82c5e268c6Sopenharmony_ci
83c5e268c6Sopenharmony_ci    /**
84c5e268c6Sopenharmony_ci     * @brief Sets the client buffer cache count of a display device.
85c5e268c6Sopenharmony_ci     *
86c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
87c5e268c6Sopenharmony_ci     * @param count client buffer cache count.
88c5e268c6Sopenharmony_ci     *
89c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
90c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
91c5e268c6Sopenharmony_ci     * @since 4.0
92c5e268c6Sopenharmony_ci     * @version 1.0
93c5e268c6Sopenharmony_ci     */
94c5e268c6Sopenharmony_ci    virtual int32_t SetClientBufferCacheCount(uint32_t devId, uint32_t count) = 0;
95c5e268c6Sopenharmony_ci
96c5e268c6Sopenharmony_ci    /**
97c5e268c6Sopenharmony_ci     * @brief Obtains the capabilities of a display device.
98c5e268c6Sopenharmony_ci     *
99c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
100c5e268c6Sopenharmony_ci     * @param info Indicates the pointer to the capabilities supported by the display device. For details,
101c5e268c6Sopenharmony_ci     * see {@link DisplayCapability}.
102c5e268c6Sopenharmony_ci     *
103c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
104c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
105c5e268c6Sopenharmony_ci     * @since 4.0
106c5e268c6Sopenharmony_ci     * @version 1.0
107c5e268c6Sopenharmony_ci     */
108c5e268c6Sopenharmony_ci    virtual int32_t GetDisplayCapability(uint32_t devId, DisplayCapability& info) = 0;
109c5e268c6Sopenharmony_ci
110c5e268c6Sopenharmony_ci    /**
111c5e268c6Sopenharmony_ci     * @brief Obtains the display modes supported by a display device.
112c5e268c6Sopenharmony_ci     *
113c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
114c5e268c6Sopenharmony_ci     * @param modes Indicates the vector of the information about all modes supported by the display device,
115c5e268c6Sopenharmony_ci     * including all supported resolutions and refresh rates. Each mode has an ID, which will be used when
116c5e268c6Sopenharmony_ci     * the mode is set or obtained. For details, see {@link DisplayModeInfo}.
117c5e268c6Sopenharmony_ci     *
118c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
119c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
120c5e268c6Sopenharmony_ci     * @since 4.0
121c5e268c6Sopenharmony_ci     * @version 1.0
122c5e268c6Sopenharmony_ci     */
123c5e268c6Sopenharmony_ci    virtual int32_t GetDisplaySupportedModes(uint32_t devId, std::vector<DisplayModeInfo>& modes) = 0;
124c5e268c6Sopenharmony_ci
125c5e268c6Sopenharmony_ci    /**
126c5e268c6Sopenharmony_ci     * @brief Obtains the current display mode of a display device.
127c5e268c6Sopenharmony_ci     *
128c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
129c5e268c6Sopenharmony_ci     * @param modeId indicates the pointer to the ID of the current display mode of the device. The display mode ID
130c5e268c6Sopenharmony_ci     * is written by this API.
131c5e268c6Sopenharmony_ci     *
132c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
133c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
134c5e268c6Sopenharmony_ci     * @since 4.0
135c5e268c6Sopenharmony_ci     * @version 1.0
136c5e268c6Sopenharmony_ci     */
137c5e268c6Sopenharmony_ci    virtual int32_t GetDisplayMode(uint32_t devId, uint32_t& modeId) = 0;
138c5e268c6Sopenharmony_ci
139c5e268c6Sopenharmony_ci    /**
140c5e268c6Sopenharmony_ci     * @brief Sets the display mode of a display device.
141c5e268c6Sopenharmony_ci     *
142c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
143c5e268c6Sopenharmony_ci     * @param modeId Indicates the ID of the display mode. The device is switched to the display mode specified by
144c5e268c6Sopenharmony_ci     * this parameter in this interface.
145c5e268c6Sopenharmony_ci     *
146c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
147c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
148c5e268c6Sopenharmony_ci     * @since 4.0
149c5e268c6Sopenharmony_ci     * @version 1.0
150c5e268c6Sopenharmony_ci     */
151c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayMode(uint32_t devId, uint32_t modeId) = 0;
152c5e268c6Sopenharmony_ci
153c5e268c6Sopenharmony_ci    /**
154c5e268c6Sopenharmony_ci     * @brief Obtains the power status of a display device.
155c5e268c6Sopenharmony_ci     *
156c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
157c5e268c6Sopenharmony_ci     * @param status Indicates the pointer to the power status of the device. The status is written by this interface.
158c5e268c6Sopenharmony_ci     *
159c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
160c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
161c5e268c6Sopenharmony_ci     * @since 4.0
162c5e268c6Sopenharmony_ci     * @version 1.0
163c5e268c6Sopenharmony_ci     */
164c5e268c6Sopenharmony_ci    virtual int32_t GetDisplayPowerStatus(uint32_t devId, DispPowerStatus& status) = 0;
165c5e268c6Sopenharmony_ci
166c5e268c6Sopenharmony_ci    /**
167c5e268c6Sopenharmony_ci     * @brief Sets the power status of a display device.
168c5e268c6Sopenharmony_ci     *
169c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
170c5e268c6Sopenharmony_ci     * @param status Indicates the power status to set.
171c5e268c6Sopenharmony_ci     *
172c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
173c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
174c5e268c6Sopenharmony_ci     * @since 4.0
175c5e268c6Sopenharmony_ci     * @version 1.0
176c5e268c6Sopenharmony_ci     */
177c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayPowerStatus(uint32_t devId, DispPowerStatus status) = 0;
178c5e268c6Sopenharmony_ci
179c5e268c6Sopenharmony_ci    /**
180c5e268c6Sopenharmony_ci     * @brief Obtains the backlight value of a display device.
181c5e268c6Sopenharmony_ci     *
182c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
183c5e268c6Sopenharmony_ci     * @param level Indicates the pointer to the backlight value of the device. The backlight value is written
184c5e268c6Sopenharmony_ci     * by this interface.
185c5e268c6Sopenharmony_ci     *
186c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
187c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
188c5e268c6Sopenharmony_ci     * @since 4.0
189c5e268c6Sopenharmony_ci     * @version 1.0
190c5e268c6Sopenharmony_ci     */
191c5e268c6Sopenharmony_ci    virtual int32_t GetDisplayBacklight(uint32_t devId, uint32_t& level) = 0;
192c5e268c6Sopenharmony_ci
193c5e268c6Sopenharmony_ci    /**
194c5e268c6Sopenharmony_ci     * @brief Sets the backlight value for a display device.
195c5e268c6Sopenharmony_ci     *
196c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
197c5e268c6Sopenharmony_ci     * @param level Indicates the backlight value to set.
198c5e268c6Sopenharmony_ci     *
199c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
200c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
201c5e268c6Sopenharmony_ci     * @since 4.0
202c5e268c6Sopenharmony_ci     * @version 1.0
203c5e268c6Sopenharmony_ci     */
204c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayBacklight(uint32_t devId, uint32_t level) = 0;
205c5e268c6Sopenharmony_ci
206c5e268c6Sopenharmony_ci    /**
207c5e268c6Sopenharmony_ci     * @brief Obtains the property for a display device.
208c5e268c6Sopenharmony_ci     *
209c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
210c5e268c6Sopenharmony_ci     * @param id Indicates the property ID returned by <b>GetDisplayCapability</b>.
211c5e268c6Sopenharmony_ci     * @param value Indicates the property to get.
212c5e268c6Sopenharmony_ci     *
213c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
214c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
215c5e268c6Sopenharmony_ci     * @since 4.0
216c5e268c6Sopenharmony_ci     * @version 1.0
217c5e268c6Sopenharmony_ci     */
218c5e268c6Sopenharmony_ci    virtual int32_t GetDisplayProperty(uint32_t devId, uint32_t id, uint64_t& value) = 0;
219c5e268c6Sopenharmony_ci
220c5e268c6Sopenharmony_ci    /**
221c5e268c6Sopenharmony_ci     * @brief Obtains the layers whose composition types have changed.
222c5e268c6Sopenharmony_ci     *
223c5e268c6Sopenharmony_ci     * In the preparation for composition, the display device changes the composition type for each layer based on
224c5e268c6Sopenharmony_ci     * the composition capability of the device. This function returns the layers whose composition types have changed.
225c5e268c6Sopenharmony_ci     *
226c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
227c5e268c6Sopenharmony_ci     * @param layers Indicates the vector of the start address of the layer array.
228c5e268c6Sopenharmony_ci     * @param types Indicates the vector of the start address of the composition type array.
229c5e268c6Sopenharmony_ci     *
230c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
231c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
232c5e268c6Sopenharmony_ci     * @since 4.0
233c5e268c6Sopenharmony_ci     * @version 1.0
234c5e268c6Sopenharmony_ci     */
235c5e268c6Sopenharmony_ci    virtual int32_t GetDisplayCompChange(uint32_t devId, std::vector<uint32_t>& layers,
236c5e268c6Sopenharmony_ci        std::vector<int32_t>& types) = 0;
237c5e268c6Sopenharmony_ci
238c5e268c6Sopenharmony_ci    /**
239c5e268c6Sopenharmony_ci     * @brief Sets the cropped region for a display device.
240c5e268c6Sopenharmony_ci     *
241c5e268c6Sopenharmony_ci     * You can use this interface to set the cropped region of the client buffer of the display device.
242c5e268c6Sopenharmony_ci     * The cropped region cannot exceed the size of the client buffer.
243c5e268c6Sopenharmony_ci     *
244c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
245c5e268c6Sopenharmony_ci     * @param rect Indicates the pointer to the cropped region of the client buffer.
246c5e268c6Sopenharmony_ci     *
247c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
248c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
249c5e268c6Sopenharmony_ci     * @since 4.0
250c5e268c6Sopenharmony_ci     * @version 1.0
251c5e268c6Sopenharmony_ci     */
252c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayClientCrop(uint32_t devId, const IRect& rect) = 0;
253c5e268c6Sopenharmony_ci
254c5e268c6Sopenharmony_ci    /**
255c5e268c6Sopenharmony_ci     * @brief Sets the display buffer for a display device.
256c5e268c6Sopenharmony_ci     *
257c5e268c6Sopenharmony_ci     * The display buffer stores the hardware composition result of the display device.
258c5e268c6Sopenharmony_ci     *
259c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
260c5e268c6Sopenharmony_ci     * @param buffer Indicates the pointer to the display buffer.
261c5e268c6Sopenharmony_ci     * @param seqNo Indicates the sequence number of buffer cache.
262c5e268c6Sopenharmony_ci     * @param fence Indicates the sync fence that specifies whether the display buffer can be accessed. The display
263c5e268c6Sopenharmony_ci     * buffer is created and released by the graphics service. It can be accessed only when the sync fence is in the
264c5e268c6Sopenharmony_ci     * signaled state.
265c5e268c6Sopenharmony_ci     *
266c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
267c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
268c5e268c6Sopenharmony_ci     * @since 4.0
269c5e268c6Sopenharmony_ci     * @version 1.0
270c5e268c6Sopenharmony_ci     */
271c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayClientBuffer(uint32_t devId, const BufferHandle* buffer, uint32_t seqNo,
272c5e268c6Sopenharmony_ci        int32_t fence) = 0;
273c5e268c6Sopenharmony_ci
274c5e268c6Sopenharmony_ci    /**
275c5e268c6Sopenharmony_ci     * @brief Sets the dirty region for a display device.
276c5e268c6Sopenharmony_ci     *
277c5e268c6Sopenharmony_ci     * The dirty region consists of multiple rectangular regions. The rectangular regions can be refreshed based on
278c5e268c6Sopenharmony_ci     * the settings.
279c5e268c6Sopenharmony_ci     *
280c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
281c5e268c6Sopenharmony_ci     * @param rects Indicates the vector of the start address of the rectangle array.
282c5e268c6Sopenharmony_ci     *
283c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
284c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
285c5e268c6Sopenharmony_ci     * @since 4.0
286c5e268c6Sopenharmony_ci     * @version 1.0
287c5e268c6Sopenharmony_ci     */
288c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayClientDamage(uint32_t devId, std::vector<IRect>& rects) = 0;
289c5e268c6Sopenharmony_ci    /**
290c5e268c6Sopenharmony_ci     * @brief Enables or disables the vertical sync signal.
291c5e268c6Sopenharmony_ci     *
292c5e268c6Sopenharmony_ci     * When the vertical sync signal is generated, the <b>VBlankCallback</b> callback registered
293c5e268c6Sopenharmony_ci     * by <b>RegDisplayVBlankCallback</b> will be invoked. The vertical sync signal must be enabled when the graphics
294c5e268c6Sopenharmony_ci     * service needs to refresh the display, and disabled when display refresh is not required. The display does not
295c5e268c6Sopenharmony_ci     * need to refresh when <b>VBlankCallback</b> is invoked and the graphics service composes layers and sends the
296c5e268c6Sopenharmony_ci     * composition result to the device for display.
297c5e268c6Sopenharmony_ci     *
298c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
299c5e268c6Sopenharmony_ci     * @param enabled Specifies whether to enable the vertical sync signal. The value <b>true</b> means to enable the
300c5e268c6Sopenharmony_ci     * vertical sync signal, and <b>false</b> means to disable it.
301c5e268c6Sopenharmony_ci     *
302c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
303c5e268c6Sopenharmony_ci     * in {@link DispErrCode}otherwise.
304c5e268c6Sopenharmony_ci     * @since 4.0
305c5e268c6Sopenharmony_ci     * @version 1.0
306c5e268c6Sopenharmony_ci     */
307c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayVsyncEnabled(uint32_t devId, bool enabled) = 0;
308c5e268c6Sopenharmony_ci
309c5e268c6Sopenharmony_ci    /**
310c5e268c6Sopenharmony_ci     * @brief Registers the callback to be invoked when a VBLANK event occurs.
311c5e268c6Sopenharmony_ci     *
312c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
313c5e268c6Sopenharmony_ci     * @param cb Indicates the instance used to notify the graphics service of the VBLANK event occurred when
314c5e268c6Sopenharmony_ci     * <b>DisplayVsync</b> is enabled.
315c5e268c6Sopenharmony_ci     * @param data Indicates the pointer to the private data returned to the graphics service in the
316c5e268c6Sopenharmony_ci     * <b>VBlankCallback</b> callback.
317c5e268c6Sopenharmony_ci     *
318c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
319c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
320c5e268c6Sopenharmony_ci     * @since 4.0
321c5e268c6Sopenharmony_ci     * @version 1.0
322c5e268c6Sopenharmony_ci     */
323c5e268c6Sopenharmony_ci    virtual int32_t RegDisplayVBlankCallback(uint32_t devId, VBlankCallback cb, void* data) = 0;
324c5e268c6Sopenharmony_ci
325c5e268c6Sopenharmony_ci    /**
326c5e268c6Sopenharmony_ci     * @brief Obtains the fences of the display layers after the commit operation.
327c5e268c6Sopenharmony_ci     *
328c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
329c5e268c6Sopenharmony_ci     * @param layers Indicates the vector of the start address of the layer array.
330c5e268c6Sopenharmony_ci     * @param fences Indicates the vector of the start address of the fence array.
331c5e268c6Sopenharmony_ci     *
332c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
333c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
334c5e268c6Sopenharmony_ci     * @since 4.0
335c5e268c6Sopenharmony_ci     * @version 1.0
336c5e268c6Sopenharmony_ci     */
337c5e268c6Sopenharmony_ci    virtual int32_t GetDisplayReleaseFence(uint32_t devId, std::vector<uint32_t>& layers,
338c5e268c6Sopenharmony_ci        std::vector<int32_t>& fences) = 0;
339c5e268c6Sopenharmony_ci
340c5e268c6Sopenharmony_ci    /**
341c5e268c6Sopenharmony_ci     * @brief Creates a virtual display device.
342c5e268c6Sopenharmony_ci     *
343c5e268c6Sopenharmony_ci     * @param width Indicates the pixel width of the display device.
344c5e268c6Sopenharmony_ci     * @param height Indicates the pixel height of the display device.
345c5e268c6Sopenharmony_ci     * @param format Indicates the pointer to the pixel format of the display device.
346c5e268c6Sopenharmony_ci     * For details, see {@link PixelFormat}. The <b>format</b> can be modified based on hardware requirements and
347c5e268c6Sopenharmony_ci     * returned to the graphics service.
348c5e268c6Sopenharmony_ci     * @param devId Indicates the pointer to the ID of the virtual display device created.
349c5e268c6Sopenharmony_ci     *
350c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
351c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
352c5e268c6Sopenharmony_ci     * @since 4.0
353c5e268c6Sopenharmony_ci     * @version 1.0
354c5e268c6Sopenharmony_ci     */
355c5e268c6Sopenharmony_ci    virtual int32_t CreateVirtualDisplay(uint32_t width, uint32_t height, int32_t& format, uint32_t& devId) = 0;
356c5e268c6Sopenharmony_ci
357c5e268c6Sopenharmony_ci    /**
358c5e268c6Sopenharmony_ci     * @brief Destroys a virtual display device.
359c5e268c6Sopenharmony_ci     *
360c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
361c5e268c6Sopenharmony_ci     *
362c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
363c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
364c5e268c6Sopenharmony_ci     * @since 4.0
365c5e268c6Sopenharmony_ci     * @version 1.0
366c5e268c6Sopenharmony_ci     */
367c5e268c6Sopenharmony_ci    virtual int32_t DestroyVirtualDisplay(uint32_t devId) = 0;
368c5e268c6Sopenharmony_ci
369c5e268c6Sopenharmony_ci    /**
370c5e268c6Sopenharmony_ci     * @brief Sets the output buffer for a virtual display device.
371c5e268c6Sopenharmony_ci     *
372c5e268c6Sopenharmony_ci     * This buffer stores the output of the virtual display device. The buffer can be used only after the sync fence
373c5e268c6Sopenharmony_ci     * is in the signaled state.
374c5e268c6Sopenharmony_ci     *
375c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
376c5e268c6Sopenharmony_ci     * @param buffer Indicates the pointer to the output buffer.
377c5e268c6Sopenharmony_ci     * @param fence Indicates the sync fence.
378c5e268c6Sopenharmony_ci     *
379c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
380c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
381c5e268c6Sopenharmony_ci     * @since 4.0
382c5e268c6Sopenharmony_ci     * @version 1.0
383c5e268c6Sopenharmony_ci     */
384c5e268c6Sopenharmony_ci    virtual int32_t SetVirtualDisplayBuffer(uint32_t devId, const BufferHandle& buffer, const int32_t fence) = 0;
385c5e268c6Sopenharmony_ci
386c5e268c6Sopenharmony_ci    /**
387c5e268c6Sopenharmony_ci     * @brief Sets the property for a display device.
388c5e268c6Sopenharmony_ci     *
389c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
390c5e268c6Sopenharmony_ci     * @param id Indicates the property ID returned by <b>GetDisplayCapability</b>.
391c5e268c6Sopenharmony_ci     * @param value Indicates the property to set.
392c5e268c6Sopenharmony_ci     *
393c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
394c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
395c5e268c6Sopenharmony_ci     * @since 4.0
396c5e268c6Sopenharmony_ci     * @version 1.0
397c5e268c6Sopenharmony_ci     */
398c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayProperty(uint32_t devId, uint32_t id, uint64_t value) = 0;
399c5e268c6Sopenharmony_ci
400c5e268c6Sopenharmony_ci    /**
401c5e268c6Sopenharmony_ci     * @brief Commits the request for composition and display.
402c5e268c6Sopenharmony_ci     *
403c5e268c6Sopenharmony_ci     * If there is a hardware composition layer, the composition is performed and the composition result is sent to
404c5e268c6Sopenharmony_ci     * the hardware for display.
405c5e268c6Sopenharmony_ci     *
406c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
407c5e268c6Sopenharmony_ci     * @param fence Indicates the pointer to the start address of the fence array.
408c5e268c6Sopenharmony_ci     *
409c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
410c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
411c5e268c6Sopenharmony_ci     * @since 4.0
412c5e268c6Sopenharmony_ci     * @version 1.0
413c5e268c6Sopenharmony_ci     */
414c5e268c6Sopenharmony_ci    virtual int32_t Commit(uint32_t devId, int32_t& fence) = 0;
415c5e268c6Sopenharmony_ci
416c5e268c6Sopenharmony_ci    /**
417c5e268c6Sopenharmony_ci     * @brief Obtains the color gamuts supported by a display device.
418c5e268c6Sopenharmony_ci     *
419c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
420c5e268c6Sopenharmony_ci     * @param gamuts Indicates the vector of the information about all color gamuts supported by the display device.
421c5e268c6Sopenharmony_ci     *
422c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
423c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
424c5e268c6Sopenharmony_ci     * @since 4.0
425c5e268c6Sopenharmony_ci     * @version 1.0
426c5e268c6Sopenharmony_ci     */
427c5e268c6Sopenharmony_ci    virtual int32_t GetDisplaySupportedColorGamuts(uint32_t devId, std::vector<ColorGamut>& gamuts) = 0;
428c5e268c6Sopenharmony_ci
429c5e268c6Sopenharmony_ci    /**
430c5e268c6Sopenharmony_ci     * @brief Obtains the color gamut of a display device.
431c5e268c6Sopenharmony_ci     *
432c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
433c5e268c6Sopenharmony_ci     * @param gamut Indicates the pointer to the color gamut of the device. The color gamut is written
434c5e268c6Sopenharmony_ci     * by this interface.
435c5e268c6Sopenharmony_ci     *
436c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
437c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
438c5e268c6Sopenharmony_ci     * @since 4.0
439c5e268c6Sopenharmony_ci     * @version 1.0
440c5e268c6Sopenharmony_ci     */
441c5e268c6Sopenharmony_ci    virtual int32_t GetDisplayColorGamut(uint32_t devId, ColorGamut& gamut) = 0;
442c5e268c6Sopenharmony_ci
443c5e268c6Sopenharmony_ci    /**
444c5e268c6Sopenharmony_ci     * @brief Sets the color gamut for a display device.
445c5e268c6Sopenharmony_ci     *
446c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
447c5e268c6Sopenharmony_ci     * @param gamut Indicates the color gamut to set.
448c5e268c6Sopenharmony_ci     *
449c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
450c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
451c5e268c6Sopenharmony_ci     * @since 4.0
452c5e268c6Sopenharmony_ci     * @version 1.0
453c5e268c6Sopenharmony_ci     */
454c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayColorGamut(uint32_t devId, const ColorGamut& gamut) = 0;
455c5e268c6Sopenharmony_ci
456c5e268c6Sopenharmony_ci    /**
457c5e268c6Sopenharmony_ci     * @brief Obtains the gamut map of a display device.
458c5e268c6Sopenharmony_ci     *
459c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
460c5e268c6Sopenharmony_ci     * @param gamutMap Indicates the pointer to the gamut map of the device. The gamut map is written
461c5e268c6Sopenharmony_ci     * by this interface.
462c5e268c6Sopenharmony_ci     *
463c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
464c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
465c5e268c6Sopenharmony_ci     * @since 4.0
466c5e268c6Sopenharmony_ci     * @version 1.0
467c5e268c6Sopenharmony_ci     */
468c5e268c6Sopenharmony_ci    virtual int32_t GetDisplayGamutMap(uint32_t devId, GamutMap& gamutMap) = 0;
469c5e268c6Sopenharmony_ci
470c5e268c6Sopenharmony_ci    /**
471c5e268c6Sopenharmony_ci     * @brief Sets the gamut map for a display device.
472c5e268c6Sopenharmony_ci     *
473c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
474c5e268c6Sopenharmony_ci     * @param gamutMap Indicates the gamut map to set.
475c5e268c6Sopenharmony_ci     *
476c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
477c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
478c5e268c6Sopenharmony_ci     * @since 4.0
479c5e268c6Sopenharmony_ci     * @version 1.0
480c5e268c6Sopenharmony_ci     */
481c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayGamutMap(uint32_t devId, const GamutMap& gamutMap) = 0;
482c5e268c6Sopenharmony_ci
483c5e268c6Sopenharmony_ci    /**
484c5e268c6Sopenharmony_ci     * @brief Sets a 4x4 color transformation matrix for a display device.
485c5e268c6Sopenharmony_ci     *
486c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
487c5e268c6Sopenharmony_ci     * @param matrix Indicates the vector of the 4x4 color transformation matrix to set.
488c5e268c6Sopenharmony_ci     *
489c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
490c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
491c5e268c6Sopenharmony_ci     * @since 4.0
492c5e268c6Sopenharmony_ci     * @version 1.0
493c5e268c6Sopenharmony_ci     */
494c5e268c6Sopenharmony_ci    virtual int32_t SetDisplayColorTransform(uint32_t devId, const std::vector<float>& matrix) = 0;
495c5e268c6Sopenharmony_ci
496c5e268c6Sopenharmony_ci    /**
497c5e268c6Sopenharmony_ci     * @brief Obtains the HDR capability of a display device.
498c5e268c6Sopenharmony_ci     *
499c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
500c5e268c6Sopenharmony_ci     * @param info Indicates the pointer to the HDR capability of the device. The <b>info</b> is written
501c5e268c6Sopenharmony_ci     * by this interface.
502c5e268c6Sopenharmony_ci     *
503c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
504c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
505c5e268c6Sopenharmony_ci     * @since 4.0
506c5e268c6Sopenharmony_ci     * @version 1.0
507c5e268c6Sopenharmony_ci     */
508c5e268c6Sopenharmony_ci    virtual int32_t GetHDRCapabilityInfos(uint32_t devId, HDRCapability& info) = 0;
509c5e268c6Sopenharmony_ci
510c5e268c6Sopenharmony_ci    /**
511c5e268c6Sopenharmony_ci     * @brief Obtains the HDR metadata keys supported by a display device.
512c5e268c6Sopenharmony_ci     *
513c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device.
514c5e268c6Sopenharmony_ci     * @param keys Indicates the vector of the information about all HDR metadata keys supported by the display device.
515c5e268c6Sopenharmony_ci     *
516c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined
517c5e268c6Sopenharmony_ci     * in {@link DispErrCode} otherwise.
518c5e268c6Sopenharmony_ci     * @since 4.0
519c5e268c6Sopenharmony_ci     * @version 1.0
520c5e268c6Sopenharmony_ci     */
521c5e268c6Sopenharmony_ci    virtual int32_t GetSupportedMetadataKey(uint32_t devId, std::vector<HDRMetadataKey>& keys) = 0;
522c5e268c6Sopenharmony_ci
523c5e268c6Sopenharmony_ci    /* layer func */
524c5e268c6Sopenharmony_ci    /**
525c5e268c6Sopenharmony_ci     * @brief Opens a layer on a specified display device.
526c5e268c6Sopenharmony_ci     *
527c5e268c6Sopenharmony_ci     * Before using a layer on the GUI, you must open the layer based on the layer information. After the layer is
528c5e268c6Sopenharmony_ci     * opened, you can obtain the layer ID and then use other functions based on the layer ID.
529c5e268c6Sopenharmony_ci     *
530c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
531c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
532c5e268c6Sopenharmony_ci     * @param layerInfo Indicates the pointer to the layer information passed to open a layer, including the layer
533c5e268c6Sopenharmony_ci     * type, layer size, and pixel format.
534c5e268c6Sopenharmony_ci     * @param cacheCount Indicates the count of buffer cache.
535c5e268c6Sopenharmony_ci     * @param layerId Indicates the pointer to the layer ID, which uniquely identifies a layer. The layer ID is returned
536c5e268c6Sopenharmony_ci     * to the GUI after the layer is successfully opened.
537c5e268c6Sopenharmony_ci     *
538c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
539c5e268c6Sopenharmony_ci     * otherwise.
540c5e268c6Sopenharmony_ci     * @see DestroyLayer
541c5e268c6Sopenharmony_ci     * @since 4.0
542c5e268c6Sopenharmony_ci     * @version 1.0
543c5e268c6Sopenharmony_ci     */
544c5e268c6Sopenharmony_ci    virtual int32_t CreateLayer(uint32_t devId, const LayerInfo& layerInfo, uint32_t cacheCount, uint32_t& layerId) = 0;
545c5e268c6Sopenharmony_ci
546c5e268c6Sopenharmony_ci    /**
547c5e268c6Sopenharmony_ci     * @brief Closes a layer that is no longer required on a specified display device.
548c5e268c6Sopenharmony_ci     *
549c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
550c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
551c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
552c5e268c6Sopenharmony_ci     * with the specified layer ID.
553c5e268c6Sopenharmony_ci     *
554c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
555c5e268c6Sopenharmony_ci     * otherwise.
556c5e268c6Sopenharmony_ci     * @see OpenLayer
557c5e268c6Sopenharmony_ci     * @since 4.0
558c5e268c6Sopenharmony_ci     * @version 1.0
559c5e268c6Sopenharmony_ci     */
560c5e268c6Sopenharmony_ci    virtual int32_t DestroyLayer(uint32_t devId, uint32_t layerId) = 0;
561c5e268c6Sopenharmony_ci
562c5e268c6Sopenharmony_ci    /**
563c5e268c6Sopenharmony_ci    * @brief Prepares for the composition to be performed by a display device.
564c5e268c6Sopenharmony_ci    *
565c5e268c6Sopenharmony_ci    * Before the composition, the graphics service needs to notify the display device of the preparation to be made
566c5e268c6Sopenharmony_ci    * through this interface.
567c5e268c6Sopenharmony_ci    *
568c5e268c6Sopenharmony_ci    * @param devId Indicates the ID of the display device.
569c5e268c6Sopenharmony_ci    * @param needFlushFb Indicates the pointer that specifies whether the graphics service needs to reset the display
570c5e268c6Sopenharmony_ci    * framebuffer by using <b>SetDisplayClientBuffer</b> before the commit operation.
571c5e268c6Sopenharmony_ci    * The value <b>true</b> means that the framebuffer needs to be reset, and <b>false</b> means the opposite.
572c5e268c6Sopenharmony_ci    *
573c5e268c6Sopenharmony_ci    * @return Returns <b>0</b> if the operation is successful; returns an error code defined
574c5e268c6Sopenharmony_ci    * in {@link DispErrCode} otherwise.
575c5e268c6Sopenharmony_ci    * @since 4.0
576c5e268c6Sopenharmony_ci    * @version 1.0
577c5e268c6Sopenharmony_ci    */
578c5e268c6Sopenharmony_ci    virtual int32_t PrepareDisplayLayers(uint32_t devId, bool& needFlushFb) = 0;
579c5e268c6Sopenharmony_ci
580c5e268c6Sopenharmony_ci    /**
581c5e268c6Sopenharmony_ci     * @brief Sets the alpha value for a layer.
582c5e268c6Sopenharmony_ci     *
583c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
584c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
585c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
586c5e268c6Sopenharmony_ci     * with the specified layer ID.
587c5e268c6Sopenharmony_ci     * @param alpha Indicates the pointer to the alpha value to set.
588c5e268c6Sopenharmony_ci     *
589c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
590c5e268c6Sopenharmony_ci     * otherwise.
591c5e268c6Sopenharmony_ci     * @see GetLayerAlpha
592c5e268c6Sopenharmony_ci     * @since 4.0
593c5e268c6Sopenharmony_ci     * @version 1.0
594c5e268c6Sopenharmony_ci     */
595c5e268c6Sopenharmony_ci    virtual int32_t SetLayerAlpha(uint32_t devId, uint32_t layerId, const LayerAlpha& alpha) = 0;
596c5e268c6Sopenharmony_ci
597c5e268c6Sopenharmony_ci    /**
598c5e268c6Sopenharmony_ci     * @brief Sets the region for a layer.
599c5e268c6Sopenharmony_ci     *
600c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
601c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
602c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
603c5e268c6Sopenharmony_ci     * with the specified layer ID.
604c5e268c6Sopenharmony_ci     * @param rect Indicates the pointer to the region where set.
605c5e268c6Sopenharmony_ci     *
606c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
607c5e268c6Sopenharmony_ci     * otherwise.
608c5e268c6Sopenharmony_ci     * @see GetLayerAlpha
609c5e268c6Sopenharmony_ci     * @since 4.0
610c5e268c6Sopenharmony_ci     * @version 1.0
611c5e268c6Sopenharmony_ci     */
612c5e268c6Sopenharmony_ci    virtual int32_t SetLayerRegion(uint32_t devId, uint32_t layerId, const IRect& rect) = 0;
613c5e268c6Sopenharmony_ci
614c5e268c6Sopenharmony_ci    /**
615c5e268c6Sopenharmony_ci     * @brief Sets the rectangular area to crop for a layer.
616c5e268c6Sopenharmony_ci     *
617c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
618c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
619c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
620c5e268c6Sopenharmony_ci     * with the specified layer ID.
621c5e268c6Sopenharmony_ci     * @param rect Indicates the pointer to the rectangular area to crop.
622c5e268c6Sopenharmony_ci     *
623c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
624c5e268c6Sopenharmony_ci     * otherwise.
625c5e268c6Sopenharmony_ci     * @since 4.0
626c5e268c6Sopenharmony_ci     * @version 1.0
627c5e268c6Sopenharmony_ci     */
628c5e268c6Sopenharmony_ci    virtual int32_t SetLayerCrop(uint32_t devId, uint32_t layerId, const IRect& rect) = 0;
629c5e268c6Sopenharmony_ci
630c5e268c6Sopenharmony_ci    /**
631c5e268c6Sopenharmony_ci     * @brief Sets the z-order for a layer.
632c5e268c6Sopenharmony_ci     *
633c5e268c6Sopenharmony_ci     * A larger z-order value indicates a higher layer.
634c5e268c6Sopenharmony_ci     *
635c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
636c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
637c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
638c5e268c6Sopenharmony_ci     * with the specified layer ID.
639c5e268c6Sopenharmony_ci     * @param zorder Indicates the z-order to set. The value is an integer ranging from 0 to 255.
640c5e268c6Sopenharmony_ci     *
641c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
642c5e268c6Sopenharmony_ci     * otherwise.
643c5e268c6Sopenharmony_ci     * @see GetLayerZorder
644c5e268c6Sopenharmony_ci     * @since 4.0
645c5e268c6Sopenharmony_ci     * @version 1.0
646c5e268c6Sopenharmony_ci     */
647c5e268c6Sopenharmony_ci    virtual int32_t SetLayerZorder(uint32_t devId, uint32_t layerId, uint32_t zorder) = 0;
648c5e268c6Sopenharmony_ci
649c5e268c6Sopenharmony_ci    /**
650c5e268c6Sopenharmony_ci     * @brief Sets layer premultiplication.
651c5e268c6Sopenharmony_ci     *
652c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
653c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
654c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
655c5e268c6Sopenharmony_ci     * with the specified layer ID.
656c5e268c6Sopenharmony_ci     * @param preMul Specifies whether to enable layer premultiplication. The value <b>1</b> means to enable layer
657c5e268c6Sopenharmony_ci     * premultiplication, and <b>0</b> means the opposite.
658c5e268c6Sopenharmony_ci     *
659c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
660c5e268c6Sopenharmony_ci     * otherwise.
661c5e268c6Sopenharmony_ci     * @see GetLayerPreMulti
662c5e268c6Sopenharmony_ci     * @since 4.0
663c5e268c6Sopenharmony_ci     * @version 1.0
664c5e268c6Sopenharmony_ci     */
665c5e268c6Sopenharmony_ci    virtual int32_t SetLayerPreMulti(uint32_t devId, uint32_t layerId, bool preMul) = 0;
666c5e268c6Sopenharmony_ci
667c5e268c6Sopenharmony_ci    /**
668c5e268c6Sopenharmony_ci     * @brief Sets the type of graphic rotation.
669c5e268c6Sopenharmony_ci     *
670c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
671c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
672c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
673c5e268c6Sopenharmony_ci     * with the specified layer ID.
674c5e268c6Sopenharmony_ci     * @param type Indicates the transform types of images.
675c5e268c6Sopenharmony_ci     *
676c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
677c5e268c6Sopenharmony_ci     * otherwise.
678c5e268c6Sopenharmony_ci     * @since 4.0
679c5e268c6Sopenharmony_ci     * @version 1.0
680c5e268c6Sopenharmony_ci     */
681c5e268c6Sopenharmony_ci    virtual int32_t SetLayerTransformMode(uint32_t devId, uint32_t layerId, TransformType type) = 0;
682c5e268c6Sopenharmony_ci
683c5e268c6Sopenharmony_ci    /**
684c5e268c6Sopenharmony_ci     * @brief Sets the flushing area for a layer.
685c5e268c6Sopenharmony_ci     *
686c5e268c6Sopenharmony_ci     * After the GUI draws an image, you must set the layer flushing area before calling the {@link Flush} function to
687c5e268c6Sopenharmony_ci     * flush the screen.
688c5e268c6Sopenharmony_ci     *
689c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
690c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
691c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
692c5e268c6Sopenharmony_ci     * with the specified layer ID.
693c5e268c6Sopenharmony_ci     * @param regions Indicates the vector of the flushing area to set.
694c5e268c6Sopenharmony_ci     *
695c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
696c5e268c6Sopenharmony_ci     * otherwise.
697c5e268c6Sopenharmony_ci     * @since 4.0
698c5e268c6Sopenharmony_ci     * @version 1.0
699c5e268c6Sopenharmony_ci     */
700c5e268c6Sopenharmony_ci    virtual int32_t SetLayerDirtyRegion(uint32_t devId, uint32_t layerId, std::vector<IRect>& regions) = 0;
701c5e268c6Sopenharmony_ci
702c5e268c6Sopenharmony_ci    /**
703c5e268c6Sopenharmony_ci     * @brief Set the visible region for a layer
704c5e268c6Sopenharmony_ci     *
705c5e268c6Sopenharmony_ci     *
706c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
707c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
708c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
709c5e268c6Sopenharmony_ci     * with the specified layer ID.
710c5e268c6Sopenharmony_ci     * @param rects Indicates the vector of the rectes.
711c5e268c6Sopenharmony_ci     *
712c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
713c5e268c6Sopenharmony_ci     * otherwise.
714c5e268c6Sopenharmony_ci     * @since 2.0
715c5e268c6Sopenharmony_ci     * @version 2.0
716c5e268c6Sopenharmony_ci     */
717c5e268c6Sopenharmony_ci    virtual int32_t SetLayerVisibleRegion(uint32_t devId, uint32_t layerId, std::vector<IRect>& rects) = 0;
718c5e268c6Sopenharmony_ci
719c5e268c6Sopenharmony_ci    /**
720c5e268c6Sopenharmony_ci     * @brief Set the buffer for a layer.
721c5e268c6Sopenharmony_ci     *
722c5e268c6Sopenharmony_ci     *
723c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
724c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
725c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
726c5e268c6Sopenharmony_ci     * with the specified layer ID.
727c5e268c6Sopenharmony_ci     * @param buffer Indicates the pointer of the buffer handle. The buffer handle should contain all information of the
728c5e268c6Sopenharmony_ci     * buffer which will be used for composition.
729c5e268c6Sopenharmony_ci     * @param seqNo Indicates the sequence number of buffer cache.
730c5e268c6Sopenharmony_ci     * @param fence Indicates the fd of a sync file.
731c5e268c6Sopenharmony_ci     * @param deletingList Indicates the list of buffer cache to delete.
732c5e268c6Sopenharmony_ci     *
733c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
734c5e268c6Sopenharmony_ci     * otherwise.
735c5e268c6Sopenharmony_ci     * @since 2.0
736c5e268c6Sopenharmony_ci     * @version 2.0
737c5e268c6Sopenharmony_ci     */
738c5e268c6Sopenharmony_ci    virtual int32_t SetLayerBuffer(uint32_t devId, uint32_t layerId, const BufferHandle* buffer, uint32_t seqNo,
739c5e268c6Sopenharmony_ci        int32_t fence, const std::vector<uint32_t>& deletingList) = 0;
740c5e268c6Sopenharmony_ci
741c5e268c6Sopenharmony_ci    /**
742c5e268c6Sopenharmony_ci     * @brief set the composition type which the client expect
743c5e268c6Sopenharmony_ci     *
744c5e268c6Sopenharmony_ci     *
745c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
746c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
747c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
748c5e268c6Sopenharmony_ci     * with the specified layer ID.
749c5e268c6Sopenharmony_ci     * @param type Indicates the composition type which the client expect. It may vary with the implementation.
750c5e268c6Sopenharmony_ci     *
751c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
752c5e268c6Sopenharmony_ci     * otherwise.
753c5e268c6Sopenharmony_ci     * @since 2.0
754c5e268c6Sopenharmony_ci     * @version 2.0
755c5e268c6Sopenharmony_ci     */
756c5e268c6Sopenharmony_ci    virtual int32_t SetLayerCompositionType(uint32_t devId, uint32_t layerId, CompositionType type) = 0;
757c5e268c6Sopenharmony_ci
758c5e268c6Sopenharmony_ci    /**
759c5e268c6Sopenharmony_ci     * @brief set the blend type
760c5e268c6Sopenharmony_ci     *
761c5e268c6Sopenharmony_ci     *
762c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
763c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
764c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
765c5e268c6Sopenharmony_ci     * with the specified layer ID.
766c5e268c6Sopenharmony_ci     * @param type Indicates blend type
767c5e268c6Sopenharmony_ci     *
768c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
769c5e268c6Sopenharmony_ci     * otherwise.
770c5e268c6Sopenharmony_ci     * @since 2.0
771c5e268c6Sopenharmony_ci     * @version 2.0
772c5e268c6Sopenharmony_ci     */
773c5e268c6Sopenharmony_ci    virtual int32_t SetLayerBlendType(uint32_t devId, uint32_t layerId, BlendType type) = 0;
774c5e268c6Sopenharmony_ci
775c5e268c6Sopenharmony_ci    /**
776c5e268c6Sopenharmony_ci     * @brief Sets a 4x4 color transformation matrix.
777c5e268c6Sopenharmony_ci     *
778c5e268c6Sopenharmony_ci     *
779c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
780c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
781c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
782c5e268c6Sopenharmony_ci     * with the specified layer ID.
783c5e268c6Sopenharmony_ci     * @param matrix Indicates the 4x4 color transformation matrix.
784c5e268c6Sopenharmony_ci     *
785c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
786c5e268c6Sopenharmony_ci     * otherwise.
787c5e268c6Sopenharmony_ci     * @since 4.0
788c5e268c6Sopenharmony_ci     * @version 1.0
789c5e268c6Sopenharmony_ci     */
790c5e268c6Sopenharmony_ci    virtual int32_t SetLayerColorTransform(uint32_t devId, uint32_t layerId, const std::vector<float>& matrix) = 0;
791c5e268c6Sopenharmony_ci
792c5e268c6Sopenharmony_ci    /**
793c5e268c6Sopenharmony_ci     * @brief Sets a color data space for a layer.
794c5e268c6Sopenharmony_ci     *
795c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
796c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
797c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
798c5e268c6Sopenharmony_ci     * with the specified layer ID.
799c5e268c6Sopenharmony_ci     * @param colorSpace Indicates the color data space to set.
800c5e268c6Sopenharmony_ci     *
801c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
802c5e268c6Sopenharmony_ci     * otherwise.
803c5e268c6Sopenharmony_ci     * @since 4.0
804c5e268c6Sopenharmony_ci     * @version 1.0
805c5e268c6Sopenharmony_ci     */
806c5e268c6Sopenharmony_ci    virtual int32_t SetLayerColorDataSpace(uint32_t devId, uint32_t layerId, const ColorDataSpace colorSpace) = 0;
807c5e268c6Sopenharmony_ci
808c5e268c6Sopenharmony_ci    /**
809c5e268c6Sopenharmony_ci     * @brief Obtains the color data space of a layer.
810c5e268c6Sopenharmony_ci     *
811c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
812c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
813c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
814c5e268c6Sopenharmony_ci     * with the specified layer ID.
815c5e268c6Sopenharmony_ci     * @param colorSpace Indicates the pointer to the color data space obtained.
816c5e268c6Sopenharmony_ci     *
817c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
818c5e268c6Sopenharmony_ci     * otherwise.
819c5e268c6Sopenharmony_ci     * @since 4.0
820c5e268c6Sopenharmony_ci     * @version 1.0
821c5e268c6Sopenharmony_ci     */
822c5e268c6Sopenharmony_ci    virtual int32_t GetLayerColorDataSpace(uint32_t devId, uint32_t layerId, ColorDataSpace& colorSpace) = 0;
823c5e268c6Sopenharmony_ci
824c5e268c6Sopenharmony_ci    /**
825c5e268c6Sopenharmony_ci     * @brief Sets metadata for a layer.
826c5e268c6Sopenharmony_ci     *
827c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
828c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
829c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
830c5e268c6Sopenharmony_ci     * with the specified layer ID.
831c5e268c6Sopenharmony_ci     * @param num Indicates the number of metadata records.
832c5e268c6Sopenharmony_ci     * @param metaData Indicates the vecter of the metadata to set.
833c5e268c6Sopenharmony_ci     *
834c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
835c5e268c6Sopenharmony_ci     * otherwise.
836c5e268c6Sopenharmony_ci     * @since 4.0
837c5e268c6Sopenharmony_ci     * @version 1.0
838c5e268c6Sopenharmony_ci     */
839c5e268c6Sopenharmony_ci    virtual int32_t SetLayerMetaData(uint32_t devId, uint32_t layerId, const std::vector<HDRMetaData>& metaData) = 0;
840c5e268c6Sopenharmony_ci
841c5e268c6Sopenharmony_ci    /**
842c5e268c6Sopenharmony_ci     * @brief Sets a metadata set for a layer.
843c5e268c6Sopenharmony_ci     *
844c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
845c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
846c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
847c5e268c6Sopenharmony_ci     * with the specified layer ID.
848c5e268c6Sopenharmony_ci     * @param key Indicates the metadata key.
849c5e268c6Sopenharmony_ci     * @param metaData Indicates the vector of the metadata set of the uint8_t type to set.
850c5e268c6Sopenharmony_ci     *
851c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
852c5e268c6Sopenharmony_ci     * otherwise.
853c5e268c6Sopenharmony_ci     * @since 4.0
854c5e268c6Sopenharmony_ci     * @version 1.0
855c5e268c6Sopenharmony_ci     */
856c5e268c6Sopenharmony_ci    virtual int32_t SetLayerMetaDataSet(uint32_t devId, uint32_t layerId, HDRMetadataKey key,
857c5e268c6Sopenharmony_ci         const std::vector<uint8_t>& metaData) = 0;
858c5e268c6Sopenharmony_ci
859c5e268c6Sopenharmony_ci    /**
860c5e268c6Sopenharmony_ci     * @brief Obtains the hardware display present timestamp type supported by a layer.
861c5e268c6Sopenharmony_ci     *
862c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
863c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
864c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
865c5e268c6Sopenharmony_ci     * with the specified layer ID.
866c5e268c6Sopenharmony_ci     * @param type Indicates the pointer to the present timestamp type obtained.
867c5e268c6Sopenharmony_ci     *
868c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
869c5e268c6Sopenharmony_ci     * otherwise.
870c5e268c6Sopenharmony_ci     * @since 4.0
871c5e268c6Sopenharmony_ci     * @version 1.0
872c5e268c6Sopenharmony_ci     */
873c5e268c6Sopenharmony_ci    virtual int32_t GetSupportedPresentTimestamp(uint32_t devId, uint32_t layerId, PresentTimestampType& type) = 0;
874c5e268c6Sopenharmony_ci
875c5e268c6Sopenharmony_ci    /**
876c5e268c6Sopenharmony_ci     * @brief Obtains the hardware display present timestamp of a layer.
877c5e268c6Sopenharmony_ci     *
878c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
879c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
880c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
881c5e268c6Sopenharmony_ci     * with the specified layer ID.
882c5e268c6Sopenharmony_ci     * @param pts Indicates the pointer to the present timestamp obtained.
883c5e268c6Sopenharmony_ci     *
884c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
885c5e268c6Sopenharmony_ci     * otherwise.
886c5e268c6Sopenharmony_ci     * @since 4.0
887c5e268c6Sopenharmony_ci     * @version 1.0
888c5e268c6Sopenharmony_ci     */
889c5e268c6Sopenharmony_ci    virtual int32_t GetHwPresentTimestamp(uint32_t devId, uint32_t layerId, PresentTimestamp& pts) = 0;
890c5e268c6Sopenharmony_ci
891c5e268c6Sopenharmony_ci    /**
892c5e268c6Sopenharmony_ci     * @brief Sets a tunnel handle for a layer.
893c5e268c6Sopenharmony_ci     *
894c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
895c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
896c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
897c5e268c6Sopenharmony_ci     * with the specified layer ID.
898c5e268c6Sopenharmony_ci     * @param handle Indicates the handle of ExtDataHandle.
899c5e268c6Sopenharmony_ci     *
900c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
901c5e268c6Sopenharmony_ci     * otherwise.
902c5e268c6Sopenharmony_ci     * @since 3.2
903c5e268c6Sopenharmony_ci     * @version 1.0
904c5e268c6Sopenharmony_ci     */
905c5e268c6Sopenharmony_ci    virtual int32_t SetLayerTunnelHandle(uint32_t devId, uint32_t layerId, const ExtDataHandle& handle) = 0;
906c5e268c6Sopenharmony_ci
907c5e268c6Sopenharmony_ci    /**
908c5e268c6Sopenharmony_ci     * @brief Sets the current mask frame information to the vendor driver.
909c5e268c6Sopenharmony_ci     *
910c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
911c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
912c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
913c5e268c6Sopenharmony_ci     * with the specified layer ID.
914c5e268c6Sopenharmony_ci     * @param maskInfo Indicates the contains all of the information for a single mask.
915c5e268c6Sopenharmony_ci     *
916c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
917c5e268c6Sopenharmony_ci     * otherwise.
918c5e268c6Sopenharmony_ci     * @since 3.2
919c5e268c6Sopenharmony_ci     * @version 1.0
920c5e268c6Sopenharmony_ci     */
921c5e268c6Sopenharmony_ci    virtual int32_t SetLayerMaskInfo(uint32_t devId, uint32_t layerId, const MaskInfo maskInfo) = 0;
922c5e268c6Sopenharmony_ci
923c5e268c6Sopenharmony_ci    /**
924c5e268c6Sopenharmony_ci     * @brief Sets the solid color layer.
925c5e268c6Sopenharmony_ci     *
926c5e268c6Sopenharmony_ci     * @param devId Indicates the ID of the display device. The value ranges from 0 to 4, where 0 indicates the first
927c5e268c6Sopenharmony_ci     * display device, and 4 indicates the last display device.
928c5e268c6Sopenharmony_ci     * @param layerId Indicates the layer ID, which uniquely identifies a layer. You can perform operations on the layer
929c5e268c6Sopenharmony_ci     * with the specified layer ID.
930c5e268c6Sopenharmony_ci     * @param layerColor Indicates the current color.
931c5e268c6Sopenharmony_ci     *
932c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns an error code defined in {@link DispErrCode}
933c5e268c6Sopenharmony_ci     * otherwise.
934c5e268c6Sopenharmony_ci     * @since 3.2
935c5e268c6Sopenharmony_ci     * @version 1.0
936c5e268c6Sopenharmony_ci     */
937c5e268c6Sopenharmony_ci    virtual int32_t SetLayerColor(uint32_t devId, uint32_t layerId, const LayerColor& layerColor) = 0;
938c5e268c6Sopenharmony_ci};
939c5e268c6Sopenharmony_ci} // V1_0
940c5e268c6Sopenharmony_ci} // Composer
941c5e268c6Sopenharmony_ci} // Display
942c5e268c6Sopenharmony_ci} // HDI
943c5e268c6Sopenharmony_ci} // OHOS
944c5e268c6Sopenharmony_ci#endif // OHOS_HDI_DISPLAY_V1_0_IDISPLAY_COMPOSER_INTERFACE_H
945