162b8cbc9Sopenharmony_ci/* 262b8cbc9Sopenharmony_ci * Copyright (c) 2020-2021 Huawei Device Co., Ltd. 362b8cbc9Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 462b8cbc9Sopenharmony_ci * you may not use this file except in compliance with the License. 562b8cbc9Sopenharmony_ci * You may obtain a copy of the License at 662b8cbc9Sopenharmony_ci * 762b8cbc9Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 862b8cbc9Sopenharmony_ci * 962b8cbc9Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1062b8cbc9Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1162b8cbc9Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1262b8cbc9Sopenharmony_ci * See the License for the specific language governing permissions and 1362b8cbc9Sopenharmony_ci * limitations under the License. 1462b8cbc9Sopenharmony_ci */ 1562b8cbc9Sopenharmony_ci 1662b8cbc9Sopenharmony_ci#ifndef GRAPHIC_LITE_ISURFACE_H 1762b8cbc9Sopenharmony_ci#define GRAPHIC_LITE_ISURFACE_H 1862b8cbc9Sopenharmony_ci 1962b8cbc9Sopenharmony_ci#include "gfx_utils/geometry2d.h" 2062b8cbc9Sopenharmony_ci 2162b8cbc9Sopenharmony_cinamespace OHOS { 2262b8cbc9Sopenharmony_ci/** 2362b8cbc9Sopenharmony_ci * @brief The ISurface class is an abstract definition of surface. 2462b8cbc9Sopenharmony_ci * Interface to a surface object, being a graphics context for rendering and state control, 2562b8cbc9Sopenharmony_ci * buffer operations, palette access. 2662b8cbc9Sopenharmony_ci */ 2762b8cbc9Sopenharmony_ciclass ISurface { 2862b8cbc9Sopenharmony_cipublic: 2962b8cbc9Sopenharmony_ci ISurface() {} 3062b8cbc9Sopenharmony_ci 3162b8cbc9Sopenharmony_ci virtual ~ISurface() {} 3262b8cbc9Sopenharmony_ci 3362b8cbc9Sopenharmony_ci virtual void Lock(void** buf, void** phyMem, uint32_t* strideLen) = 0; 3462b8cbc9Sopenharmony_ci 3562b8cbc9Sopenharmony_ci /** 3662b8cbc9Sopenharmony_ci * @brief Unlock the surface. 3762b8cbc9Sopenharmony_ci */ 3862b8cbc9Sopenharmony_ci virtual void Unlock() = 0; 3962b8cbc9Sopenharmony_ci}; 4062b8cbc9Sopenharmony_ci} // namespace OHOS 4162b8cbc9Sopenharmony_ci#endif // GRAPHIC_LITE_ISURFACE_H