Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 1 | package { |
| 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 Reck | 38bc8a8 | 2024-02-21 17:08:27 -0500 | [diff] [blame] | 8 | default_team: "trendy_team_android_core_graphics_stack", |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 9 | } |
| 10 | |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 11 | cc_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 Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | cc_defaults { |
| 24 | name: "librenderengine_defaults", |
Sally Qi | 6920a2f | 2022-08-26 10:40:05 -0700 | [diff] [blame] | 25 | defaults: [ |
| 26 | "android.hardware.graphics.composer3-ndk_shared", |
| 27 | "renderengine_defaults", |
| 28 | ], |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 29 | cflags: [ |
| 30 | "-DGL_GLEXT_PROTOTYPES", |
| 31 | "-DEGL_EGLEXT_PROTOTYPES", |
| 32 | ], |
| 33 | shared_libs: [ |
Yiwei Zhang | 5434a78 | 2018-12-05 18:06:32 -0800 | [diff] [blame] | 34 | "libbase", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 35 | "libcutils", |
| 36 | "libEGL", |
| 37 | "libGLESv1_CM", |
| 38 | "libGLESv2", |
| 39 | "libgui", |
| 40 | "liblog", |
Peiyong Lin | 46080ef | 2018-10-26 18:43:14 -0700 | [diff] [blame] | 41 | "libnativewindow", |
Alec Mouri | 16a9940 | 2019-07-29 16:37:30 -0700 | [diff] [blame] | 42 | "libprocessgroup", |
Alec Mouri | 0d5e1eb | 2018-11-10 20:40:12 -0800 | [diff] [blame] | 43 | "libsync", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 44 | "libui", |
| 45 | "libutils", |
Ian Elliott | 1f0911e | 2022-09-09 16:31:47 -0600 | [diff] [blame] | 46 | "libvulkan", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 47 | ], |
Alec Mouri | 465b296 | 2021-10-08 16:22:21 -0700 | [diff] [blame] | 48 | |
| 49 | static_libs: [ |
Alec Mouri | 492c85c | 2021-11-19 15:58:10 -0800 | [diff] [blame] | 50 | "libshaders", |
Alec Mouri | 465b296 | 2021-10-08 16:22:21 -0700 | [diff] [blame] | 51 | "libtonemap", |
Leon Scroggins III | df8166e | 2024-01-25 15:50:56 -0500 | [diff] [blame] | 52 | "libsurfaceflinger_common", |
Alec Mouri | 465b296 | 2021-10-08 16:22:21 -0700 | [diff] [blame] | 53 | ], |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 54 | local_include_dirs: ["include"], |
| 55 | export_include_dirs: ["include"], |
| 56 | } |
| 57 | |
Leon Scroggins III | 10c6293 | 2024-02-01 15:35:19 -0500 | [diff] [blame] | 58 | // Needed by FlagManager to access a #define. |
| 59 | cc_library_static { |
| 60 | name: "librenderengine_includes", |
| 61 | local_include_dirs: ["include"], |
| 62 | export_include_dirs: ["include"], |
| 63 | } |
| 64 | |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 65 | filegroup { |
| 66 | name: "librenderengine_sources", |
| 67 | srcs: [ |
Alec Mouri | a90a570 | 2021-04-16 16:36:21 +0000 | [diff] [blame] | 68 | "ExternalTexture.cpp", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 69 | "RenderEngine.cpp", |
Peiyong Lin | 833074a | 2018-08-28 11:53:54 -0700 | [diff] [blame] | 70 | ], |
| 71 | } |
| 72 | |
Ana Krulec | 9bc9dc6 | 2020-02-26 12:16:40 -0800 | [diff] [blame] | 73 | filegroup { |
| 74 | name: "librenderengine_threaded_sources", |
| 75 | srcs: [ |
| 76 | "threaded/RenderEngineThreaded.cpp", |
| 77 | ], |
| 78 | } |
| 79 | |
John Reck | 67b1e2b | 2020-08-26 13:17:24 -0700 | [diff] [blame] | 80 | filegroup { |
| 81 | name: "librenderengine_skia_sources", |
| 82 | srcs: [ |
Alec Mouri | c7f6c8b | 2020-11-09 18:35:20 -0800 | [diff] [blame] | 83 | "skia/AutoBackendTexture.cpp", |
Leon Scroggins III | b9216dc | 2021-03-08 17:19:01 -0500 | [diff] [blame] | 84 | "skia/Cache.cpp", |
Alec Mouri | c0aae73 | 2021-01-12 13:32:18 -0800 | [diff] [blame] | 85 | "skia/ColorSpaces.cpp", |
Nolan Scobie | 02c160c | 2024-03-18 10:40:23 -0400 | [diff] [blame] | 86 | "skia/GaneshVkRenderEngine.cpp", |
Nolan Scobie | 609e597 | 2024-03-20 14:47:34 -0400 | [diff] [blame] | 87 | "skia/GraphiteVkRenderEngine.cpp", |
Alec Mouri | e2b61c6 | 2023-08-15 19:04:54 +0000 | [diff] [blame] | 88 | "skia/GLExtensions.cpp", |
John Reck | 67b1e2b | 2020-08-26 13:17:24 -0700 | [diff] [blame] | 89 | "skia/SkiaRenderEngine.cpp", |
| 90 | "skia/SkiaGLRenderEngine.cpp", |
Ian Elliott | 1f0911e | 2022-09-09 16:31:47 -0600 | [diff] [blame] | 91 | "skia/SkiaVkRenderEngine.cpp", |
Nolan Scobie | f52ad20 | 2024-03-06 18:18:28 -0500 | [diff] [blame] | 92 | "skia/VulkanInterface.cpp", |
Nolan Scobie | ca05028 | 2024-03-15 13:27:06 -0400 | [diff] [blame] | 93 | "skia/compat/GaneshBackendTexture.cpp", |
Nolan Scobie | fc125ec | 2024-03-11 20:08:27 -0400 | [diff] [blame] | 94 | "skia/compat/GaneshGpuContext.cpp", |
Nolan Scobie | 609e597 | 2024-03-20 14:47:34 -0400 | [diff] [blame] | 95 | "skia/compat/GraphiteBackendTexture.cpp", |
| 96 | "skia/compat/GraphiteGpuContext.cpp", |
Ana Krulec | 70d15b1b | 2020-12-01 10:05:15 -0800 | [diff] [blame] | 97 | "skia/debug/CaptureTimer.cpp", |
| 98 | "skia/debug/CommonPool.cpp", |
| 99 | "skia/debug/SkiaCapture.cpp", |
Derek Sollenberger | 0e6d356 | 2021-04-07 19:34:39 -0400 | [diff] [blame] | 100 | "skia/debug/SkiaMemoryReporter.cpp", |
Robin Lee | 26dacab | 2021-08-09 14:31:01 +0200 | [diff] [blame] | 101 | "skia/filters/BlurFilter.cpp", |
| 102 | "skia/filters/GaussianBlurFilter.cpp", |
Robin Lee | 026680a | 2021-07-26 12:49:53 +0200 | [diff] [blame] | 103 | "skia/filters/KawaseBlurFilter.cpp", |
Alec Mouri | 029d195 | 2020-10-12 10:37:08 -0700 | [diff] [blame] | 104 | "skia/filters/LinearEffect.cpp", |
Alec Mouri | f2ea10c | 2024-05-24 19:13:21 +0000 | [diff] [blame^] | 105 | "skia/filters/MouriMap.cpp", |
Alec Mouri | 465b296 | 2021-10-08 16:22:21 -0700 | [diff] [blame] | 106 | "skia/filters/StretchShaderFactory.cpp", |
John Reck | 67b1e2b | 2020-08-26 13:17:24 -0700 | [diff] [blame] | 107 | ], |
| 108 | } |
| 109 | |
Nolan Scobie | 8ef7e14 | 2022-10-14 10:52:43 -0400 | [diff] [blame] | 110 | // Used to consolidate and simplify pulling Skia & Skia deps into targets that depend on |
| 111 | // librenderengine. This allows shared deps to be deduplicated (e.g. Perfetto), which doesn't seem |
| 112 | // possible if libskia_renderengine is just pulled into librenderengine via whole_static_libs. |
| 113 | cc_defaults { |
| 114 | name: "librenderengine_deps", |
| 115 | defaults: ["skia_renderengine_deps"], |
| 116 | static_libs: ["libskia_renderengine"], |
| 117 | } |
| 118 | |
| 119 | // Note: if compilation fails when adding librenderengine as a dependency, try adding |
| 120 | // librenderengine_deps to the defaults field of your dependent target. |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 121 | cc_library_static { |
| 122 | name: "librenderengine", |
Nolan Scobie | 8ef7e14 | 2022-10-14 10:52:43 -0400 | [diff] [blame] | 123 | defaults: [ |
| 124 | "librenderengine_defaults", |
| 125 | "librenderengine_deps", |
| 126 | ], |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 127 | double_loadable: true, |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 128 | cflags: [ |
| 129 | "-fvisibility=hidden", |
| 130 | "-Werror=format", |
Ana Krulec | 70d15b1b | 2020-12-01 10:05:15 -0800 | [diff] [blame] | 131 | "-Wno-unused-parameter", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 132 | ], |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 133 | srcs: [ |
| 134 | ":librenderengine_sources", |
Ana Krulec | 9bc9dc6 | 2020-02-26 12:16:40 -0800 | [diff] [blame] | 135 | ":librenderengine_threaded_sources", |
John Reck | 67b1e2b | 2020-08-26 13:17:24 -0700 | [diff] [blame] | 136 | ":librenderengine_skia_sources", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 137 | ], |
Long Ling | 317c3f0 | 2022-02-02 14:09:24 -0800 | [diff] [blame] | 138 | header_libs: [ |
| 139 | "libtonemap_headers", |
| 140 | ], |
Derek Sollenberger | c8d959d | 2021-02-10 12:53:02 -0500 | [diff] [blame] | 141 | include_dirs: [ |
| 142 | "external/skia/src/gpu", |
| 143 | ], |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 144 | lto: { |
| 145 | thin: true, |
| 146 | }, |
| 147 | } |
Lloyd Pique | 3823e7b | 2018-10-18 16:58:10 -0700 | [diff] [blame] | 148 | |
| 149 | cc_library_static { |
| 150 | name: "librenderengine_mocks", |
| 151 | defaults: ["librenderengine_defaults"], |
| 152 | srcs: [ |
Lloyd Pique | 3823e7b | 2018-10-18 16:58:10 -0700 | [diff] [blame] | 153 | "mock/RenderEngine.cpp", |
| 154 | ], |
| 155 | static_libs: [ |
| 156 | "libgtest", |
| 157 | "libgmock", |
| 158 | ], |
| 159 | local_include_dirs: ["include"], |
| 160 | export_include_dirs: ["include"], |
| 161 | } |