• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 SKIA_IMPLFACTORY_H
17 #define SKIA_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/image_filter_impl.h"
25 #include "impl_interface/image_impl.h"
26 #include "impl_interface/mask_filter_impl.h"
27 #include "impl_interface/matrix_impl.h"
28 #include "impl_interface/path_effect_impl.h"
29 #include "impl_interface/path_impl.h"
30 #include "impl_interface/picture_impl.h"
31 #include "impl_interface/shader_effect_impl.h"
32 
33 namespace OHOS {
34 namespace Rosen {
35 namespace Drawing {
36 class SkiaImplFactory {
37 public:
38     static std::unique_ptr<CoreCanvasImpl> CreateCoreCanvas();
39     static std::unique_ptr<CoreCanvasImpl> CreateCoreCanvas(void* rawCanvas);
40     static std::unique_ptr<BitmapImpl> CreateBitmap();
41     static std::unique_ptr<ImageImpl> CreateImage();
42     static std::unique_ptr<ImageImpl> CreateImage(void* rawImg);
43     static std::unique_ptr<PictureImpl> CreatePicture();
44     static std::unique_ptr<PathImpl> CreatePath();
45     static std::unique_ptr<ColorFilterImpl> CreateColorFilter();
46     static std::unique_ptr<MaskFilterImpl> CreateMaskFilter();
47     static std::unique_ptr<ImageFilterImpl> CreateImageFilter();
48     static std::unique_ptr<ShaderEffectImpl> CreateShaderEffect();
49     static std::unique_ptr<PathEffectImpl> CreatePathEffect();
50     static std::unique_ptr<ColorSpaceImpl> CreateColorSpace();
51     static std::unique_ptr<MatrixImpl> CreateMatrix();
52     static std::unique_ptr<CameraImpl> CreateCamera();
53 };
54 } // namespace Drawing
55 } // namespace Rosen
56 } // namespace OHOS
57 #endif