• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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	],
80	static_libs: [
81		"libarect",
82	],
83	shared_libs: [
84		"libhardware",
85		"liblog",
86		"libcutils",
87		"libdmabufheap",
88		"libsync",
89		"libutils",
90		"libnativewindow",
91		"android.hardware.graphics.common-V4-ndk",
92	],
93	header_libs: [
94		"libnativebase_headers",
95	],
96}
97
98cc_library_static {
99	name: "libgralloc_allocator",
100	defaults: [
101		"arm_gralloc_allocator_defaults",
102		"arm_gralloc_version_defaults",
103	],
104}
105