1/* 2 * Copyright (C) 2020 Arm Limited. 3 * SPDX-License-Identifier: Apache-2.0 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18package { 19 default_applicable_licenses: ["Android-Apache-2.0"], 20} 21 22soong_config_module_type { 23 name: "arm_gralloc_core_cc_defaults", 24 module_type: "cc_defaults", 25 config_namespace: "arm_gralloc", 26 variables: [ 27 "gralloc_ion_sync_on_lock", 28 ], 29 properties: [ 30 "cflags", 31 ], 32} 33 34soong_config_bool_variable { 35 name: "gralloc_ion_sync_on_lock", 36} 37 38arm_gralloc_core_cc_defaults { 39 name: "arm_gralloc_core_defaults", 40 defaults: [ 41 "arm_gralloc_defaults", 42 ], 43 cflags: [ 44 /* Minimum buffer dimensions in pixels when buffer will use AFBC */ 45 /* TODO: set this via BoardConfig */ 46 "-DGRALLOC_DISP_W=0", 47 "-DGRALLOC_DISP_H=0", 48 ], 49 soong_config_variables: { 50 gralloc_ion_sync_on_lock: { 51 cflags: [ 52 "-DGRALLOC_ION_SYNC_ON_LOCK=1", 53 ], 54 }, 55 }, 56 srcs: [ 57 "mali_gralloc_bufferaccess.cpp", 58 "mali_gralloc_bufferallocation.cpp", 59 "mali_gralloc_bufferdescriptor.cpp", 60 "mali_gralloc_formats.cpp", 61 "mali_gralloc_reference.cpp", 62 "mali_gralloc_debug.cpp", 63 "format_info.cpp", 64 ], 65 include_dirs: [ 66 "hardware/google/gchips/include", 67 ], 68 header_libs: [ 69 "device_kernel_headers", 70 ], 71 static_libs: [ 72 "libarect", 73 ], 74 shared_libs: [ 75 "liblog", 76 "libcutils", 77 "libutils", 78 "android.hardware.graphics.common@1.2", 79 ], 80 target: { 81 android: { 82 shared_libs: [ 83 "libhardware", 84 ], 85 }, 86 }, 87} 88 89cc_library_static { 90 name: "libgralloc_core", 91 defaults: [ 92 "arm_gralloc_core_defaults", 93 "arm_gralloc_version_defaults", 94 ], 95} 96