blob: 8d19c455276dcd9a385e6a47aa0412767157ac4c [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"],
8}
9
Peiyong Lincbc184f2018-08-22 13:24:10 -070010cc_defaults {
11 name: "renderengine_defaults",
12 cflags: [
13 "-DLOG_TAG=\"RenderEngine\"",
14 "-Wall",
15 "-Werror",
16 "-Wthread-safety",
17 "-Wunused",
18 "-Wunreachable-code",
19 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -070020}
21
22cc_defaults {
23 name: "librenderengine_defaults",
Sally Qi6920a2f2022-08-26 10:40:05 -070024 defaults: [
25 "android.hardware.graphics.composer3-ndk_shared",
26 "renderengine_defaults",
27 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -070028 cflags: [
29 "-DGL_GLEXT_PROTOTYPES",
30 "-DEGL_EGLEXT_PROTOTYPES",
31 ],
32 shared_libs: [
Yiwei Zhang5434a782018-12-05 18:06:32 -080033 "libbase",
Peiyong Lincbc184f2018-08-22 13:24:10 -070034 "libcutils",
35 "libEGL",
36 "libGLESv1_CM",
37 "libGLESv2",
38 "libgui",
39 "liblog",
Peiyong Lin46080ef2018-10-26 18:43:14 -070040 "libnativewindow",
Alec Mouri16a99402019-07-29 16:37:30 -070041 "libprocessgroup",
Alec Mouri0d5e1eb2018-11-10 20:40:12 -080042 "libsync",
Peiyong Lincbc184f2018-08-22 13:24:10 -070043 "libui",
44 "libutils",
Ian Elliott1f0911e2022-09-09 16:31:47 -060045 "libvulkan",
Peiyong Lincbc184f2018-08-22 13:24:10 -070046 ],
Alec Mouri465b2962021-10-08 16:22:21 -070047
48 static_libs: [
Alec Mouri492c85c2021-11-19 15:58:10 -080049 "libshaders",
Alec Mouri465b2962021-10-08 16:22:21 -070050 "libtonemap",
51 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -070052 local_include_dirs: ["include"],
53 export_include_dirs: ["include"],
54}
55
56filegroup {
57 name: "librenderengine_sources",
58 srcs: [
59 "Description.cpp",
Alec Mouria90a5702021-04-16 16:36:21 +000060 "ExternalTexture.cpp",
Peiyong Lincbc184f2018-08-22 13:24:10 -070061 "Mesh.cpp",
Peiyong Lincbc184f2018-08-22 13:24:10 -070062 "RenderEngine.cpp",
Peiyong Lincbc184f2018-08-22 13:24:10 -070063 "Texture.cpp",
64 ],
65}
66
Peiyong Lin833074a2018-08-28 11:53:54 -070067filegroup {
68 name: "librenderengine_gl_sources",
69 srcs: [
Peiyong Lin7e219eb2018-12-03 05:40:42 -080070 "gl/GLESRenderEngine.cpp",
Peiyong Lin833074a2018-08-28 11:53:54 -070071 "gl/GLExtensions.cpp",
Peiyong Line5a9a7f2018-08-30 15:32:13 -070072 "gl/GLFramebuffer.cpp",
Peiyong Linf1bada92018-08-29 09:39:31 -070073 "gl/GLImage.cpp",
Vishnu Nairf19544f2020-02-03 11:23:26 -080074 "gl/GLShadowTexture.cpp",
Vishnu Nair16efdbf2019-12-10 11:55:42 -080075 "gl/GLShadowVertexGenerator.cpp",
76 "gl/GLSkiaShadowPort.cpp",
Lucas Dupinad663372020-03-19 12:44:36 -070077 "gl/GLVertexBuffer.cpp",
Alec Mouri16a99402019-07-29 16:37:30 -070078 "gl/ImageManager.cpp",
Peiyong Lin833074a2018-08-28 11:53:54 -070079 "gl/Program.cpp",
80 "gl/ProgramCache.cpp",
Lucas Dupin19c8f0e2019-11-25 17:55:44 -080081 "gl/filters/BlurFilter.cpp",
Lucas Dupin19c8f0e2019-11-25 17:55:44 -080082 "gl/filters/GenericProgram.cpp",
Peiyong Lin833074a2018-08-28 11:53:54 -070083 ],
84}
85
Ana Krulec9bc9dc62020-02-26 12:16:40 -080086filegroup {
87 name: "librenderengine_threaded_sources",
88 srcs: [
89 "threaded/RenderEngineThreaded.cpp",
90 ],
91}
92
John Reck67b1e2b2020-08-26 13:17:24 -070093filegroup {
94 name: "librenderengine_skia_sources",
95 srcs: [
Alec Mouric7f6c8b2020-11-09 18:35:20 -080096 "skia/AutoBackendTexture.cpp",
Leon Scroggins IIIb9216dc2021-03-08 17:19:01 -050097 "skia/Cache.cpp",
Alec Mouric0aae732021-01-12 13:32:18 -080098 "skia/ColorSpaces.cpp",
John Reck67b1e2b2020-08-26 13:17:24 -070099 "skia/SkiaRenderEngine.cpp",
100 "skia/SkiaGLRenderEngine.cpp",
Ian Elliott1f0911e2022-09-09 16:31:47 -0600101 "skia/SkiaVkRenderEngine.cpp",
Ana Krulec70d15b1b2020-12-01 10:05:15 -0800102 "skia/debug/CaptureTimer.cpp",
103 "skia/debug/CommonPool.cpp",
104 "skia/debug/SkiaCapture.cpp",
Derek Sollenberger0e6d3562021-04-07 19:34:39 -0400105 "skia/debug/SkiaMemoryReporter.cpp",
Robin Lee26dacab2021-08-09 14:31:01 +0200106 "skia/filters/BlurFilter.cpp",
107 "skia/filters/GaussianBlurFilter.cpp",
Robin Lee026680a2021-07-26 12:49:53 +0200108 "skia/filters/KawaseBlurFilter.cpp",
Alec Mouri029d1952020-10-12 10:37:08 -0700109 "skia/filters/LinearEffect.cpp",
Alec Mouri465b2962021-10-08 16:22:21 -0700110 "skia/filters/StretchShaderFactory.cpp",
John Reck67b1e2b2020-08-26 13:17:24 -0700111 ],
112}
113
Nolan Scobie8ef7e142022-10-14 10:52:43 -0400114// Used to consolidate and simplify pulling Skia & Skia deps into targets that depend on
115// librenderengine. This allows shared deps to be deduplicated (e.g. Perfetto), which doesn't seem
116// possible if libskia_renderengine is just pulled into librenderengine via whole_static_libs.
117cc_defaults {
118 name: "librenderengine_deps",
119 defaults: ["skia_renderengine_deps"],
120 static_libs: ["libskia_renderengine"],
121}
122
123// Note: if compilation fails when adding librenderengine as a dependency, try adding
124// librenderengine_deps to the defaults field of your dependent target.
Peiyong Lincbc184f2018-08-22 13:24:10 -0700125cc_library_static {
126 name: "librenderengine",
Nolan Scobie8ef7e142022-10-14 10:52:43 -0400127 defaults: [
128 "librenderengine_defaults",
129 "librenderengine_deps",
130 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -0700131 double_loadable: true,
Peiyong Lincbc184f2018-08-22 13:24:10 -0700132 cflags: [
133 "-fvisibility=hidden",
134 "-Werror=format",
Ana Krulec70d15b1b2020-12-01 10:05:15 -0800135 "-Wno-unused-parameter",
Peiyong Lincbc184f2018-08-22 13:24:10 -0700136 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -0700137 srcs: [
138 ":librenderengine_sources",
Peiyong Lin833074a2018-08-28 11:53:54 -0700139 ":librenderengine_gl_sources",
Ana Krulec9bc9dc62020-02-26 12:16:40 -0800140 ":librenderengine_threaded_sources",
John Reck67b1e2b2020-08-26 13:17:24 -0700141 ":librenderengine_skia_sources",
Peiyong Lincbc184f2018-08-22 13:24:10 -0700142 ],
Long Ling317c3f02022-02-02 14:09:24 -0800143 header_libs: [
144 "libtonemap_headers",
145 ],
Derek Sollenbergerc8d959d2021-02-10 12:53:02 -0500146 include_dirs: [
147 "external/skia/src/gpu",
148 ],
Peiyong Lincbc184f2018-08-22 13:24:10 -0700149 lto: {
150 thin: true,
151 },
152}
Lloyd Pique3823e7b2018-10-18 16:58:10 -0700153
154cc_library_static {
155 name: "librenderengine_mocks",
156 defaults: ["librenderengine_defaults"],
157 srcs: [
158 "mock/Framebuffer.cpp",
159 "mock/Image.cpp",
160 "mock/RenderEngine.cpp",
161 ],
162 static_libs: [
163 "libgtest",
164 "libgmock",
165 ],
166 local_include_dirs: ["include"],
167 export_include_dirs: ["include"],
168}