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 \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 30 | AmbientShadow.cpp \ |
| 31 | AnimationContext.cpp \ |
| 32 | Animator.cpp \ |
| 33 | AnimatorManager.cpp \ |
| 34 | AssetAtlas.cpp \ |
| 35 | Caches.cpp \ |
| 36 | CanvasState.cpp \ |
| 37 | ClipArea.cpp \ |
| 38 | DamageAccumulator.cpp \ |
| 39 | DeferredDisplayList.cpp \ |
| 40 | DeferredLayerUpdater.cpp \ |
| 41 | DisplayList.cpp \ |
| 42 | DisplayListCanvas.cpp \ |
| 43 | Dither.cpp \ |
| 44 | Extensions.cpp \ |
| 45 | FboCache.cpp \ |
| 46 | FontRenderer.cpp \ |
| 47 | FrameInfo.cpp \ |
| 48 | FrameInfoVisualizer.cpp \ |
| 49 | GammaFontRenderer.cpp \ |
| 50 | GlopBuilder.cpp \ |
| 51 | GradientCache.cpp \ |
| 52 | Image.cpp \ |
| 53 | Interpolator.cpp \ |
| 54 | JankTracker.cpp \ |
| 55 | Layer.cpp \ |
| 56 | LayerCache.cpp \ |
| 57 | LayerRenderer.cpp \ |
| 58 | Matrix.cpp \ |
| 59 | OpenGLRenderer.cpp \ |
| 60 | Patch.cpp \ |
| 61 | PatchCache.cpp \ |
| 62 | PathCache.cpp \ |
| 63 | PathTessellator.cpp \ |
| 64 | PixelBuffer.cpp \ |
| 65 | Program.cpp \ |
| 66 | ProgramCache.cpp \ |
| 67 | Properties.cpp \ |
| 68 | RenderBufferCache.cpp \ |
| 69 | RenderNode.cpp \ |
| 70 | RenderProperties.cpp \ |
| 71 | ResourceCache.cpp \ |
| 72 | ShadowTessellator.cpp \ |
| 73 | SkiaCanvas.cpp \ |
| 74 | SkiaCanvasProxy.cpp \ |
| 75 | SkiaShader.cpp \ |
| 76 | Snapshot.cpp \ |
| 77 | SpotShadow.cpp \ |
| 78 | TessellationCache.cpp \ |
| 79 | TextDropShadowCache.cpp \ |
| 80 | Texture.cpp \ |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 81 | TextureCache.cpp \ |
| 82 | protos/hwui.proto |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 83 | |
| 84 | hwui_cflags := \ |
| 85 | -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES \ |
| 86 | -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" \ |
| 87 | -Wall -Wno-unused-parameter -Wunreachable-code \ |
| 88 | -ffast-math -O3 -Werror |
| 89 | |
Chris Craik | b565df1 | 2015-10-05 13:00:52 -0700 | [diff] [blame^] | 90 | |
| 91 | ifeq (true, $(HWUI_NEW_OPS)) |
| 92 | hwui_src_files += \ |
| 93 | BakedOpRenderer.cpp \ |
| 94 | OpReorderer.cpp \ |
| 95 | RecordingCanvas.cpp |
| 96 | |
| 97 | hwui_cflags += -DHWUI_NEW_OPS |
| 98 | |
| 99 | endif |
| 100 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 101 | ifndef HWUI_COMPILE_SYMBOLS |
| 102 | hwui_cflags += -fvisibility=hidden |
| 103 | endif |
| 104 | |
| 105 | ifdef HWUI_COMPILE_FOR_PERF |
| 106 | # TODO: Non-arm? |
| 107 | hwui_cflags += -fno-omit-frame-pointer -marm -mapcs |
| 108 | endif |
| 109 | |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 110 | # This has to be lazy-resolved because it depends on the LOCAL_MODULE_CLASS |
| 111 | # which varies depending on what is being built |
| 112 | define hwui_proto_include |
| 113 | $(call local-generated-sources-dir)/proto/$(LOCAL_PATH) |
| 114 | endef |
| 115 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 116 | hwui_c_includes += \ |
| 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 | # ------------------------ |
| 157 | # shared library |
| 158 | # ------------------------ |
| 159 | |
| 160 | include $(CLEAR_VARS) |
| 161 | |
John Reck | a2732a2 | 2014-12-18 13:52:33 -0800 | [diff] [blame] | 162 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 163 | LOCAL_MODULE := libhwui |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 164 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
| 165 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
Romain Guy | e4d0112 | 2010-06-16 18:44:05 -0700 | [diff] [blame] | 166 | |
John Reck | a2732a2 | 2014-12-18 13:52:33 -0800 | [diff] [blame] | 167 | include $(BUILD_SHARED_LIBRARY) |
Andreas Gampe | edaecc1 | 2014-11-10 20:54:07 -0800 | [diff] [blame] | 168 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 169 | # ------------------------ |
| 170 | # unit tests |
| 171 | # ------------------------ |
| 172 | |
| 173 | include $(CLEAR_VARS) |
| 174 | |
| 175 | LOCAL_MODULE := hwui_unit_tests |
| 176 | LOCAL_MODULE_TAGS := tests |
| 177 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 178 | LOCAL_STATIC_LIBRARIES := libhwui_static |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 179 | LOCAL_CFLAGS := $(hwui_cflags) |
| 180 | |
| 181 | LOCAL_SRC_FILES += \ |
Chris Craik | 9557106 | 2015-09-02 12:55:52 -0700 | [diff] [blame] | 182 | unit_tests/CanvasStateTests.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 183 | unit_tests/ClipAreaTests.cpp \ |
| 184 | unit_tests/DamageAccumulatorTests.cpp \ |
Chris Craik | 6e6646c | 2015-09-14 15:54:12 -0700 | [diff] [blame] | 185 | unit_tests/LinearAllocatorTests.cpp \ |
| 186 | unit_tests/StringUtilsTests.cpp |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 187 | |
Chris Craik | b565df1 | 2015-10-05 13:00:52 -0700 | [diff] [blame^] | 188 | ifeq (true, $(HWUI_NEW_OPS)) |
| 189 | LOCAL_SRC_FILES += \ |
| 190 | unit_tests/BakedOpStateTests.cpp \ |
| 191 | unit_tests/RecordingCanvasTests.cpp \ |
| 192 | unit_tests/OpReordererTests.cpp |
| 193 | endif |
| 194 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 195 | include $(BUILD_NATIVE_TEST) |
| 196 | |
| 197 | # ------------------------ |
| 198 | # test app |
| 199 | # ------------------------ |
| 200 | |
| 201 | include $(CLEAR_VARS) |
| 202 | |
| 203 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp |
| 204 | LOCAL_MODULE:= hwuitest |
| 205 | LOCAL_MODULE_TAGS := tests |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 206 | LOCAL_MODULE_CLASS := EXECUTABLES |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 207 | LOCAL_MULTILIB := both |
| 208 | LOCAL_MODULE_STEM_32 := hwuitest |
| 209 | LOCAL_MODULE_STEM_64 := hwuitest64 |
| 210 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 211 | LOCAL_CFLAGS := $(hwui_cflags) |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 212 | |
| 213 | HWUI_NULL_GPU := false |
| 214 | |
| 215 | ifeq (true, $(HWUI_NULL_GPU)) |
John Reck | e248bd1 | 2015-08-05 13:53:53 -0700 | [diff] [blame] | 216 | # Only need to specify the includes if we are not linking against |
| 217 | # libhwui_static as libhwui_static exports the appropriate includes |
| 218 | LOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include) |
| 219 | |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 220 | LOCAL_SRC_FILES := \ |
| 221 | $(hwui_src_files) \ |
| 222 | tests/nullegl.cpp \ |
| 223 | tests/nullgles.cpp |
| 224 | |
| 225 | LOCAL_CFLAGS += -DHWUI_NULL_GPU |
| 226 | else |
| 227 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
| 228 | endif |
| 229 | |
| 230 | LOCAL_SRC_FILES += \ |
| 231 | tests/TestContext.cpp \ |
John Reck | e702c9c | 2015-10-07 10:26:02 -0700 | [diff] [blame] | 232 | tests/TreeContentAnimation.cpp \ |
John Reck | d2e7214 | 2015-08-17 13:11:43 -0700 | [diff] [blame] | 233 | tests/main.cpp |
| 234 | |
| 235 | include $(BUILD_EXECUTABLE) |
John Reck | 4a4bc89 | 2015-10-12 07:38:22 -0700 | [diff] [blame] | 236 | |
| 237 | # ------------------------ |
| 238 | # Micro-bench app |
| 239 | # --------------------- |
| 240 | include $(CLEAR_VARS) |
| 241 | |
| 242 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp |
| 243 | LOCAL_MODULE:= hwuimicro |
| 244 | LOCAL_MODULE_TAGS := tests |
| 245 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 246 | LOCAL_MULTILIB := both |
| 247 | LOCAL_MODULE_STEM_32 := hwuimicro |
| 248 | LOCAL_MODULE_STEM_64 := hwuimicro64 |
| 249 | LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) |
| 250 | LOCAL_CFLAGS := $(hwui_cflags) |
| 251 | LOCAL_C_INCLUDES += bionic/benchmarks/ |
| 252 | |
| 253 | LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static |
| 254 | LOCAL_STATIC_LIBRARIES := libbenchmark libbase |
| 255 | |
| 256 | LOCAL_SRC_FILES += \ |
| 257 | microbench/DisplayListCanvasBench.cpp |
| 258 | |
| 259 | include $(BUILD_EXECUTABLE) |