blob: 39902b1635db08b1449f1fb1634881620a5c7646 [file] [log] [blame]
Bob Badour3306e492021-02-25 15:35:37 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "frameworks_native_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["frameworks_native_license"],
John Reck38bc8a82024-02-21 17:08:27 -05008 default_team: "trendy_team_android_core_graphics_stack",
Bob Badour3306e492021-02-25 15:35:37 -08009}
10
Peiyong Lincbc184f2018-08-22 13:24:10 -070011cc_defaults {
12 name: "renderengine_defaults",
13 cflags: [
14 "-DLOG_TAG=\"RenderEngine\"",
15 "-Wall",
16 "-Werror",
17 "-Wthread-safety",
18 "-Wunused",
19 "-Wunreachable-code",
20 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -070021}
22
23cc_defaults {
24 name: "librenderengine_defaults",
Sally Qi6920a2f2022-08-26 10:40:05 -070025 defaults: [
26 "android.hardware.graphics.composer3-ndk_shared",
27 "renderengine_defaults",
28 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -070029 cflags: [
30 "-DGL_GLEXT_PROTOTYPES",
31 "-DEGL_EGLEXT_PROTOTYPES",
32 ],
33 shared_libs: [
Yiwei Zhang5434a782018-12-05 18:06:32 -080034 "libbase",
Peiyong Lincbc184f2018-08-22 13:24:10 -070035 "libcutils",
36 "libEGL",
37 "libGLESv1_CM",
38 "libGLESv2",
39 "libgui",
40 "liblog",
Peiyong Lin46080ef2018-10-26 18:43:14 -070041 "libnativewindow",
Alec Mouri16a99402019-07-29 16:37:30 -070042 "libprocessgroup",
Alec Mouri0d5e1eb2018-11-10 20:40:12 -080043 "libsync",
Peiyong Lincbc184f2018-08-22 13:24:10 -070044 "libui",
45 "libutils",
Ian Elliott1f0911e2022-09-09 16:31:47 -060046 "libvulkan",
Peiyong Lincbc184f2018-08-22 13:24:10 -070047 ],
Alec Mouri465b2962021-10-08 16:22:21 -070048
49 static_libs: [
Alec Mouri492c85c2021-11-19 15:58:10 -080050 "libshaders",
Alec Mouri465b2962021-10-08 16:22:21 -070051 "libtonemap",
Leon Scroggins IIIdf8166e2024-01-25 15:50:56 -050052 "libsurfaceflinger_common",
Alec Mouri465b2962021-10-08 16:22:21 -070053 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -070054 local_include_dirs: ["include"],
55 export_include_dirs: ["include"],
56}
57
Leon Scroggins III10c62932024-02-01 15:35:19 -050058// Needed by FlagManager to access a #define.
59cc_library_static {
60 name: "librenderengine_includes",
61 local_include_dirs: ["include"],
62 export_include_dirs: ["include"],
63}
64
Peiyong Lincbc184f2018-08-22 13:24:10 -070065filegroup {
66 name: "librenderengine_sources",
67 srcs: [
Alec Mouria90a5702021-04-16 16:36:21 +000068 "ExternalTexture.cpp",
Peiyong Lincbc184f2018-08-22 13:24:10 -070069 "RenderEngine.cpp",
Peiyong Lin833074a2018-08-28 11:53:54 -070070 ],
71}
72
Ana Krulec9bc9dc62020-02-26 12:16:40 -080073filegroup {
74 name: "librenderengine_threaded_sources",
75 srcs: [
76 "threaded/RenderEngineThreaded.cpp",
77 ],
78}
79
John Reck67b1e2b2020-08-26 13:17:24 -070080filegroup {
81 name: "librenderengine_skia_sources",
82 srcs: [
Alec Mouric7f6c8b2020-11-09 18:35:20 -080083 "skia/AutoBackendTexture.cpp",
Leon Scroggins IIIb9216dc2021-03-08 17:19:01 -050084 "skia/Cache.cpp",
Alec Mouric0aae732021-01-12 13:32:18 -080085 "skia/ColorSpaces.cpp",
Alec Mourie2b61c62023-08-15 19:04:54 +000086 "skia/GLExtensions.cpp",
John Reck67b1e2b2020-08-26 13:17:24 -070087 "skia/SkiaRenderEngine.cpp",
88 "skia/SkiaGLRenderEngine.cpp",
Ian Elliott1f0911e2022-09-09 16:31:47 -060089 "skia/SkiaVkRenderEngine.cpp",
Nolan Scobief52ad202024-03-06 18:18:28 -050090 "skia/VulkanInterface.cpp",
Nolan Scobiefc125ec2024-03-11 20:08:27 -040091 "skia/compat/GaneshGpuContext.cpp",
Ana Krulec70d15b1b2020-12-01 10:05:15 -080092 "skia/debug/CaptureTimer.cpp",
93 "skia/debug/CommonPool.cpp",
94 "skia/debug/SkiaCapture.cpp",
Derek Sollenberger0e6d3562021-04-07 19:34:39 -040095 "skia/debug/SkiaMemoryReporter.cpp",
Robin Lee26dacab2021-08-09 14:31:01 +020096 "skia/filters/BlurFilter.cpp",
97 "skia/filters/GaussianBlurFilter.cpp",
Robin Lee026680a2021-07-26 12:49:53 +020098 "skia/filters/KawaseBlurFilter.cpp",
Alec Mouri029d1952020-10-12 10:37:08 -070099 "skia/filters/LinearEffect.cpp",
Alec Mouri465b2962021-10-08 16:22:21 -0700100 "skia/filters/StretchShaderFactory.cpp",
John Reck67b1e2b2020-08-26 13:17:24 -0700101 ],
102}
103
Nolan Scobie8ef7e142022-10-14 10:52:43 -0400104// Used to consolidate and simplify pulling Skia & Skia deps into targets that depend on
105// librenderengine. This allows shared deps to be deduplicated (e.g. Perfetto), which doesn't seem
106// possible if libskia_renderengine is just pulled into librenderengine via whole_static_libs.
107cc_defaults {
108 name: "librenderengine_deps",
109 defaults: ["skia_renderengine_deps"],
110 static_libs: ["libskia_renderengine"],
111}
112
113// Note: if compilation fails when adding librenderengine as a dependency, try adding
114// librenderengine_deps to the defaults field of your dependent target.
Peiyong Lincbc184f2018-08-22 13:24:10 -0700115cc_library_static {
116 name: "librenderengine",
Nolan Scobie8ef7e142022-10-14 10:52:43 -0400117 defaults: [
118 "librenderengine_defaults",
119 "librenderengine_deps",
120 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -0700121 double_loadable: true,
Peiyong Lincbc184f2018-08-22 13:24:10 -0700122 cflags: [
123 "-fvisibility=hidden",
124 "-Werror=format",
Ana Krulec70d15b1b2020-12-01 10:05:15 -0800125 "-Wno-unused-parameter",
Peiyong Lincbc184f2018-08-22 13:24:10 -0700126 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -0700127 srcs: [
128 ":librenderengine_sources",
Ana Krulec9bc9dc62020-02-26 12:16:40 -0800129 ":librenderengine_threaded_sources",
John Reck67b1e2b2020-08-26 13:17:24 -0700130 ":librenderengine_skia_sources",
Peiyong Lincbc184f2018-08-22 13:24:10 -0700131 ],
Long Ling317c3f02022-02-02 14:09:24 -0800132 header_libs: [
133 "libtonemap_headers",
134 ],
Derek Sollenbergerc8d959d2021-02-10 12:53:02 -0500135 include_dirs: [
136 "external/skia/src/gpu",
137 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -0700138 lto: {
139 thin: true,
140 },
141}
Lloyd Pique3823e7b2018-10-18 16:58:10 -0700142
143cc_library_static {
144 name: "librenderengine_mocks",
145 defaults: ["librenderengine_defaults"],
146 srcs: [
Lloyd Pique3823e7b2018-10-18 16:58:10 -0700147 "mock/RenderEngine.cpp",
148 ],
149 static_libs: [
150 "libgtest",
151 "libgmock",
152 ],
153 local_include_dirs: ["include"],
154 export_include_dirs: ["include"],
155}