1#
2# Copyright (C) 2022 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17# If a downstream target does not want any graphics support, do not
18# include this file!
19
20PRODUCT_COPY_FILES += \
21    device/google/cuttlefish/shared/config/graphics/init_graphics.vendor.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init_graphics.vendor.rc \
22
23# Gfxstream common libraries:
24PRODUCT_SOONG_NAMESPACES += device/generic/goldfish-opengl
25PRODUCT_PACKAGES += \
26    libandroidemu \
27    libOpenglCodecCommon \
28    libOpenglSystemCommon \
29    libGLESv1_CM_emulation \
30    lib_renderControl_enc \
31    libEGL_emulation \
32    libGLESv2_enc \
33    libGLESv2_emulation \
34    libGLESv1_enc \
35    libGoldfishProfiler \
36
37# Gfxstream OpenGL implementation (OpenGL streamed to the host).
38PRODUCT_PACKAGES += \
39    libEGL_emulation \
40    libGLESv1_CM_emulation \
41    libGLESv1_enc \
42    libGLESv2_emulation \
43    libGLESv2_enc \
44
45# Gfxstream Vulkan implementation (Vulkan streamed to the host).
46ifeq ($(TARGET_VULKAN_SUPPORT),true)
47PRODUCT_PACKAGES += com.google.cf.vulkan
48endif
49
50#
51# Hardware Composer HAL
52#
53PRODUCT_PACKAGES += \
54    com.android.hardware.graphics.composer.drm_hwcomposer \
55    com.android.hardware.graphics.composer.ranchu \
56
57PRODUCT_VENDOR_PROPERTIES += \
58    ro.vendor.hwcomposer.pmem=/dev/block/pmem1
59
60# drm_hwcomposer configuration
61# The virtio gpu module sends frames to the host as fast as possible and
62# does not emulate "real display timing".
63PRODUCT_VENDOR_PROPERTIES += ro.vendor.hwc.drm.present_fence_not_reliable=true
64
65PRODUCT_SYSTEM_PROPERTIES += \
66    service.sf.prime_shader_cache=0
67
68# Gralloc implementation
69$(call soong_config_set,cvd,RELEASE_SM_OPEN_DECLARED_PASSTHROUGH_HAL,$(RELEASE_SM_OPEN_DECLARED_PASSTHROUGH_HAL))
70PRODUCT_PACKAGES += com.google.cf.gralloc
71
72PRODUCT_PACKAGES += \
73    android.hardware.graphics.allocator-service.minigbm \
74    mapper.minigbm
75