# Copyright (C) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/graphic/graphic_2d/graphic_config.gni") config("create_pixelmap_surface_public_config") { include_dirs = [ "include", "$graphic_2d_root/rosen/modules/render_service_base/include", "$graphic_2d_root/rosen/modules/render_service_base/src", "$graphic_2d_root/rosen/modules/2d_graphics/src/drawing/engine_adapter", ] defines = gpu_defines } ohos_source_set("create_pixelmap_surface_src") { sanitize = { cfi = true cfi_cross_dso = true cfi_vcall_icall_only = true debug = false boundary_sanitize = true integer_overflow = true ubsan = true } public_configs = [ ":create_pixelmap_surface_public_config" ] sources = [ "src/pixel_map_from_surface.cpp" ] deps = [ "$graphic_2d_root/frameworks/opengl_wrapper:EGL", "$graphic_2d_root/frameworks/opengl_wrapper:GLESv3", "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics", "$graphic_2d_root/rosen/modules/render_service_base:librender_service_base", "$graphic_2d_root/utils:scoped_bytrace", ] external_deps = [ "graphic_surface:sync_fence" ] subsystem_name = "graphic" part_name = "graphic_2d" } ohos_shared_library("create_pixelmap_surface") { sanitize = { cfi = true cfi_cross_dso = true cfi_vcall_icall_only = true debug = false } public_configs = [ ":create_pixelmap_surface_public_config" ] deps = [ ":create_pixelmap_surface_src" ] external_deps = [ "c_utils:utils", "graphic_surface:surface", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", ] subsystem_name = "graphic" part_name = "graphic_2d" } group("test") { testonly = true deps = [ "test:test" ] }