• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2024 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/graphic/graphic_2d/graphic_config.gni")
16
17config("create_pixelmap_surface_public_config") {
18  include_dirs = [
19    "include",
20    "$graphic_2d_root/rosen/modules/render_service_base/include",
21    "$graphic_2d_root/rosen/modules/render_service_base/src",
22    "$graphic_2d_root/rosen/modules/2d_graphics/src/drawing/engine_adapter",
23  ]
24  defines = gpu_defines
25}
26
27ohos_source_set("create_pixelmap_surface_src") {
28  sanitize = {
29    cfi = true
30    cfi_cross_dso = true
31    cfi_vcall_icall_only = true
32    debug = false
33    boundary_sanitize = true
34    integer_overflow = true
35    ubsan = true
36  }
37
38  public_configs = [ ":create_pixelmap_surface_public_config" ]
39  sources = [ "src/pixel_map_from_surface.cpp" ]
40
41  deps = [
42    "$graphic_2d_root/frameworks/opengl_wrapper:EGL",
43    "$graphic_2d_root/frameworks/opengl_wrapper:GLESv3",
44    "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics",
45    "$graphic_2d_root/rosen/modules/render_service_base:librender_service_base",
46    "$graphic_2d_root/utils:scoped_bytrace",
47  ]
48
49  external_deps = [ "graphic_surface:sync_fence" ]
50
51  if (use_video_processing_engine) {
52    defines = [ "USE_VIDEO_PROCESSING_ENGINE" ]
53    external_deps += [ "video_processing_engine:videoprocessingengine" ]
54  }
55
56  subsystem_name = "graphic"
57  part_name = "graphic_2d"
58}
59
60ohos_shared_library("create_pixelmap_surface") {
61  sanitize = {
62    cfi = true
63    cfi_cross_dso = true
64    cfi_vcall_icall_only = true
65    debug = false
66  }
67
68  public_configs = [ ":create_pixelmap_surface_public_config" ]
69
70  deps = [ ":create_pixelmap_surface_src" ]
71
72  external_deps = [
73    "c_utils:utils",
74    "graphic_surface:surface",
75    "hilog:libhilog",
76    "hitrace:hitrace_meter",
77    "image_framework:image_native",
78  ]
79
80  subsystem_name = "graphic"
81  part_name = "graphic_2d"
82}
83
84group("test") {
85  testonly = true
86
87  deps = [ "test:test" ]
88}
89