• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2023 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 IMPLFACTORY_H
17 #define IMPLFACTORY_H
18 
19 #include "impl_interface/bitmap_impl.h"
20 #include "impl_interface/camera_impl.h"
21 #include "impl_interface/color_filter_impl.h"
22 #include "impl_interface/color_space_impl.h"
23 #include "impl_interface/core_canvas_impl.h"
24 #include "impl_interface/data_impl.h"
25 #ifdef ACE_ENABLE_GPU
26 #include "impl_interface/gpu_context_impl.h"
27 #endif
28 #include "impl_interface/image_filter_impl.h"
29 #include "impl_interface/image_impl.h"
30 #include "impl_interface/mask_filter_impl.h"
31 #include "impl_interface/matrix_impl.h"
32 #include "impl_interface/matrix44_impl.h"
33 #include "impl_interface/path_effect_impl.h"
34 #include "impl_interface/path_impl.h"
35 #include "impl_interface/picture_impl.h"
36 #include "impl_interface/region_impl.h"
37 #include "impl_interface/shader_effect_impl.h"
38 #include "impl_interface/surface_impl.h"
39 
40 namespace OHOS {
41 namespace Rosen {
42 namespace Drawing {
43 class ImplFactory {
44 public:
45     static std::unique_ptr<CoreCanvasImpl> CreateCoreCanvasImpl();
46     static std::unique_ptr<CoreCanvasImpl> CreateCoreCanvasImpl(void* rawCanvas);
47     static std::unique_ptr<CoreCanvasImpl> CreateCoreCanvasImpl(int32_t width, int32_t height);
48     static std::unique_ptr<DataImpl> CreateDataImpl();
49 #ifdef ACE_ENABLE_GPU
50     static std::unique_ptr<GPUContextImpl> CreateGPUContextImpl();
51 #endif
52     static std::unique_ptr<BitmapImpl> CreateBitmapImpl();
53     static std::unique_ptr<ImageImpl> CreateImageImpl();
54     static std::unique_ptr<ImageImpl> CreateImageImpl(void* rawImage);
55     static std::unique_ptr<PathImpl> CreatePathImpl();
56     static std::unique_ptr<ColorFilterImpl> CreateColorFilterImpl();
57     static std::unique_ptr<MaskFilterImpl> CreateMaskFilterImpl();
58     static std::unique_ptr<ImageFilterImpl> CreateImageFilterImpl();
59     static std::unique_ptr<PictureImpl> CreatePictureImpl();
60     static std::unique_ptr<ShaderEffectImpl> CreateShaderEffectImpl();
61     static std::unique_ptr<SurfaceImpl> CreateSurfaceImpl();
62     static std::unique_ptr<PathEffectImpl> CreatePathEffectImpl();
63     static std::unique_ptr<ColorSpaceImpl> CreateColorSpaceImpl();
64     static std::unique_ptr<MatrixImpl> CreateMatrixImpl();
65     static std::unique_ptr<Matrix44Impl> CreateMatrix44Impl();
66     static std::unique_ptr<CameraImpl> CreateCameraImpl();
67     static std::unique_ptr<RegionImpl> CreateRegionImpl();
68 };
69 } // namespace Drawing
70 } // namespace Rosen
71 } // namespace OHOS
72 #endif
73