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