1e9297d28Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 2e9297d28Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3e9297d28Sopenharmony_ci# you may not use this file except in compliance with the License. 4e9297d28Sopenharmony_ci# You may obtain a copy of the License at 5e9297d28Sopenharmony_ci# 6e9297d28Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7e9297d28Sopenharmony_ci# 8e9297d28Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9e9297d28Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10e9297d28Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11e9297d28Sopenharmony_ci# See the License for the specific language governing permissions and 12e9297d28Sopenharmony_ci# limitations under the License. 13e9297d28Sopenharmony_ci 14e9297d28Sopenharmony_ciimport("//build/ohos.gni") 15e9297d28Sopenharmony_ciimport("//foundation/graphic/graphic_2d/graphic_config.gni") 16e9297d28Sopenharmony_ciimport("//foundation/graphic/graphic_2d/rosen/modules/effect/effect_config.gni") 17e9297d28Sopenharmony_ci 18e9297d28Sopenharmony_ci## Build libeffectchain.so 19e9297d28Sopenharmony_ci 20e9297d28Sopenharmony_ciconfig("effect_config") { 21e9297d28Sopenharmony_ci cflags = [ 22e9297d28Sopenharmony_ci "-Wall", 23e9297d28Sopenharmony_ci "-Werror", 24e9297d28Sopenharmony_ci "-g3", 25e9297d28Sopenharmony_ci "-Wall", 26e9297d28Sopenharmony_ci "-Wno-pointer-arith", 27e9297d28Sopenharmony_ci "-Wno-non-virtual-dtor", 28e9297d28Sopenharmony_ci "-Wno-missing-field-initializers", 29e9297d28Sopenharmony_ci "-Wno-c++11-narrowing", 30e9297d28Sopenharmony_ci ] 31e9297d28Sopenharmony_ci defines = [ "EGL_EGLEXT_PROTOTYPES" ] 32e9297d28Sopenharmony_ci} 33e9297d28Sopenharmony_ci 34e9297d28Sopenharmony_ciconfig("effect_public_config") { 35e9297d28Sopenharmony_ci include_dirs = [ 36e9297d28Sopenharmony_ci "$graphic_2d_root/utils/log", 37e9297d28Sopenharmony_ci "include", 38e9297d28Sopenharmony_ci ] 39e9297d28Sopenharmony_ci} 40e9297d28Sopenharmony_ci 41e9297d28Sopenharmony_ciohos_shared_library("libeffectchain") { 42e9297d28Sopenharmony_ci sources = [ "//third_party/cJSON/cJSON.c" ] 43e9297d28Sopenharmony_ci 44e9297d28Sopenharmony_ci external_deps = [ 45e9297d28Sopenharmony_ci "cJSON:cjson", 46e9297d28Sopenharmony_ci "hilog:libhilog", 47e9297d28Sopenharmony_ci "hitrace:hitrace_meter", 48e9297d28Sopenharmony_ci "image_framework:image_native", 49e9297d28Sopenharmony_ci ] 50e9297d28Sopenharmony_ci 51e9297d28Sopenharmony_ci if (effect_enable_gpu) { 52e9297d28Sopenharmony_ci sources += [ 53e9297d28Sopenharmony_ci "src/algo_filter.cpp", 54e9297d28Sopenharmony_ci "src/brightness_filter.cpp", 55e9297d28Sopenharmony_ci "src/contrast_filter.cpp", 56e9297d28Sopenharmony_ci "src/filter.cpp", 57e9297d28Sopenharmony_ci "src/filter_factory.cpp", 58e9297d28Sopenharmony_ci "src/gaussian_blur_filter.cpp", 59e9297d28Sopenharmony_ci "src/horizontal_blur_filter.cpp", 60e9297d28Sopenharmony_ci "src/image_chain.cpp", 61e9297d28Sopenharmony_ci "src/input.cpp", 62e9297d28Sopenharmony_ci "src/mesh.cpp", 63e9297d28Sopenharmony_ci "src/output.cpp", 64e9297d28Sopenharmony_ci "src/program.cpp", 65e9297d28Sopenharmony_ci "src/saturation_filter.cpp", 66e9297d28Sopenharmony_ci "src/scale_filter.cpp", 67e9297d28Sopenharmony_ci "src/vertical_blur_filter.cpp", 68e9297d28Sopenharmony_ci ] 69e9297d28Sopenharmony_ci 70e9297d28Sopenharmony_ci deps = [ 71e9297d28Sopenharmony_ci "$graphic_2d_root/frameworks/opengl_wrapper:EGL", 72e9297d28Sopenharmony_ci "$graphic_2d_root/frameworks/opengl_wrapper:GLESv3", 73e9297d28Sopenharmony_ci ] 74e9297d28Sopenharmony_ci } 75e9297d28Sopenharmony_ci 76e9297d28Sopenharmony_ci configs = [ ":effect_config" ] 77e9297d28Sopenharmony_ci 78e9297d28Sopenharmony_ci public_configs = [ ":effect_public_config" ] 79e9297d28Sopenharmony_ci 80e9297d28Sopenharmony_ci public_external_deps = [ "c_utils:utils" ] 81e9297d28Sopenharmony_ci 82e9297d28Sopenharmony_ci cflags_cc = [ "-std=c++17" ] 83e9297d28Sopenharmony_ci 84e9297d28Sopenharmony_ci if (effect_enable_gpu) { 85e9297d28Sopenharmony_ci install_enable = true 86e9297d28Sopenharmony_ci } else { 87e9297d28Sopenharmony_ci install_enable = false 88e9297d28Sopenharmony_ci } 89e9297d28Sopenharmony_ci 90e9297d28Sopenharmony_ci part_name = "graphic_2d" 91e9297d28Sopenharmony_ci subsystem_name = "graphic" 92e9297d28Sopenharmony_ci} 93