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