Romain Guy | e4d0112 | 2010-06-16 18:44:05 -0700 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | include $(CLEAR_VARS) |
Dan Albert | 88ba339 | 2014-09-11 16:20:16 -0700 | [diff] [blame] | 3 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Romain Guy | e4d0112 | 2010-06-16 18:44:05 -0700 | [diff] [blame] | 4 | |
Chris Craik | b565df1 | 2015-10-05 13:00:52 -0700 | [diff] [blame] | 5 | HWUI_NEW_OPS := false |
| 6 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 7 | hwui_src_files := \ |
| 8 | font/CacheTexture.cpp \ |
| 9 | font/Font.cpp \ |
| 10 | renderstate/Blend.cpp \ |
| 11 | renderstate/MeshState.cpp \ |
Chris Craik | 9fded23 | 2015-11-11 16:42:34 -0800 | [diff] [blame] | 12 | renderstate/OffscreenBufferPool.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 13 | renderstate/PixelBufferState.cpp \ |
| 14 | renderstate/RenderState.cpp \ |
| 15 | renderstate/Scissor.cpp \ |
| 16 | renderstate/Stencil.cpp \ |
| 17 | renderstate/TextureState.cpp \ |
| 18 | renderthread/CanvasContext.cpp \ |
| 19 | renderthread/DrawFrameTask.cpp \ |
| 20 | renderthread/EglManager.cpp \ |
| 21 | renderthread/RenderProxy.cpp \ |
| 22 | renderthread/RenderTask.cpp \ |
| 23 | renderthread/RenderThread.cpp \ |
| 24 | renderthread/TimeLord.cpp \ |
| 25 | thread/TaskManager.cpp \ |
| 26 | utils/Blur.cpp \ |
| 27 | utils/GLUtils.cpp \ |
| 28 | utils/LinearAllocator.cpp \ |
Derek Sollenberger | 4c5efe9 | 2015-07-10 13:56:39 -0400 | [diff] [blame] | 29 | utils/NinePatchImpl.cpp \ |
Chris Craik | 6e6646c | 2015-09-14 15:54:12 -0700 | [diff] [blame] | 30 | utils/StringUtils.cpp \ |
Tom Hudson | b2f5bd2 | 2015-10-15 16:41:55 -0400 | [diff] [blame] | 31 | utils/TestWindowContext.cpp \ |
Doris Liu | 804618d | 2015-11-16 22:48:34 -0800 | [diff] [blame] | 32 | utils/VectorDrawableUtils.cpp \ |
John Reck | 16c9d6a | 2015-11-17 15:51:08 -0800 | [diff] [blame] | 33 | utils/TestUtils.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 34 | AmbientShadow.cpp \ |
| 35 | AnimationContext.cpp \ |
| 36 | Animator.cpp \ |
| 37 | AnimatorManager.cpp \ |
| 38 | AssetAtlas.cpp \ |
| 39 | Caches.cpp \ |
Chris Craik | a171727 | 2015-11-19 13:02:43 -0800 | [diff] [blame] | 40 | Canvas.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 41 | CanvasState.cpp \ |
| 42 | ClipArea.cpp \ |
| 43 | DamageAccumulator.cpp \ |
| 44 | DeferredDisplayList.cpp \ |
| 45 | DeferredLayerUpdater.cpp \ |
John Reck | 704bed0 | 2015-11-05 09:22:17 -0800 | [diff] [blame] | 46 | DeviceInfo.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 47 | DisplayList.cpp \ |
| 48 | DisplayListCanvas.cpp \ |
| 49 | Dither.cpp \ |
| 50 | Extensions.cpp \ |
| 51 | FboCache.cpp \ |
| 52 | FontRenderer.cpp \ |
| 53 | FrameInfo.cpp \ |
| 54 | FrameInfoVisualizer.cpp \ |
| 55 | GammaFontRenderer.cpp \ |
| 56 | GlopBuilder.cpp \ |
| 57 | GradientCache.cpp \ |
| 58 | Image.cpp \ |
| 59 | Interpolator.cpp \ |
| 60 | JankTracker.cpp \ |
| 61 | Layer.cpp \ |
| 62 | LayerCache.cpp \ |
| 63 | LayerRenderer.cpp \ |
Chris Craik | 0b7e824 | 2015-10-28 16:50:44 -0700 | [diff] [blame] | 64 | LayerUpdateQueue.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 65 | Matrix.cpp \ |
| 66 | OpenGLRenderer.cpp \ |
| 67 | Patch.cpp \ |
| 68 | PatchCache.cpp \ |
| 69 | PathCache.cpp \ |
| 70 | PathTessellator.cpp \ |
Doris Liu | 30bcf69 | 2015-11-04 14:56:24 -0800 | [diff] [blame] | 71 | PathParser.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 72 | PixelBuffer.cpp \ |
| 73 | Program.cpp \ |
| 74 | ProgramCache.cpp \ |
| 75 | Properties.cpp \ |
| 76 | RenderBufferCache.cpp \ |
| 77 | RenderNode.cpp \ |
| 78 | RenderProperties.cpp \ |
| 79 | ResourceCache.cpp \ |
| 80 | ShadowTessellator.cpp \ |
| 81 | SkiaCanvas.cpp \ |
| 82 | SkiaCanvasProxy.cpp \ |
| 83 | SkiaShader.cpp \ |
| 84 | Snapshot.cpp \ |
| 85 | SpotShadow.cpp \ |
| 86 | TessellationCache.cpp \ |
| 87 | TextDropShadowCache.cpp \ |
| 88 | Texture.cpp \ |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 89 | TextureCache.cpp \ |
Doris Liu | 30bcf69 | 2015-11-04 14:56:24 -0800 | [diff] [blame] | 90 | VectorDrawablePath.cpp \ |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 91 | protos/hwui.proto |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 92 | |
| 93 | hwui_cflags := \ |
| 94 | -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES \ |
| 95 | -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" \ |
John Reck | 82f5e0c | 2015-10-22 17:07:45 -0700 | [diff] [blame] | 96 | -Wall -Wno-unused-parameter -Wunreachable-code -Werror |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 97 | |
John Reck | c90ed75 | 2015-11-04 07:39:44 -0800 | [diff] [blame] | 98 | # GCC false-positives on this warning, and since we -Werror that's |
| 99 | # a problem |
| 100 | hwui_cflags += -Wno-free-nonheap-object |
| 101 | |
Chris Craik | b565df1 | 2015-10-05 13:00:52 -0700 | [diff] [blame] | 102 | ifeq (true, $(HWUI_NEW_OPS)) |
| 103 | hwui_src_files += \ |
Chris Craik | 9e7fcfd | 2015-11-25 13:27:33 -0800 | [diff] [blame] | 104 | BakedOpDispatcher.cpp \ |
Chris Craik | b565df1 | 2015-10-05 13:00:52 -0700 | [diff] [blame] | 105 | BakedOpRenderer.cpp \ |
| 106 | OpReorderer.cpp \ |
| 107 | RecordingCanvas.cpp |
| 108 | |
| 109 | hwui_cflags += -DHWUI_NEW_OPS |
| 110 | |
| 111 | endif |
| 112 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 113 | ifndef HWUI_COMPILE_SYMBOLS |
| 114 | hwui_cflags += -fvisibility=hidden |
| 115 | endif |
| 116 | |
| 117 | ifdef HWUI_COMPILE_FOR_PERF |
| 118 | # TODO: Non-arm? |
| 119 | hwui_cflags += -fno-omit-frame-pointer -marm -mapcs |
| 120 | endif |
| 121 | |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 122 | # This has to be lazy-resolved because it depends on the LOCAL_MODULE_CLASS |
| 123 | # which varies depending on what is being built |
| 124 | define hwui_proto_include |
| 125 | $(call local-generated-sources-dir)/proto/$(LOCAL_PATH) |
| 126 | endef |
| 127 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 128 | hwui_c_includes += \ |
Leon Scroggins III | 5507807 | 2015-07-31 10:38:40 -0400 | [diff] [blame] | 129 | external/skia/include/private \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 130 | external/skia/src/core |
| 131 | |
| 132 | hwui_shared_libraries := \ |
| 133 | liblog \ |
| 134 | libcutils \ |
| 135 | libutils \ |
| 136 | libEGL \ |
| 137 | libGLESv2 \ |
| 138 | libskia \ |
| 139 | libui \ |
| 140 | libgui \ |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 141 | libprotobuf-cpp-lite \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 142 | |
| 143 | ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) |
| 144 | hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT |
| 145 | hwui_shared_libraries += libRS libRScpp |
| 146 | hwui_c_includes += \ |
| 147 | $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,) \ |
| 148 | frameworks/rs/cpp \ |
| 149 | frameworks/rs |
| 150 | endif |
| 151 | |
| 152 | |
| 153 | # ------------------------ |
| 154 | # static library |
| 155 | # ------------------------ |
| 156 | |
| 157 | include $(CLEAR_VARS) |
| 158 | |
| 159 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 160 | LOCAL_MODULE := libhwui_static |
| 161 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 162 | LOCAL_CFLAGS := $(hwui_cflags) |
| 163 | LOCAL_SRC_FILES := $(hwui_src_files) |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 164 | LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) |
| 165 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(hwui_c_includes) $(call hwui_proto_include) |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 166 | |
| 167 | include $(BUILD_STATIC_LIBRARY) |
| 168 | |
| 169 | # ------------------------ |
Chris Craik | 5fbd9db | 2015-10-19 11:22:11 -0700 | [diff] [blame] | 170 | # static library null gpu |
| 171 | # ------------------------ |
| 172 | |
| 173 | include $(CLEAR_VARS) |
| 174 | |
| 175 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 176 | LOCAL_MODULE := libhwui_static_null_gpu |
| 177 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 178 | LOCAL_CFLAGS := \ |
| 179 | $(hwui_cflags) \ |
| 180 | -DHWUI_NULL_GPU |
| 181 | LOCAL_SRC_FILES := \ |
| 182 | $(hwui_src_files) \ |
| 183 | tests/nullegl.cpp \ |
| 184 | tests/nullgles.cpp |
| 185 | LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) |
| 186 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(hwui_c_includes) $(call hwui_proto_include) |
| 187 | |
| 188 | include $(BUILD_STATIC_LIBRARY) |
| 189 | |
| 190 | # ------------------------ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 191 | # shared library |
| 192 | # ------------------------ |
| 193 | |
| 194 | include $(CLEAR_VARS) |
| 195 | |
John Reck | a2732a2 | 2014-12-18 13:52:33 -0800 | [diff] [blame] | 196 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 197 | LOCAL_MODULE := libhwui |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 198 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
| 199 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
Romain Guy | e4d0112 | 2010-06-16 18:44:05 -0700 | [diff] [blame] | 200 | |
John Reck | a2732a2 | 2014-12-18 13:52:33 -0800 | [diff] [blame] | 201 | include $(BUILD_SHARED_LIBRARY) |
Andreas Gampe | edaecc1 | 2014-11-10 20:54:07 -0800 | [diff] [blame] | 202 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 203 | # ------------------------ |
| 204 | # unit tests |
| 205 | # ------------------------ |
| 206 | |
| 207 | include $(CLEAR_VARS) |
| 208 | |
| 209 | LOCAL_MODULE := hwui_unit_tests |
| 210 | LOCAL_MODULE_TAGS := tests |
| 211 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
Chris Craik | 5fbd9db | 2015-10-19 11:22:11 -0700 | [diff] [blame] | 212 | LOCAL_STATIC_LIBRARIES := libhwui_static_null_gpu |
Chris Craik | 98787e6 | 2015-11-13 10:55:30 -0800 | [diff] [blame] | 213 | LOCAL_CFLAGS := \ |
| 214 | $(hwui_cflags) \ |
| 215 | -DHWUI_NULL_GPU |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 216 | |
| 217 | LOCAL_SRC_FILES += \ |
Chris Craik | 9557106 | 2015-09-02 12:55:52 -0700 | [diff] [blame] | 218 | unit_tests/CanvasStateTests.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 219 | unit_tests/ClipAreaTests.cpp \ |
| 220 | unit_tests/DamageAccumulatorTests.cpp \ |
John Reck | 704bed0 | 2015-11-05 09:22:17 -0800 | [diff] [blame] | 221 | unit_tests/DeviceInfoTests.cpp \ |
Chris Craik | 76ace11 | 2015-10-29 12:46:19 -0700 | [diff] [blame] | 222 | unit_tests/FatVectorTests.cpp \ |
Chris Craik | 0b7e824 | 2015-10-28 16:50:44 -0700 | [diff] [blame] | 223 | unit_tests/LayerUpdateQueueTests.cpp \ |
Chris Craik | 6e6646c | 2015-09-14 15:54:12 -0700 | [diff] [blame] | 224 | unit_tests/LinearAllocatorTests.cpp \ |
Doris Liu | 804618d | 2015-11-16 22:48:34 -0800 | [diff] [blame] | 225 | unit_tests/VectorDrawableTests.cpp \ |
Chris Craik | 9fded23 | 2015-11-11 16:42:34 -0800 | [diff] [blame] | 226 | unit_tests/OffscreenBufferPoolTests.cpp \ |
Chris Craik | 6e6646c | 2015-09-14 15:54:12 -0700 | [diff] [blame] | 227 | unit_tests/StringUtilsTests.cpp |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 228 | |
Chris Craik | b565df1 | 2015-10-05 13:00:52 -0700 | [diff] [blame] | 229 | ifeq (true, $(HWUI_NEW_OPS)) |
| 230 | LOCAL_SRC_FILES += \ |
| 231 | unit_tests/BakedOpStateTests.cpp \ |
| 232 | unit_tests/RecordingCanvasTests.cpp \ |
| 233 | unit_tests/OpReordererTests.cpp |
| 234 | endif |
| 235 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 236 | include $(BUILD_NATIVE_TEST) |
| 237 | |
| 238 | # ------------------------ |
| 239 | # test app |
| 240 | # ------------------------ |
| 241 | |
| 242 | include $(CLEAR_VARS) |
| 243 | |
| 244 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp |
| 245 | LOCAL_MODULE:= hwuitest |
| 246 | LOCAL_MODULE_TAGS := tests |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 247 | LOCAL_MODULE_CLASS := EXECUTABLES |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 248 | LOCAL_MULTILIB := both |
| 249 | LOCAL_MODULE_STEM_32 := hwuitest |
| 250 | LOCAL_MODULE_STEM_64 := hwuitest64 |
| 251 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 252 | LOCAL_CFLAGS := $(hwui_cflags) |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 253 | |
Chris Craik | 5fbd9db | 2015-10-19 11:22:11 -0700 | [diff] [blame] | 254 | # set to libhwui_static_null_gpu to skip actual GL commands |
| 255 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 256 | |
| 257 | LOCAL_SRC_FILES += \ |
| 258 | tests/TestContext.cpp \ |
John Reck | 16c9d6a | 2015-11-17 15:51:08 -0800 | [diff] [blame] | 259 | tests/TestSceneRunner.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 260 | tests/main.cpp |
| 261 | |
John Reck | 16c9d6a | 2015-11-17 15:51:08 -0800 | [diff] [blame] | 262 | LOCAL_SRC_FILES += $(call all-cpp-files-under, tests/scenes) |
| 263 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 264 | include $(BUILD_EXECUTABLE) |
John Reck | 4a4bc89 | 2015-10-12 07:38:22 -0700 | [diff] [blame] | 265 | |
| 266 | # ------------------------ |
| 267 | # Micro-bench app |
| 268 | # --------------------- |
| 269 | include $(CLEAR_VARS) |
| 270 | |
| 271 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp |
| 272 | LOCAL_MODULE:= hwuimicro |
| 273 | LOCAL_MODULE_TAGS := tests |
| 274 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 275 | LOCAL_MULTILIB := both |
| 276 | LOCAL_MODULE_STEM_32 := hwuimicro |
| 277 | LOCAL_MODULE_STEM_64 := hwuimicro64 |
| 278 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
Chris Craik | 8d1f212 | 2015-11-24 16:40:09 -0800 | [diff] [blame] | 279 | LOCAL_CFLAGS := \ |
| 280 | $(hwui_cflags) \ |
| 281 | -DHWUI_NULL_GPU |
John Reck | 4a4bc89 | 2015-10-12 07:38:22 -0700 | [diff] [blame] | 282 | LOCAL_C_INCLUDES += bionic/benchmarks/ |
| 283 | |
Chris Craik | 5fbd9db | 2015-10-19 11:22:11 -0700 | [diff] [blame] | 284 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static_null_gpu |
John Reck | 4a4bc89 | 2015-10-12 07:38:22 -0700 | [diff] [blame] | 285 | LOCAL_STATIC_LIBRARIES := libbenchmark libbase |
| 286 | |
| 287 | LOCAL_SRC_FILES += \ |
Chris Craik | 81a1d2a | 2015-10-15 17:13:00 -0700 | [diff] [blame] | 288 | microbench/DisplayListCanvasBench.cpp \ |
John Reck | 82f5e0c | 2015-10-22 17:07:45 -0700 | [diff] [blame] | 289 | microbench/LinearAllocatorBench.cpp \ |
Doris Liu | f59cb78 | 2015-11-10 10:36:17 -0800 | [diff] [blame] | 290 | microbench/PathParserBench.cpp \ |
John Reck | 82f5e0c | 2015-10-22 17:07:45 -0700 | [diff] [blame] | 291 | microbench/ShadowBench.cpp |
John Reck | 4a4bc89 | 2015-10-12 07:38:22 -0700 | [diff] [blame] | 292 | |
Chris Craik | 0a24b14 | 2015-10-19 17:10:19 -0700 | [diff] [blame] | 293 | ifeq (true, $(HWUI_NEW_OPS)) |
| 294 | LOCAL_SRC_FILES += \ |
| 295 | microbench/OpReordererBench.cpp |
| 296 | endif |
| 297 | |
John Reck | 4a4bc89 | 2015-10-12 07:38:22 -0700 | [diff] [blame] | 298 | include $(BUILD_EXECUTABLE) |