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