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