6 //"hwui_bugreport_font_cache_usage",
7 //"hwui_compile_for_perf",
9 // Enables fine-grained GLES error checking
10 // If enabled, every GLES call is wrapped & error checked
11 // Has moderate overhead
12 //"hwui_enable_opengl-validation",
16 "-DEGL_EGLEXT_PROTOTYPES",
17 "-DGL_GLEXT_PROTOTYPES",
18 "-DATRACE_TAG=ATRACE_TAG_VIEW",
19 "-DLOG_TAG=\"OpenGLRenderer\"",
21 "-Wno-unused-parameter",
24 "-fvisibility=hidden",
26 // GCC false-positives on this warning, and since we -Werror that's
28 "-Wno-free-nonheap-object",
30 // clang's warning is broken, see: https://llvm.org/bugs/show_bug.cgi?id=21629
31 "-Wno-missing-braces",
33 // TODO: Linear blending should be enabled by default, but we are
34 // TODO: making it an opt-in while it's a work in progress
35 //"-DANDROID_ENABLE_LINEAR_BLENDING",
39 "external/skia/include/private",
40 "external/skia/src/core",
41 "external/skia/src/effects",
42 "external/skia/src/image",
43 "external/skia/src/utils",
48 cflags: ["-DUSE_HWC2"],
54 name: "hwui_static_deps",
65 "libprotobuf-cpp-full",
78 name: "hwui_bugreport_font_cache_usage",
79 srcs: ["font/FontCacheHistoryTracker.cpp"],
80 cflags: ["-DBUGREPORT_FONT_CACHE_USAGE"],
84 name: "hwui_compile_for_perf",
87 "-fno-omit-frame-pointer",
95 cflags: ["-include debug/wrap_gles.h"],
97 "debug/wrap_gles.cpp",
98 "debug/DefaultGlesDriver.cpp",
99 "debug/GlesErrorCheckWrapper.cpp",
100 "debug/GlesDriver.cpp",
101 "debug/FatalBaseDriver.cpp",
102 "debug/NullGlesDriver.cpp",
104 include_dirs: ["frameworks/native/opengl/libs/GLES2"],
108 name: "hwui_enable_opengl_validation",
109 defaults: ["hwui_debug"],
110 cflags: ["-DDEBUG_OPENGL=3"],
111 srcs: ["debug/wrap_gles.cpp"],
112 include_dirs: ["frameworks/native/opengl/libs/GLES2"],
115 // ------------------------
117 // ------------------------
120 name: "libhwui_defaults",
121 defaults: ["hwui_defaults"],
124 "font/CacheTexture.cpp",
127 "hwui/MinikinSkia.cpp",
128 "hwui/MinikinUtils.cpp",
129 "hwui/PaintImpl.cpp",
131 "pipeline/skia/GLFunctorDrawable.cpp",
132 "pipeline/skia/LayerDrawable.cpp",
133 "pipeline/skia/RenderNodeDrawable.cpp",
134 "pipeline/skia/ReorderBarrierDrawables.cpp",
135 "pipeline/skia/SkiaDisplayList.cpp",
136 "pipeline/skia/SkiaOpenGLPipeline.cpp",
137 "pipeline/skia/SkiaOpenGLReadback.cpp",
138 "pipeline/skia/SkiaPipeline.cpp",
139 "pipeline/skia/SkiaProfileRenderer.cpp",
140 "pipeline/skia/SkiaRecordingCanvas.cpp",
141 "pipeline/skia/SkiaVulkanPipeline.cpp",
142 "renderstate/Blend.cpp",
143 "renderstate/MeshState.cpp",
144 "renderstate/OffscreenBufferPool.cpp",
145 "renderstate/PixelBufferState.cpp",
146 "renderstate/RenderState.cpp",
147 "renderstate/Scissor.cpp",
148 "renderstate/Stencil.cpp",
149 "renderstate/TextureState.cpp",
150 "renderthread/CanvasContext.cpp",
151 "renderthread/OpenGLPipeline.cpp",
152 "renderthread/DrawFrameTask.cpp",
153 "renderthread/EglManager.cpp",
154 "renderthread/VulkanManager.cpp",
155 "renderthread/RenderProxy.cpp",
156 "renderthread/RenderTask.cpp",
157 "renderthread/RenderThread.cpp",
158 "renderthread/TimeLord.cpp",
159 "renderthread/Frame.cpp",
160 "service/GraphicsStatsService.cpp",
161 "thread/TaskManager.cpp",
165 "utils/LinearAllocator.cpp",
166 "utils/StringUtils.cpp",
167 "utils/TestWindowContext.cpp",
168 "utils/VectorDrawableUtils.cpp",
170 "AnimationContext.cpp",
172 "AnimatorManager.cpp",
173 "BakedOpDispatcher.cpp",
174 "BakedOpRenderer.cpp",
179 "DamageAccumulator.cpp",
180 "DeferredLayerUpdater.cpp",
188 "FrameInfoVisualizer.cpp",
189 "GammaFontRenderer.cpp",
192 "GpuMemoryTracker.cpp",
199 "LayerUpdateQueue.cpp",
202 "OpenGLReadback.cpp",
207 "PathTessellator.cpp",
209 "ProfileRenderer.cpp",
213 "PropertyValuesAnimatorSet.cpp",
214 "PropertyValuesHolder.cpp",
215 "RecordingCanvas.cpp",
216 "RenderBufferCache.cpp",
218 "RenderProperties.cpp",
220 "ShadowTessellator.cpp",
222 "SkiaCanvasProxy.cpp",
226 "TessellationCache.cpp",
227 "TextDropShadowCache.cpp",
230 "VectorDrawable.cpp",
236 export_proto_headers: true,
239 export_include_dirs: ["."],
240 export_shared_lib_headers: ["libRScpp"],
245 defaults: ["libhwui_defaults"],
248 // ------------------------
249 // static library null gpu
250 // ------------------------
253 name: "libhwui_static_debug",
258 cflags: ["-DHWUI_NULL_GPU"],
265 name: "hwui_test_defaults",
266 defaults: ["hwui_defaults"],
268 "tests/common/scenes/*.cpp",
269 "tests/common/LeakChecker.cpp",
270 "tests/common/TestListViewSceneBase.cpp",
271 "tests/common/TestContext.cpp",
272 "tests/common/TestScene.cpp",
273 "tests/common/TestUtils.cpp",
277 // ------------------------
279 // ------------------------
282 name: "hwui_unit_tests",
283 defaults: ["hwui_test_defaults"],
287 "libhwui_static_debug",
289 shared_libs: ["libmemunreachable"],
291 "-include debug/wrap_gles.h",
296 "tests/unit/main.cpp",
297 "tests/unit/BakedOpDispatcherTests.cpp",
298 "tests/unit/BakedOpRendererTests.cpp",
299 "tests/unit/BakedOpStateTests.cpp",
300 "tests/unit/BitmapTests.cpp",
301 "tests/unit/CanvasContextTests.cpp",
302 "tests/unit/CanvasStateTests.cpp",
303 "tests/unit/ClipAreaTests.cpp",
304 "tests/unit/DamageAccumulatorTests.cpp",
305 "tests/unit/DeferredLayerUpdaterTests.cpp",
306 "tests/unit/DeviceInfoTests.cpp",
307 "tests/unit/FatVectorTests.cpp",
308 "tests/unit/FontRendererTests.cpp",
309 "tests/unit/FrameBuilderTests.cpp",
310 "tests/unit/GlopBuilderTests.cpp",
311 "tests/unit/GpuMemoryTrackerTests.cpp",
312 "tests/unit/GradientCacheTests.cpp",
313 "tests/unit/GraphicsStatsServiceTests.cpp",
314 "tests/unit/LayerUpdateQueueTests.cpp",
315 "tests/unit/LeakCheckTests.cpp",
316 "tests/unit/LinearAllocatorTests.cpp",
317 "tests/unit/MatrixTests.cpp",
318 "tests/unit/MeshStateTests.cpp",
319 "tests/unit/OffscreenBufferPoolTests.cpp",
320 "tests/unit/OpDumperTests.cpp",
321 "tests/unit/PathInterpolatorTests.cpp",
322 "tests/unit/RenderNodeDrawableTests.cpp",
323 "tests/unit/RecordingCanvasTests.cpp",
324 "tests/unit/RenderNodeTests.cpp",
325 "tests/unit/RenderPropertiesTests.cpp",
326 "tests/unit/SkiaBehaviorTests.cpp",
327 "tests/unit/SkiaDisplayListTests.cpp",
328 "tests/unit/SkiaPipelineTests.cpp",
329 "tests/unit/SkiaRenderPropertiesTests.cpp",
330 "tests/unit/SkiaCanvasTests.cpp",
331 "tests/unit/SnapshotTests.cpp",
332 "tests/unit/StringUtilsTests.cpp",
333 "tests/unit/TestUtilsTests.cpp",
334 "tests/unit/TextDropShadowCacheTests.cpp",
335 "tests/unit/TextureCacheTests.cpp",
336 "tests/unit/TypefaceTests.cpp",
337 "tests/unit/VectorDrawableTests.cpp",
341 // ------------------------
343 // ------------------------
347 defaults: ["hwui_test_defaults"],
349 // set to libhwui_static_debug to skip actual GL commands
350 whole_static_libs: ["libhwui"],
351 shared_libs: ["libmemunreachable"],
354 "tests/macrobench/TestSceneRunner.cpp",
355 "tests/macrobench/main.cpp",
359 // ------------------------
361 // ---------------------
365 defaults: ["hwui_test_defaults"],
368 "-include debug/wrap_gles.h",
372 whole_static_libs: ["libhwui_static_debug"],
373 shared_libs: ["libmemunreachable"],
376 "tests/microbench/main.cpp",
377 "tests/microbench/DisplayListCanvasBench.cpp",
378 "tests/microbench/FontBench.cpp",
379 "tests/microbench/FrameBuilderBench.cpp",
380 "tests/microbench/LinearAllocatorBench.cpp",
381 "tests/microbench/PathParserBench.cpp",
382 "tests/microbench/RenderNodeBench.cpp",
383 "tests/microbench/ShadowBench.cpp",
384 "tests/microbench/TaskManagerBench.cpp",