• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2023 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//foundation/multimedia/image_framework/ide/image_decode_config.gni")
16
17config("egl_image_public_config") {
18  include_dirs = [ "include" ]
19}
20
21config("egl_image_private_config") {
22  defines = [
23    "SK_SUPPORT_GPU=1",
24    "GR_TEST_UTILS=1",
25    "SK_GL=1",
26  ]
27}
28
29ohos_shared_library("egl_image") {
30  branch_protector_ret = "pac_ret"
31  sanitize = {
32    cfi = true
33    cfi_cross_dso = true
34    cfi_vcall_icall_only = true
35    debug = false
36  }
37
38  public_configs = [ ":egl_image_public_config" ]
39  configs = [ ":egl_image_private_config" ]
40  sources = [
41    "src/pixel_map_from_surface.cpp",
42    "src/render_context.cpp",
43  ]
44
45  if (image_use_new_skia) {
46    defines = [ "USE_M133_SKIA" ]
47  }
48  deps = [ "$image_subsystem/interfaces/innerkits:image_native" ]
49
50  external_deps = [
51    "c_utils:utils",
52    "graphic_2d:EGL",
53    "graphic_2d:GLESv3",
54    "graphic_surface:surface",
55    "graphic_surface:sync_fence",
56    "hilog:libhilog",
57    "hitrace:hitrace_meter",
58    "ipc:ipc_single",
59    "skia:skia_canvaskit",
60  ]
61
62  innerapi_tags = [ "platformsdk" ]
63  subsystem_name = "multimedia"
64  part_name = "image_framework"
65}
66
67if (!use_clang_ios && !use_clang_android) {
68  ohos_shared_library("post_proc_gl") {
69    sanitize = {
70      cfi = true
71      cfi_cross_dso = true
72      cfi_vcall_icall_only = true
73      debug = false
74    }
75    include_dirs = [
76      "include",
77      "../../../interfaces/innerkits/include",
78      "../../../interfaces/utils/include",
79      "../utils/include",
80    ]
81    sources = [
82      "../utils/src/image_trace.cpp",
83      "src/pixel_map_gl_context.cpp",
84      "src/pixel_map_gl_post_proc_program.cpp",
85      "src/pixel_map_gl_shader.cpp",
86      "src/pixel_map_program_manager.cpp",
87    ]
88    if (image_use_new_skia) {
89      defines = [ "USE_M133_SKIA" ]
90    }
91    external_deps = [
92      "ipc:ipc_single",
93      "c_utils:utils",
94    ]
95    public_external_deps = [
96      "graphic_2d:EGL",
97      "graphic_2d:GLESv3",
98      "graphic_2d:color_manager",
99      "graphic_surface:surface",
100      "graphic_surface:sync_fence",
101      "hilog:libhilog",
102      "hitrace:hitrace_meter",
103      "skia:skia_canvaskit",
104    ]
105
106    innerapi_tags = [ "platformsdk" ]
107    subsystem_name = "multimedia"
108    part_name = "image_framework"
109  }
110}
111