1package {
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
10cc_defaults {
11    name: "renderengine_defaults",
12    cflags: [
13        "-DLOG_TAG=\"RenderEngine\"",
14        "-Wall",
15        "-Werror",
16        "-Wthread-safety",
17        "-Wunused",
18        "-Wunreachable-code",
19    ],
20}
21
22cc_defaults {
23    name: "librenderengine_defaults",
24    defaults: ["renderengine_defaults"],
25    cflags: [
26        "-DGL_GLEXT_PROTOTYPES",
27        "-DEGL_EGLEXT_PROTOTYPES",
28    ],
29    shared_libs: [
30        "libbase",
31        "libcutils",
32        "libEGL",
33        "libGLESv1_CM",
34        "libGLESv2",
35        "libgui",
36        "liblog",
37        "libnativewindow",
38        "libprocessgroup",
39        "libsync",
40        "libui",
41        "libutils",
42    ],
43    local_include_dirs: ["include"],
44    export_include_dirs: ["include"],
45}
46
47filegroup {
48    name: "librenderengine_sources",
49    srcs: [
50        "Description.cpp",
51        "ExternalTexture.cpp",
52        "Mesh.cpp",
53        "RenderEngine.cpp",
54        "Texture.cpp",
55    ],
56}
57
58filegroup {
59    name: "librenderengine_gl_sources",
60    srcs: [
61        "gl/GLESRenderEngine.cpp",
62        "gl/GLExtensions.cpp",
63        "gl/GLFramebuffer.cpp",
64        "gl/GLImage.cpp",
65        "gl/GLShadowTexture.cpp",
66        "gl/GLShadowVertexGenerator.cpp",
67        "gl/GLSkiaShadowPort.cpp",
68        "gl/GLVertexBuffer.cpp",
69        "gl/ImageManager.cpp",
70        "gl/Program.cpp",
71        "gl/ProgramCache.cpp",
72        "gl/filters/BlurFilter.cpp",
73        "gl/filters/GenericProgram.cpp",
74    ],
75}
76
77filegroup {
78    name: "librenderengine_threaded_sources",
79    srcs: [
80        "threaded/RenderEngineThreaded.cpp",
81    ],
82}
83
84filegroup {
85    name: "librenderengine_skia_sources",
86    srcs: [
87        "skia/AutoBackendTexture.cpp",
88        "skia/Cache.cpp",
89        "skia/ColorSpaces.cpp",
90        "skia/SkiaRenderEngine.cpp",
91        "skia/SkiaGLRenderEngine.cpp",
92        "skia/debug/CaptureTimer.cpp",
93        "skia/debug/CommonPool.cpp",
94        "skia/debug/SkiaCapture.cpp",
95        "skia/debug/SkiaMemoryReporter.cpp",
96        "skia/filters/BlurFilter.cpp",
97        "skia/filters/LinearEffect.cpp",
98        "skia/filters/StretchShaderFactory.cpp"
99    ],
100}
101
102cc_library_static {
103    name: "librenderengine",
104    defaults: ["librenderengine_defaults"],
105    double_loadable: true,
106    clang: true,
107    cflags: [
108        "-fvisibility=hidden",
109        "-Werror=format",
110        "-Wno-unused-parameter",
111    ],
112    srcs: [
113        ":librenderengine_sources",
114        ":librenderengine_gl_sources",
115        ":librenderengine_threaded_sources",
116        ":librenderengine_skia_sources",
117    ],
118    include_dirs: [
119        "external/skia/src/gpu",
120    ],
121    whole_static_libs: ["libskia_renderengine"],
122    lto: {
123        thin: true,
124    },
125}
126
127cc_library_static {
128    name: "librenderengine_mocks",
129    defaults: ["librenderengine_defaults"],
130    srcs: [
131        "mock/Framebuffer.cpp",
132        "mock/Image.cpp",
133        "mock/RenderEngine.cpp",
134    ],
135    static_libs: [
136        "libgtest",
137        "libgmock",
138    ],
139    local_include_dirs: ["include"],
140    export_include_dirs: ["include"],
141}
142