1 /* 2 * Copyright (c) 2025 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_3_IDISPLAY_BUFFER_H 17 #define OHOS_HDI_DISPLAY_V1_3_IDISPLAY_BUFFER_H 18 19 #include "v1_0/include/idisplay_buffer.h" 20 #include "v1_1/include/idisplay_buffer.h" 21 #include "v1_2/include/idisplay_buffer.h" 22 23 namespace OHOS { 24 namespace HDI { 25 namespace Display { 26 namespace Buffer { 27 namespace V1_3 { 28 class IDisplayBuffer : public V1_2::IDisplayBuffer { 29 public: 30 virtual ~IDisplayBuffer() = default; 31 32 /** 33 * @brief Obtains all interfaces of IDisplayBuffer. 34 * 35 * @return Returns <b>IDisplayBuffer*</b> if the operation is successful; returns an null point otherwise. 36 * @since 5.0 37 * @version 1.2 38 */ 39 static IDisplayBuffer *Get(); 40 virtual int32_t AllocMem(const V1_0::AllocInfo& info, BufferHandle*& handle) const = 0; 41 virtual int32_t ReAllocMem(const V1_0::AllocInfo& info, const BufferHandle& inHandle, 42 BufferHandle*& outHandle) const = 0; 43 }; 44 } // namespace V1_3 45 } // namespace Buffer 46 } // namespace Display 47 } // namespace HDI 48 } // namespace OHOS 49 50 #endif // OHOS_HDI_DISPLAY_V1_3_IDISPLAY_BUFFER_H 51