/* * Copyright (C) 2020 Arm Limited. * SPDX-License-Identifier: Apache-2.0 * * 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. */ package { default_applicable_licenses: ["Android-Apache-2.0"], } soong_config_module_type_import { from: "hardware/google/gchips/gralloc4/Android.bp", module_types: ["gralloc_defaults"], } // Only to be used in pixel_gralloc_mapper because of 'stem' gralloc_defaults { name: "gralloc_mapper_defaults", soong_config_variables: { mapper_version: { mapper4: { stem: "android.hardware.graphics.mapper@4.0-impl", defaults: ["gralloc_mapper4_defaults"], }, mapper5: { stem: "mapper.pixel", defaults: ["gralloc_mapper5_defaults"], }, }, }, } cc_library_shared { name: "pixel_gralloc_mapper", defaults: ["gralloc_mapper_defaults"], } gralloc_defaults { name: "arm_gralloc_version_defaults", soong_config_variables: { mapper_version: { mapper4: { cflags: [ "-DLOG_TAG=\"gralloc4\"", "-DGRALLOC_VERSION_MAJOR=4", "-DHIDL_ALLOCATOR_VERSION_SCALED=400", "-DHIDL_MAPPER_VERSION_SCALED=400", "-DHIDL_COMMON_VERSION_SCALED=120", "-DGRALLOC_MAPPER_4", ], }, mapper5: { cflags: [ "-DGRALLOC_VERSION_MAJOR=5", "-DHIDL_MAPPER_VERSION_SCALED=500", "-DLOG_TAG=\"gralloc5\"", "-DGRALLOC_MAPPER_5", ], }, }, }, } gralloc_defaults { name: "arm_gralloc_api_defaults", shared_libs: [ "liblog", "libcutils", "libdmabufheap", "libsync", "libutils", "libnativewindow", "libgralloctypes", "libhardware", "android.hardware.graphics.common@1.2", ], static_libs: [ "libarect", "libgralloc_core", "libgralloc_allocator", "libgralloc_capabilities", "libdrm", ], header_libs: [ "libnativebase_headers", ], soong_config_variables: { mapper_version: { mapper4: { shared_libs: [ "libhidlbase", ], }, mapper5: { header_libs: [ "libbase_headers", "libimapper_stablec", "libimapper_providerutils", "pixel-gralloc-headers", ], }, }, }, } cc_library_headers { name: "libgralloc_headers", vendor: true, export_include_dirs: [ ".", ], header_libs: [ "libsystem_headers", "//hardware/google/graphics/common:pixel-gralloc-headers", ], export_header_lib_headers: [ "libsystem_headers", ], }