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