1# Copyright (C) 2022 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_var.gni") 15import("//build/ohos.gni") 16 17declare_args() { 18 image_framework_feature_upgrade_skia = true 19} 20 21# source code for Windows. 22use_mingw_win = "${current_os}_${current_cpu}" == "mingw_x86_64" 23use_clang_mac = "${current_os}_${current_cpu}" == "mac_x64" 24use_clang_ios = current_os == "ios" || current_os == "tvos" 25use_clang_android = current_os == "android" 26 27# Toolchain 28windows_buildtool = "//build/toolchain/mingw:mingw_x86_64" 29mac_buildtool = "//build/toolchain/mac:clang_x64" 30 31# Defines 32image_decode_windows_defines = [ "_WIN32" ] 33image_decode_mac_defines = [ "_APPLE" ] 34image_decode_ios_defines = [ "IOS_PLATFORM" ] 35image_decode_android_defines = [ "ANDROID_PLATFORM" ] 36image_sep_f = "/f" 37image_sep_p = "/p" 38image_oundation = "oundation" 39image_lugins = "lugins" 40image_multimedia = "multimedia" 41image_dir = "image_framework" 42image_subsystem = "/$image_sep_f$image_oundation/$image_multimedia/$image_dir" 43ipc_subsystem = "/$image_sep_f$image_oundation" 44graphic_multimedia = "graphic" 45graphic_dir = "graphic_2d" 46graphic_subsystem = 47 "/$image_sep_f$image_oundation/$graphic_multimedia/$graphic_dir" 48plugins_lib_root = "/$image_sep_p$image_lugins/libs" 49comlib_sep_c = "/c" 50comlib_ommonlibrary = "ommonlibrary" 51commonlibrary_c_utils = "c_utils" 52commonlibrary_subsystem = 53 "/$comlib_sep_c$comlib_ommonlibrary/$commonlibrary_c_utils" 54commonlibrary_memory_utils = "memory_utils" 55comlibmemory_subsystem = 56 "/$comlib_sep_c$comlib_ommonlibrary/$commonlibrary_memory_utils" 57base_sep_b = "/b" 58base_ase = "ase" 59resource_management_subsystem = 60 "/$base_sep_b$base_ase/global/resource_management" 61graphic_surface_root = "//foundation/graphic/graphic_surface" 62 63image_use_new_skia = image_framework_feature_upgrade_skia 64 65skia_root = "//third_party" 66skia_deps_root = skia_root 67skia_core = [ "$skia_deps_root/skia:skia_core" ] 68skia_skcms = [ "$skia_deps_root/skia:skcms" ] 69 70exif_root = "//third_party" 71 72if (image_use_new_skia) { 73 third_party_skia_root = "//third_party/skia/m133" 74} else { 75 third_party_skia_root = "//third_party/skia" 76} 77 78if (use_clang_android) { 79 skia_platform = [ "$skia_deps_root/skia:skia_android" ] 80} else if (use_clang_ios) { 81 skia_platform = [ "$skia_deps_root/skia:skia_ios" ] 82} else if (use_mingw_win) { 83 skia_platform = [ "$skia_deps_root/skia:skia_windows" ] 84} else if (use_clang_mac) { 85 skia_platform = [ "$skia_deps_root/skia:skia_mac" ] 86} else { 87 skia_platform = [ "$skia_deps_root/skia:skia_ohos" ] 88} 89 90# hw_decoder 91declare_args() { 92 enable_jpeg_hw_decode = true 93 enable_heif_hw_decode = false 94 enable_libexif = true 95 enable_heif_hw_encode = false 96 enable_picture = false 97 enable_picture_ndk = false 98 99 if (defined(global_parts_info) && 100 !defined(global_parts_info.hdf_drivers_interface_display)) { 101 enable_jpeg_hw_decode = false 102 enable_heif_hw_decode = false 103 enable_heif_hw_encode = false 104 enable_picture = false 105 enable_picture_ndk = false 106 } 107} 108