# Copyright (C) 2022 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_var.gni") # source code for Windows. use_mingw_win = "${current_os}_${current_cpu}" == "mingw_x86_64" use_clang_mac = "${current_os}_${current_cpu}" == "mac_x64" use_clang_ios = current_os == "ios" || current_os == "tvos" use_clang_android = current_os == "android" # Toolchain windows_buildtool = "//build/toolchain/mingw:mingw_x86_64" mac_buildtool = "//build/toolchain/mac:clang_x64" # Defines image_decode_windows_defines = [ "_WIN32" ] image_decode_mac_defines = [ "_APPLE" ] image_decode_ios_defines = [ "IOS_PLATFORM" ] image_decode_android_defines = [ "ANDROID_PLATFORM" ] image_sep_f = "/f" image_sep_p = "/p" image_oundation = "oundation" image_lugins = "lugins" image_multimedia = "multimedia" image_dir = "image_framework" image_subsystem = "/$image_sep_f$image_oundation/$image_multimedia/$image_dir" ipc_subsystem = "/$image_sep_f$image_oundation" graphic_multimedia = "graphic" graphic_dir = "graphic_2d" graphic_subsystem = "/$image_sep_f$image_oundation/$graphic_multimedia/$graphic_dir" plugins_lib_root = "/$image_sep_p$image_lugins/libs" comlib_sep_c = "/c" comlib_ommonlibrary = "ommonlibrary" commonlibrary_c_utils = "c_utils" commonlibrary_subsystem = "/$comlib_sep_c$comlib_ommonlibrary/$commonlibrary_c_utils" commonlibrary_memory_utils = "memory_utils" comlibmemory_subsystem = "/$comlib_sep_c$comlib_ommonlibrary/$commonlibrary_memory_utils" base_sep_b = "/b" base_ase = "ase" resource_management_subsystem = "/$base_sep_b$base_ase/global/resource_management" graphic_surface_root = "//foundation/graphic/graphic_surface" # skia image_use_new_skia = defined(use_new_skia) && use_new_skia skia_root = "//third_party" skia_deps_root = skia_root skia_core = [ "$skia_deps_root/skia:skia_core" ] skia_skcms = [ "$skia_deps_root/skia:skcms" ] exif_root = "//third_party" if (use_clang_android) { if (image_use_new_skia) { skia_platform = [ "$skia_deps_root/skia:skia_android" ] } else { skia_platform = [ "$skia_deps_root/skia:ace_skia_android" ] } } else if (use_clang_ios) { if (image_use_new_skia) { skia_platform = [ "$skia_deps_root/skia:skia_ios" ] } else { skia_platform = [ "$skia_deps_root/skia:ace_skia_ios" ] } } else if (use_mingw_win) { if (image_use_new_skia) { skia_platform = [ "$skia_deps_root/skia:skia_windows" ] } else { skia_platform = [ "$skia_deps_root/skia:ace_skia_windows" ] } } else if (use_clang_mac) { if (image_use_new_skia) { skia_platform = [ "$skia_deps_root/skia:skia_mac" ] } else { skia_platform = [ "$skia_deps_root/skia:ace_skia_mac" ] } } else { if (image_use_new_skia) { skia_platform = [ "$skia_deps_root/skia:skia_ohos" ] } else { skia_platform = [ "$skia_deps_root/skia:ace_skia_ohos" ] } } # hw_decoder declare_args() { enable_jpeg_hw_decode = true enable_heif_hw_decode = false enable_libexif = true enable_heif_hw_encode = false if (defined(global_parts_info) && !defined(global_parts_info.hdf_drivers_interface_display)) { enable_jpeg_hw_decode = false enable_heif_hw_decode = false enable_heif_hw_encode = false } }