1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef OHOS_HDI_DISPLAY_V1_2_IDISPLAY_BUFFER_H
17#define OHOS_HDI_DISPLAY_V1_2_IDISPLAY_BUFFER_H
18
19#include "v1_0/include/idisplay_buffer.h"
20#include "v1_1/include/idisplay_buffer.h"
21
22namespace OHOS {
23namespace HDI {
24namespace Display {
25namespace Buffer {
26namespace V1_2 {
27class IDisplayBuffer : public V1_1::IDisplayBuffer {
28public:
29    virtual ~IDisplayBuffer() = default;
30
31    /**
32     * @brief Obtains all interfaces of IDisplayBuffer.
33     *
34     * @return Returns <b>IDisplayBuffer*</b> if the operation is successful; returns an null point otherwise.
35     * @since 5.0
36     * @version 1.2
37     */
38    static IDisplayBuffer *Get();
39    virtual int32_t GetImageLayout(const BufferHandle& handle, ImageLayout& layout) const  = 0;
40};
41} // namespace V1_2
42} // namespace Buffer
43} // namespace Display
44} // namespace HDI
45} // namespace OHOS
46
47#endif // OHOS_HDI_DISPLAY_V1_1_IDISPLAY_BUFFER_H
48