1// 2// Copyright 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 17package { 18 // See: http://go/android-license-faq 19 default_applicable_licenses: [ 20 "device_generic_goldfish-opengl_license", 21 ], 22} 23 24cc_binary { 25 name: "android.hardware.graphics.composer3-service.ranchu", 26 27 defaults: [ 28 "android.hardware.graphics.composer3-ndk_shared", 29 "mesa_platform_virtgpu_defaults", 30 ], 31 32 relative_install_path: "hw", 33 vendor: true, 34 35 shared_libs: [ 36 "[email protected]", 37 "[email protected]", 38 "libbase", 39 "libbinder_ndk", 40 "libcutils", 41 "libdrm", 42 "libgralloctypes", 43 "libhidlbase", 44 "libjsoncpp", 45 "liblog", 46 "libsync", 47 "libui", 48 "libutils", 49 "libOpenglSystemCommon", 50 "libui", 51 ], 52 53 static_libs: [ 54 "libaidlcommonsupport", 55 "libyuv_static", 56 ], 57 58 header_libs: [ 59 "libminigbm_gralloc_headers", 60 "mesa_gfxstream_guest_android_headers", 61 ], 62 63 srcs: [ 64 "AlternatingImageStorage.cpp", 65 "ClientFrameComposer.cpp", 66 "Common.cpp", 67 "Composer.cpp", 68 "ComposerClient.cpp", 69 "ComposerResources.cpp", 70 "Device.cpp", 71 "Display.cpp", 72 "DisplayConfig.cpp", 73 "DisplayFinder.cpp", 74 "Drm.cpp", 75 "DrmSwapchain.cpp", 76 "DrmAtomicRequest.cpp", 77 "DrmBuffer.cpp", 78 "DrmClient.cpp", 79 "DrmConnector.cpp", 80 "DrmCrtc.cpp", 81 "DrmDisplay.cpp", 82 "DrmEventListener.cpp", 83 "DrmMode.cpp", 84 "DrmPlane.cpp", 85 "EdidInfo.cpp", 86 "Gralloc.cpp", 87 "GuestFrameComposer.cpp", 88 "HostFrameComposer.cpp", 89 "HostUtils.cpp", 90 "Layer.cpp", 91 "Main.cpp", 92 "NoOpFrameComposer.cpp", 93 "VsyncThread.cpp", 94 ], 95 96 cflags: [ 97 "-Wall", 98 "-Werror=conversion", 99 "-Wthread-safety", 100 ], 101 102 vintf_fragments: ["hwc3.xml"], 103 init_rc: ["hwc3.rc"], 104 105} 106 107apex { 108 name: "com.android.hardware.graphics.composer.ranchu", 109 key: "com.android.hardware.key", 110 certificate: ":com.android.hardware.certificate", 111 file_contexts: "apex_file_contexts", 112 manifest: "apex_manifest.json", 113 vendor: true, 114 updatable: false, 115 116 binaries: [ 117 "android.hardware.graphics.composer3-service.ranchu", 118 ], 119 prebuilts: [ 120 "hwc3.xml", 121 "hwc3-apex.rc", 122 ], 123} 124 125prebuilt_etc { 126 name: "hwc3.xml", 127 src: "hwc3.xml", 128 sub_dir: "vintf", 129 installable: false, 130} 131 132prebuilt_etc { 133 name: "hwc3-apex.rc", 134 src: ":gen-hwc3-apex.rc", 135 installable: false, 136} 137 138genrule { 139 name: "gen-hwc3-apex.rc", 140 srcs: ["hwc3.rc"], 141 out: ["hwc3-apex.rc"], 142 cmd: "sed -e 's@/vendor/bin/@/apex/com.android.hardware.graphics.composer/bin/@' $(in) > $(out)", 143} 144