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_allocator_cc_defaults", 24 module_type: "cc_defaults", 25 config_namespace: "arm_gralloc", 26 variables: [ 27 "gralloc_use_ion_dma_heap", 28 "gralloc_use_ion_compound_page_heap", 29 "gralloc_init_afbc", 30 "gralloc_use_ion_dmabuf_sync", 31 ], 32 properties: [ 33 "cflags", 34 ], 35} 36 37soong_config_bool_variable { 38 name: "gralloc_use_ion_dma_heap", 39} 40soong_config_bool_variable { 41 name: "gralloc_use_ion_compound_page_heap", 42} 43soong_config_bool_variable { 44 name: "gralloc_init_afbc", 45} 46soong_config_bool_variable { 47 name: "gralloc_use_ion_dmabuf_sync", 48} 49 50arm_gralloc_allocator_cc_defaults { 51 name: "arm_gralloc_allocator_defaults", 52 defaults: [ 53 "arm_gralloc_defaults", 54 ], 55 soong_config_variables: { 56 gralloc_use_ion_dma_heap: { 57 cflags: [ 58 "-DGRALLOC_USE_ION_DMA_HEAP=1", 59 ], 60 }, 61 gralloc_use_ion_compound_page_heap: { 62 cflags: [ 63 "-DGRALLOC_USE_ION_COMPOUND_PAGE_HEAP=1", 64 ], 65 }, 66 gralloc_init_afbc: { 67 cflags: [ 68 "-DGRALLOC_INIT_AFBC=1", 69 ], 70 }, 71 gralloc_use_ion_dmabuf_sync: { 72 cflags: [ 73 "-DGRALLOC_USE_ION_DMABUF_SYNC=1", 74 ], 75 }, 76 }, 77 srcs: [ 78 "mali_gralloc_ion.cpp", 79 "mali_gralloc_shared_memory.cpp", 80 ], 81 static_libs: [ 82 "libarect", 83 ], 84 shared_libs: [ 85 "libhardware", 86 "liblog", 87 "libcutils", 88 "libdmabufheap", 89 "libion_google", 90 "libsync", 91 "libutils", 92 "libnativewindow", 93 "android.hardware.graphics.common-V3-ndk", 94 ], 95 header_libs: [ 96 "libnativebase_headers", 97 ], 98} 99 100cc_library_static { 101 name: "libgralloc_allocator", 102 defaults: [ 103 "arm_gralloc_allocator_defaults", 104 "arm_gralloc_version_defaults", 105 ], 106} 107