blob: b501d40f2649d127ba987b7d93936633bc738c96 [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",
Ana Krulec70d15b1b2020-12-01 10:05:15 -080090 "skia/debug/CaptureTimer.cpp",
91 "skia/debug/CommonPool.cpp",
92 "skia/debug/SkiaCapture.cpp",
Derek Sollenberger0e6d3562021-04-07 19:34:39 -040093 "skia/debug/SkiaMemoryReporter.cpp",
Robin Lee26dacab2021-08-09 14:31:01 +020094 "skia/filters/BlurFilter.cpp",
95 "skia/filters/GaussianBlurFilter.cpp",
Robin Lee026680a2021-07-26 12:49:53 +020096 "skia/filters/KawaseBlurFilter.cpp",
Alec Mouri029d1952020-10-12 10:37:08 -070097 "skia/filters/LinearEffect.cpp",
Alec Mouri465b2962021-10-08 16:22:21 -070098 "skia/filters/StretchShaderFactory.cpp",
John Reck67b1e2b2020-08-26 13:17:24 -070099 ],
100}
101
Nolan Scobie8ef7e142022-10-14 10:52:43 -0400102// Used to consolidate and simplify pulling Skia & Skia deps into targets that depend on
103// librenderengine. This allows shared deps to be deduplicated (e.g. Perfetto), which doesn't seem
104// possible if libskia_renderengine is just pulled into librenderengine via whole_static_libs.
105cc_defaults {
106 name: "librenderengine_deps",
107 defaults: ["skia_renderengine_deps"],
108 static_libs: ["libskia_renderengine"],
109}
110
111// Note: if compilation fails when adding librenderengine as a dependency, try adding
112// librenderengine_deps to the defaults field of your dependent target.
Peiyong Lincbc184f2018-08-22 13:24:10 -0700113cc_library_static {
114 name: "librenderengine",
Nolan Scobie8ef7e142022-10-14 10:52:43 -0400115 defaults: [
116 "librenderengine_defaults",
117 "librenderengine_deps",
118 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -0700119 double_loadable: true,
Peiyong Lincbc184f2018-08-22 13:24:10 -0700120 cflags: [
121 "-fvisibility=hidden",
122 "-Werror=format",
Ana Krulec70d15b1b2020-12-01 10:05:15 -0800123 "-Wno-unused-parameter",
Peiyong Lincbc184f2018-08-22 13:24:10 -0700124 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -0700125 srcs: [
126 ":librenderengine_sources",
Ana Krulec9bc9dc62020-02-26 12:16:40 -0800127 ":librenderengine_threaded_sources",
John Reck67b1e2b2020-08-26 13:17:24 -0700128 ":librenderengine_skia_sources",
Peiyong Lincbc184f2018-08-22 13:24:10 -0700129 ],
Long Ling317c3f02022-02-02 14:09:24 -0800130 header_libs: [
131 "libtonemap_headers",
132 ],
Derek Sollenbergerc8d959d2021-02-10 12:53:02 -0500133 include_dirs: [
134 "external/skia/src/gpu",
135 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -0700136 lto: {
137 thin: true,
138 },
139}
Lloyd Pique3823e7b2018-10-18 16:58:10 -0700140
141cc_library_static {
142 name: "librenderengine_mocks",
143 defaults: ["librenderengine_defaults"],
144 srcs: [
Lloyd Pique3823e7b2018-10-18 16:58:10 -0700145 "mock/RenderEngine.cpp",
146 ],
147 static_libs: [
148 "libgtest",
149 "libgmock",
150 ],
151 local_include_dirs: ["include"],
152 export_include_dirs: ["include"],
153}