1 /* 2 * Copyright (c) 2020-2021 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 GRAPHIC_LITE_ISURFACE_H 17 #define GRAPHIC_LITE_ISURFACE_H 18 19 #include "gfx_utils/geometry2d.h" 20 21 namespace OHOS { 22 /** 23 * @brief The ISurface class is an abstract definition of surface. 24 * Interface to a surface object, being a graphics context for rendering and state control, 25 * buffer operations, palette access. 26 */ 27 class ISurface { 28 public: ISurface()29 ISurface() {} 30 ~ISurface()31 virtual ~ISurface() {} 32 33 virtual void Lock(void** buf, void** phyMem, uint32_t* strideLen) = 0; 34 35 /** 36 * @brief Unlock the surface. 37 */ 38 virtual void Unlock() = 0; 39 }; 40 } // namespace OHOS 41 #endif // GRAPHIC_LITE_ISURFACE_H