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 subsystem_name = "graphic" 52 part_name = "graphic_2d" 53} 54 55ohos_shared_library("create_pixelmap_surface") { 56 sanitize = { 57 cfi = true 58 cfi_cross_dso = true 59 cfi_vcall_icall_only = true 60 debug = false 61 } 62 63 public_configs = [ ":create_pixelmap_surface_public_config" ] 64 65 deps = [ ":create_pixelmap_surface_src" ] 66 67 external_deps = [ 68 "c_utils:utils", 69 "graphic_surface:surface", 70 "hilog:libhilog", 71 "hitrace:hitrace_meter", 72 "image_framework:image_native", 73 ] 74 75 subsystem_name = "graphic" 76 part_name = "graphic_2d" 77} 78 79group("test") { 80 testonly = true 81 82 deps = [ "test:test" ] 83} 84