1bafb9395Sopenharmony_ci/*
2bafb9395Sopenharmony_ci * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3bafb9395Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4bafb9395Sopenharmony_ci * you may not use this file except in compliance with the License.
5bafb9395Sopenharmony_ci * You may obtain a copy of the License at
6bafb9395Sopenharmony_ci *
7bafb9395Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8bafb9395Sopenharmony_ci *
9bafb9395Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10bafb9395Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11bafb9395Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12bafb9395Sopenharmony_ci * See the License for the specific language governing permissions and
13bafb9395Sopenharmony_ci * limitations under the License.
14bafb9395Sopenharmony_ci */
15bafb9395Sopenharmony_ci
16bafb9395Sopenharmony_ci#ifndef GRAPHIC_LITE_GFX_ENGINES_H
17bafb9395Sopenharmony_ci#define GRAPHIC_LITE_GFX_ENGINES_H
18bafb9395Sopenharmony_ci
19bafb9395Sopenharmony_ci#include "lite_wm_type.h"
20bafb9395Sopenharmony_ci#include "display_gfx.h"
21bafb9395Sopenharmony_ci#include "display_type.h"
22bafb9395Sopenharmony_ci#include "gfx_utils/color.h"
23bafb9395Sopenharmony_ci#include "gfx_utils/geometry2d.h"
24bafb9395Sopenharmony_ci
25bafb9395Sopenharmony_cinamespace OHOS {
26bafb9395Sopenharmony_ciclass GfxEngines {
27bafb9395Sopenharmony_cipublic:
28bafb9395Sopenharmony_ci    static GfxEngines* GetInstance();
29bafb9395Sopenharmony_ci
30bafb9395Sopenharmony_ci    bool InitDriver();
31bafb9395Sopenharmony_ci    void CloseDriver();
32bafb9395Sopenharmony_ci
33bafb9395Sopenharmony_ci    bool GfxFillArea(const LiteSurfaceData& dstSurfaceData,
34bafb9395Sopenharmony_ci                     const Rect& fillArea,
35bafb9395Sopenharmony_ci                     const ColorType& color,
36bafb9395Sopenharmony_ci                     const OpacityType& opa);
37bafb9395Sopenharmony_ci
38bafb9395Sopenharmony_ci    bool GfxBlit(const LiteSurfaceData& srcSurfaceData,
39bafb9395Sopenharmony_ci                 const Rect& srcRect,
40bafb9395Sopenharmony_ci                 const LiteSurfaceData& dstSurfaceData,
41bafb9395Sopenharmony_ci                 int16_t x,
42bafb9395Sopenharmony_ci                 int16_t y);
43bafb9395Sopenharmony_ciprivate:
44bafb9395Sopenharmony_ci    GfxEngines() : gfxFuncs_(nullptr) {}
45bafb9395Sopenharmony_ci    virtual ~GfxEngines() {}
46bafb9395Sopenharmony_ci    GfxFuncs* gfxFuncs_;
47bafb9395Sopenharmony_ci};
48bafb9395Sopenharmony_ci} // namespace OHOS
49bafb9395Sopenharmony_ci#endif
50