• 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  deps = [ "$image_subsystem/interfaces/innerkits:image_native" ]
46
47  external_deps = [
48    "c_utils:utils",
49    "graphic_2d:EGL",
50    "graphic_2d:GLESv3",
51    "graphic_surface:surface",
52    "graphic_surface:sync_fence",
53    "hilog:libhilog",
54    "hitrace:hitrace_meter",
55    "ipc:ipc_single",
56    "skia:skia_canvaskit",
57  ]
58
59  innerapi_tags = [ "platformsdk" ]
60  subsystem_name = "multimedia"
61  part_name = "image_framework"
62}
63
64if (!use_clang_ios && !use_clang_android) {
65  ohos_shared_library("post_proc_gl") {
66    sanitize = {
67      cfi = true
68      cfi_cross_dso = true
69      cfi_vcall_icall_only = true
70      debug = false
71    }
72    include_dirs = [
73      "include",
74      "../../../interfaces/innerkits/include",
75      "../../../interfaces/utils/include",
76      "../utils/include",
77    ]
78    sources = [
79      "../utils/src/image_trace.cpp",
80      "src/pixel_map_gl_context.cpp",
81      "src/pixel_map_gl_post_proc_program.cpp",
82      "src/pixel_map_gl_shader.cpp",
83      "src/pixel_map_program_manager.cpp",
84    ]
85
86    public_external_deps = [
87      "c_utils:utils",
88      "drivers_peripheral_display:hdi_gralloc_client",
89      "graphic_2d:EGL",
90      "graphic_2d:GLESv3",
91      "graphic_2d:color_manager",
92      "graphic_surface:surface",
93      "graphic_surface:sync_fence",
94      "hilog:libhilog",
95      "hitrace:hitrace_meter",
96      "skia:skia_canvaskit",
97    ]
98
99    innerapi_tags = [ "platformsdk" ]
100    subsystem_name = "multimedia"
101    part_name = "image_framework"
102  }
103}
104