1e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain GuyLOCAL_PATH:= $(call my-dir)
2e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guyinclude $(CLEAR_VARS)
388ba339aefd74ffe0ea978ebb659a430f82940f0Dan AlbertLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
4e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy
5f0a76088f8132ca3ea10241c55c5e81aebe072c2Chris CraikHWUI_NEW_OPS := true
6b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craik
7975591a7af883d866d86ab819e164c6004694744John Reck# Enables fine-grained GLES error checking
8975591a7af883d866d86ab819e164c6004694744John Reck# If set to true, every GLES call is wrapped & error checked
9975591a7af883d866d86ab819e164c6004694744John Reck# Has moderate overhead
10756619da203bcdb9db19238ba6712c5bfb062009John ReckHWUI_ENABLE_OPENGL_VALIDATION := false
11975591a7af883d866d86ab819e164c6004694744John Reck
12d2e72141797e92ced2f076f6b3899a6b450966b4John Reckhwui_src_files := \
13d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    font/CacheTexture.cpp \
14d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    font/Font.cpp \
15dccca44ffda4836b56a21da95a046c9708ffd49csergeyv    hwui/Canvas.cpp \
16dccca44ffda4836b56a21da95a046c9708ffd49csergeyv    hwui/MinikinSkia.cpp \
17dccca44ffda4836b56a21da95a046c9708ffd49csergeyv    hwui/MinikinUtils.cpp \
18dccca44ffda4836b56a21da95a046c9708ffd49csergeyv    hwui/PaintImpl.cpp \
19bad99183916ba2bac6659efc8a28273e344ba511sergeyv    hwui/Typeface.cpp \
20d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderstate/Blend.cpp \
21d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderstate/MeshState.cpp \
229fded232a9548a304e0145011df8849fba0dcda7Chris Craik    renderstate/OffscreenBufferPool.cpp \
23d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderstate/PixelBufferState.cpp \
24d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderstate/RenderState.cpp \
25d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderstate/Scissor.cpp \
26d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderstate/Stencil.cpp \
27d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderstate/TextureState.cpp \
28d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderthread/CanvasContext.cpp \
29d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderthread/DrawFrameTask.cpp \
30d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderthread/EglManager.cpp \
31d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderthread/RenderProxy.cpp \
32d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderthread/RenderTask.cpp \
33d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderthread/RenderThread.cpp \
34d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    renderthread/TimeLord.cpp \
35d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    thread/TaskManager.cpp \
36d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    utils/Blur.cpp \
37d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    utils/GLUtils.cpp \
38d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    utils/LinearAllocator.cpp \
394c5efe9290543b723b76a8bd48518da1ae1dcb26Derek Sollenberger    utils/NinePatchImpl.cpp \
406e6646c03788f198a9878763680c05342d7622f3Chris Craik    utils/StringUtils.cpp \
41b2f5bd2d6043132d8c1d0f3e2e7e454c2693f499Tom Hudson    utils/TestWindowContext.cpp \
42804618d0863a5d8ad1b08a846bd5319be864a1cbDoris Liu    utils/VectorDrawableUtils.cpp \
43d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    AmbientShadow.cpp \
44d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    AnimationContext.cpp \
45d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Animator.cpp \
46d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    AnimatorManager.cpp \
47d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    AssetAtlas.cpp \
48d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Caches.cpp \
49d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    CanvasState.cpp \
50d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    ClipArea.cpp \
51d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    DamageAccumulator.cpp \
52d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    DeferredDisplayList.cpp \
53d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    DeferredLayerUpdater.cpp \
54704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck    DeviceInfo.cpp \
55d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    DisplayList.cpp \
56d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    DisplayListCanvas.cpp \
57d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Dither.cpp \
58d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Extensions.cpp \
59d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    FboCache.cpp \
60d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    FontRenderer.cpp \
61d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    FrameInfo.cpp \
62d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    FrameInfoVisualizer.cpp \
63d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    GammaFontRenderer.cpp \
64d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    GlopBuilder.cpp \
6538e0c32852e3b9d8ca4a9d3791577f52536419cbJohn Reck    GpuMemoryTracker.cpp \
66d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    GradientCache.cpp \
67d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Image.cpp \
68d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Interpolator.cpp \
69d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    JankTracker.cpp \
70d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Layer.cpp \
71d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    LayerCache.cpp \
72d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    LayerRenderer.cpp \
730b7e8245db728d127ada698be63d78b33fc6e4daChris Craik    LayerUpdateQueue.cpp \
74d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Matrix.cpp \
75d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    OpenGLRenderer.cpp \
76d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Patch.cpp \
77d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    PatchCache.cpp \
78d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    PathCache.cpp \
79d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    PathTessellator.cpp \
8030bcf69df9cfae40b621335958656cb0e4afd7d5Doris Liu    PathParser.cpp \
81d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    PixelBuffer.cpp \
82d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Program.cpp \
83d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    ProgramCache.cpp \
84d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Properties.cpp \
85766431aa57c16ece8842287a92b2e7208e3b8ac3Doris Liu    PropertyValuesHolder.cpp \
86766431aa57c16ece8842287a92b2e7208e3b8ac3Doris Liu    PropertyValuesAnimatorSet.cpp \
8710dd0585c11dcedb5a271d54e645594f1d215d5cJohn Reck    Readback.cpp \
88d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    RenderBufferCache.cpp \
89d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    RenderNode.cpp \
90d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    RenderProperties.cpp \
91d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    ResourceCache.cpp \
92d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    ShadowTessellator.cpp \
93d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    SkiaCanvas.cpp \
94d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    SkiaCanvasProxy.cpp \
95d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    SkiaShader.cpp \
96d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Snapshot.cpp \
97d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    SpotShadow.cpp \
98d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    TessellationCache.cpp \
99d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    TextDropShadowCache.cpp \
100d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    Texture.cpp \
101e248bd1b2c3fcf8088429507e73b31f45ee2544bJohn Reck    TextureCache.cpp \
1024bbc2931263b232fba61807fca00e127573eff42Doris Liu    VectorDrawable.cpp \
103e248bd1b2c3fcf8088429507e73b31f45ee2544bJohn Reck    protos/hwui.proto
104d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
1058160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craikhwui_test_common_src_files := \
10627e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craik    $(call all-cpp-files-under, tests/common/scenes) \
10727e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craik    tests/common/TestContext.cpp \
10827e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craik    tests/common/TestScene.cpp \
1098160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/common/TestUtils.cpp
1108160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik
111d2e72141797e92ced2f076f6b3899a6b450966b4John Reckhwui_cflags := \
112d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES \
113d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" \
11482f5e0c5cd0fcbacd8094b7963a50a2e30e0846fJohn Reck    -Wall -Wno-unused-parameter -Wunreachable-code -Werror
115d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
116c90ed759cf06072f2aecc57dc82d7be8cbfd6d73John Reck# GCC false-positives on this warning, and since we -Werror that's
117c90ed759cf06072f2aecc57dc82d7be8cbfd6d73John Reck# a problem
118c90ed759cf06072f2aecc57dc82d7be8cbfd6d73John Reckhwui_cflags += -Wno-free-nonheap-object
119c90ed759cf06072f2aecc57dc82d7be8cbfd6d73John Reck
120b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craikifeq (true, $(HWUI_NEW_OPS))
121b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craik    hwui_src_files += \
1229e7fcfda28fde747ba4e026772007cea77374e16Chris Craik        BakedOpDispatcher.cpp \
123b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craik        BakedOpRenderer.cpp \
124e4db79de127cfe961195f52907af8451026eaa20Chris Craik        BakedOpState.cpp \
125f158b49c888f722194afe5a80539a2b020c130bcChris Craik        FrameBuilder.cpp \
126f158b49c888f722194afe5a80539a2b020c130bcChris Craik        LayerBuilder.cpp \
12791eff22b5d7f8fe551bae01331948858ce932a96Chris Craik        OpDumper.cpp \
128b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craik        RecordingCanvas.cpp
129b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craik
130b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craik    hwui_cflags += -DHWUI_NEW_OPS
131b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craik
132b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craikendif
133b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craik
134d2e72141797e92ced2f076f6b3899a6b450966b4John Reckifndef HWUI_COMPILE_SYMBOLS
135d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    hwui_cflags += -fvisibility=hidden
136d2e72141797e92ced2f076f6b3899a6b450966b4John Reckendif
137d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
138d2e72141797e92ced2f076f6b3899a6b450966b4John Reckifdef HWUI_COMPILE_FOR_PERF
139d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    # TODO: Non-arm?
140d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    hwui_cflags += -fno-omit-frame-pointer -marm -mapcs
141d2e72141797e92ced2f076f6b3899a6b450966b4John Reckendif
142d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
143e248bd1b2c3fcf8088429507e73b31f45ee2544bJohn Reck# This has to be lazy-resolved because it depends on the LOCAL_MODULE_CLASS
144e248bd1b2c3fcf8088429507e73b31f45ee2544bJohn Reck# which varies depending on what is being built
145e248bd1b2c3fcf8088429507e73b31f45ee2544bJohn Reckdefine hwui_proto_include
146e248bd1b2c3fcf8088429507e73b31f45ee2544bJohn Reck$(call local-generated-sources-dir)/proto/$(LOCAL_PATH)
147e248bd1b2c3fcf8088429507e73b31f45ee2544bJohn Reckendef
148e248bd1b2c3fcf8088429507e73b31f45ee2544bJohn Reck
149d2e72141797e92ced2f076f6b3899a6b450966b4John Reckhwui_c_includes += \
150550780745fa28ae9a87d02331841ca5ce4f9c763Leon Scroggins III    external/skia/include/private \
151dccca44ffda4836b56a21da95a046c9708ffd49csergeyv    external/skia/src/core \
152dccca44ffda4836b56a21da95a046c9708ffd49csergeyv    external/harfbuzz_ng/src \
153dccca44ffda4836b56a21da95a046c9708ffd49csergeyv    external/freetype/include
154d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
155d2e72141797e92ced2f076f6b3899a6b450966b4John Reckifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT))
156d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT
157d2e72141797e92ced2f076f6b3899a6b450966b4John Reck    hwui_c_includes += \
158d2e72141797e92ced2f076f6b3899a6b450966b4John Reck        $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,) \
159d2e72141797e92ced2f076f6b3899a6b450966b4John Reck        frameworks/rs/cpp \
160d2e72141797e92ced2f076f6b3899a6b450966b4John Reck        frameworks/rs
161d2e72141797e92ced2f076f6b3899a6b450966b4John Reckendif
162d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
163975591a7af883d866d86ab819e164c6004694744John Reckifeq (true, $(HWUI_ENABLE_OPENGL_VALIDATION))
164975591a7af883d866d86ab819e164c6004694744John Reck    hwui_cflags += -include debug/wrap_gles.h
165975591a7af883d866d86ab819e164c6004694744John Reck    hwui_src_files += debug/wrap_gles.cpp
166975591a7af883d866d86ab819e164c6004694744John Reck    hwui_c_includes += frameworks/native/opengl/libs/GLES2
167975591a7af883d866d86ab819e164c6004694744John Reck    hwui_cflags += -DDEBUG_OPENGL=3
168975591a7af883d866d86ab819e164c6004694744John Reckendif
169975591a7af883d866d86ab819e164c6004694744John Reck
170d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
171d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# ------------------------
172d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# static library
173d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# ------------------------
174d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
175d2e72141797e92ced2f076f6b3899a6b450966b4John Reckinclude $(CLEAR_VARS)
176d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
177d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_MODULE_CLASS := STATIC_LIBRARIES
178d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_MODULE := libhwui_static
179d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_CFLAGS := $(hwui_cflags)
180d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_SRC_FILES := $(hwui_src_files)
181e248bd1b2c3fcf8088429507e73b31f45ee2544bJohn ReckLOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include)
182991da31d4073396768f215c5c3e77e54368da75fDerek SollenbergerLOCAL_EXPORT_C_INCLUDE_DIRS := \
183991da31d4073396768f215c5c3e77e54368da75fDerek Sollenberger        $(LOCAL_PATH) \
184991da31d4073396768f215c5c3e77e54368da75fDerek Sollenberger        $(hwui_c_includes) \
185991da31d4073396768f215c5c3e77e54368da75fDerek Sollenberger        $(call hwui_proto_include)
186d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
187991da31d4073396768f215c5c3e77e54368da75fDerek Sollenbergerinclude $(LOCAL_PATH)/hwui_static_deps.mk
188d2e72141797e92ced2f076f6b3899a6b450966b4John Reckinclude $(BUILD_STATIC_LIBRARY)
189d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
190d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# ------------------------
1915fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik# static library null gpu
1925fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik# ------------------------
1935fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik
1945fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craikinclude $(CLEAR_VARS)
1955fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik
1965fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris CraikLOCAL_MODULE_CLASS := STATIC_LIBRARIES
1975fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris CraikLOCAL_MODULE := libhwui_static_null_gpu
1985fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris CraikLOCAL_CFLAGS := \
1995fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik        $(hwui_cflags) \
2005fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik        -DHWUI_NULL_GPU
2015fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris CraikLOCAL_SRC_FILES := \
2025fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik        $(hwui_src_files) \
203975591a7af883d866d86ab819e164c6004694744John Reck        debug/nullegl.cpp \
204975591a7af883d866d86ab819e164c6004694744John Reck        debug/nullgles.cpp
2055fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris CraikLOCAL_C_INCLUDES := $(hwui_c_includes) $(call hwui_proto_include)
206991da31d4073396768f215c5c3e77e54368da75fDerek SollenbergerLOCAL_EXPORT_C_INCLUDE_DIRS := \
207991da31d4073396768f215c5c3e77e54368da75fDerek Sollenberger        $(LOCAL_PATH) \
208991da31d4073396768f215c5c3e77e54368da75fDerek Sollenberger        $(hwui_c_includes) \
209991da31d4073396768f215c5c3e77e54368da75fDerek Sollenberger        $(call hwui_proto_include)
2105fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik
211991da31d4073396768f215c5c3e77e54368da75fDerek Sollenbergerinclude $(LOCAL_PATH)/hwui_static_deps.mk
2125fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craikinclude $(BUILD_STATIC_LIBRARY)
2135fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik
2145fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik# ------------------------
215d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# shared library
216d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# ------------------------
217d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
218d2e72141797e92ced2f076f6b3899a6b450966b4John Reckinclude $(CLEAR_VARS)
219d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
220a2732a2bf98f7dbd063f4e5679f5b8bfcbec2698John ReckLOCAL_MODULE_CLASS := SHARED_LIBRARIES
221a2732a2bf98f7dbd063f4e5679f5b8bfcbec2698John ReckLOCAL_MODULE := libhwui
222d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static
223991da31d4073396768f215c5c3e77e54368da75fDerek SollenbergerLOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
224e4d011201cea40d46cb2b2eef401db8fddc5c9c6Romain Guy
225991da31d4073396768f215c5c3e77e54368da75fDerek Sollenbergerinclude $(LOCAL_PATH)/hwui_static_deps.mk
226a2732a2bf98f7dbd063f4e5679f5b8bfcbec2698John Reckinclude $(BUILD_SHARED_LIBRARY)
227edaecc1db0584fa017822dfc2da0c968b53967e6Andreas Gampe
228d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# ------------------------
229d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# unit tests
230d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# ------------------------
231d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
232d2e72141797e92ced2f076f6b3899a6b450966b4John Reckinclude $(CLEAR_VARS)
233d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
234d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_MODULE := hwui_unit_tests
235d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_MODULE_TAGS := tests
2365fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris CraikLOCAL_STATIC_LIBRARIES := libhwui_static_null_gpu
237dc87c52cd5645dd87380114462211574b63e6353John ReckLOCAL_SHARED_LIBRARIES := libmemunreachable
23898787e6c9b2c10b1ab7820bdac168686025b924aChris CraikLOCAL_CFLAGS := \
23998787e6c9b2c10b1ab7820bdac168686025b924aChris Craik        $(hwui_cflags) \
24098787e6c9b2c10b1ab7820bdac168686025b924aChris Craik        -DHWUI_NULL_GPU
241d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
242d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_SRC_FILES += \
2438160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    $(hwui_test_common_src_files) \
244dc87c52cd5645dd87380114462211574b63e6353John Reck    tests/unit/main.cpp \
2458160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/unit/CanvasStateTests.cpp \
2468160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/unit/ClipAreaTests.cpp \
2478160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/unit/DamageAccumulatorTests.cpp \
2488160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/unit/DeviceInfoTests.cpp \
2498160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/unit/FatVectorTests.cpp \
250f3754a84289680782b2c7caac30fda18207a5c23Chris Craik    tests/unit/FontRendererTests.cpp \
251f42bf3e2573bccb01babec448f925e9395bf224csergeyv    tests/unit/GlopBuilderTests.cpp \
25238e0c32852e3b9d8ca4a9d3791577f52536419cbJohn Reck    tests/unit/GpuMemoryTrackerTests.cpp \
25304d46eb69fb4f4c4c332c36c6ae845da3b2ae848Chris Craik    tests/unit/GradientCacheTests.cpp \
2548160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/unit/LayerUpdateQueueTests.cpp \
2558160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/unit/LinearAllocatorTests.cpp \
256261725fdb2962271c222a049fcdf57bbdc8363c7Chris Craik    tests/unit/MatrixTests.cpp \
2578160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/unit/OffscreenBufferPoolTests.cpp \
25844b49f070aafe8ad44efae87341121cce49ff11cJohn Reck    tests/unit/RenderNodeTests.cpp \
259d4fe4d3b30aaefcaaae6a6d1b8dc4bf59e034768Chris Craik    tests/unit/RenderPropertiesTests.cpp \
26007d8d59e21125fe7cba09b10e3dd7ecb9c49e8d8Chris Craik    tests/unit/SkiaBehaviorTests.cpp \
26104d46eb69fb4f4c4c332c36c6ae845da3b2ae848Chris Craik    tests/unit/SnapshotTests.cpp \
26206f5bc70a667a02b14e31d3f53f91d3661e30666Andres Morales    tests/unit/StringUtilsTests.cpp \
26337413289478a965336239c731ebfea37ac4dde28Chris Craik    tests/unit/TestUtilsTests.cpp \
26407d8d59e21125fe7cba09b10e3dd7ecb9c49e8d8Chris Craik    tests/unit/TextDropShadowCacheTests.cpp \
26504d46eb69fb4f4c4c332c36c6ae845da3b2ae848Chris Craik    tests/unit/VectorDrawableTests.cpp
266d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
267b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craikifeq (true, $(HWUI_NEW_OPS))
268b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craik    LOCAL_SRC_FILES += \
269419a1e7ef53468e494d21c66ea7f63c0c522d208Chris Craik        tests/unit/BakedOpDispatcherTests.cpp \
27002806288d1c56475413888a934c796e6e4eb11c5Chris Craik        tests/unit/BakedOpRendererTests.cpp \
2718160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik        tests/unit/BakedOpStateTests.cpp \
272f158b49c888f722194afe5a80539a2b020c130bcChris Craik        tests/unit/FrameBuilderTests.cpp \
2731b94f9b77cb1a241b42f894572d819cc1153932fJohn Reck        tests/unit/LeakCheckTests.cpp \
27491eff22b5d7f8fe551bae01331948858ce932a96Chris Craik        tests/unit/OpDumperTests.cpp \
27535934cccabf72879603ef37222da2195445f027eDerek Sollenberger        tests/unit/RecordingCanvasTests.cpp \
27635934cccabf72879603ef37222da2195445f027eDerek Sollenberger        tests/unit/SkiaCanvasTests.cpp
277b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craikendif
278b565df13a9e5c7b1d7d93bdfa4a793752d66d3ccChris Craik
279991da31d4073396768f215c5c3e77e54368da75fDerek Sollenbergerinclude $(LOCAL_PATH)/hwui_static_deps.mk
280d2e72141797e92ced2f076f6b3899a6b450966b4John Reckinclude $(BUILD_NATIVE_TEST)
281d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
282d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# ------------------------
2838160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik# Macro-bench app
284d2e72141797e92ced2f076f6b3899a6b450966b4John Reck# ------------------------
285d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
286d2e72141797e92ced2f076f6b3899a6b450966b4John Reckinclude $(CLEAR_VARS)
287d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
288d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
289d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_MODULE:= hwuitest
290d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_MODULE_TAGS := tests
291e248bd1b2c3fcf8088429507e73b31f45ee2544bJohn ReckLOCAL_MODULE_CLASS := EXECUTABLES
292d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_MULTILIB := both
293d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_MODULE_STEM_32 := hwuitest
294d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_MODULE_STEM_64 := hwuitest64
295d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_CFLAGS := $(hwui_cflags)
296d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
2975fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris Craik# set to libhwui_static_null_gpu to skip actual GL commands
2985fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris CraikLOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static
299d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
300d2e72141797e92ced2f076f6b3899a6b450966b4John ReckLOCAL_SRC_FILES += \
3018160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    $(hwui_test_common_src_files) \
3028160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/macrobench/TestSceneRunner.cpp \
3038160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/macrobench/main.cpp
304d2e72141797e92ced2f076f6b3899a6b450966b4John Reck
305991da31d4073396768f215c5c3e77e54368da75fDerek Sollenbergerinclude $(LOCAL_PATH)/hwui_static_deps.mk
306d2e72141797e92ced2f076f6b3899a6b450966b4John Reckinclude $(BUILD_EXECUTABLE)
3074a4bc892e826849bd58606d99408f1bfbceddc3bJohn Reck
3084a4bc892e826849bd58606d99408f1bfbceddc3bJohn Reck# ------------------------
3094a4bc892e826849bd58606d99408f1bfbceddc3bJohn Reck# Micro-bench app
3104a4bc892e826849bd58606d99408f1bfbceddc3bJohn Reck# ---------------------
3114a4bc892e826849bd58606d99408f1bfbceddc3bJohn Reckinclude $(CLEAR_VARS)
3124a4bc892e826849bd58606d99408f1bfbceddc3bJohn Reck
3134a4bc892e826849bd58606d99408f1bfbceddc3bJohn ReckLOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
3144a4bc892e826849bd58606d99408f1bfbceddc3bJohn ReckLOCAL_MODULE:= hwuimicro
3154a4bc892e826849bd58606d99408f1bfbceddc3bJohn ReckLOCAL_MODULE_TAGS := tests
3164a4bc892e826849bd58606d99408f1bfbceddc3bJohn ReckLOCAL_MODULE_CLASS := EXECUTABLES
3174a4bc892e826849bd58606d99408f1bfbceddc3bJohn ReckLOCAL_MULTILIB := both
3184a4bc892e826849bd58606d99408f1bfbceddc3bJohn ReckLOCAL_MODULE_STEM_32 := hwuimicro
3194a4bc892e826849bd58606d99408f1bfbceddc3bJohn ReckLOCAL_MODULE_STEM_64 := hwuimicro64
3208d1f2120fe80b23ab03c7168e3b6b2d13bafe2e7Chris CraikLOCAL_CFLAGS := \
3218d1f2120fe80b23ab03c7168e3b6b2d13bafe2e7Chris Craik        $(hwui_cflags) \
3228d1f2120fe80b23ab03c7168e3b6b2d13bafe2e7Chris Craik        -DHWUI_NULL_GPU
3234a4bc892e826849bd58606d99408f1bfbceddc3bJohn Reck
3245fbd9db67a8b2f11f472358fd70e2e6f0cc236e8Chris CraikLOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static_null_gpu
3250418afa362630e69bd853121770b115750ee46a4John ReckLOCAL_STATIC_LIBRARIES := libgoogle-benchmark
3264a4bc892e826849bd58606d99408f1bfbceddc3bJohn Reck
3274a4bc892e826849bd58606d99408f1bfbceddc3bJohn ReckLOCAL_SRC_FILES += \
3288160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    $(hwui_test_common_src_files) \
3290418afa362630e69bd853121770b115750ee46a4John Reck    tests/microbench/main.cpp \
3308160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/microbench/DisplayListCanvasBench.cpp \
3312c0f93798b2c435307bfb1dfe194a6203e6e6ee5John Reck    tests/microbench/FontBench.cpp \
3328160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/microbench/LinearAllocatorBench.cpp \
3338160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik    tests/microbench/PathParserBench.cpp \
334b251a2f51e636d036598ad27473b9cc55fdac1d7Chris Craik    tests/microbench/ShadowBench.cpp \
335b251a2f51e636d036598ad27473b9cc55fdac1d7Chris Craik    tests/microbench/TaskManagerBench.cpp
3364a4bc892e826849bd58606d99408f1bfbceddc3bJohn Reck
3377db5ffb7dbd30202468459e2ef4426e91d4fcbb3John Reckifeq (true, $(HWUI_NEW_OPS))
3387db5ffb7dbd30202468459e2ef4426e91d4fcbb3John Reck    LOCAL_SRC_FILES += \
3397db5ffb7dbd30202468459e2ef4426e91d4fcbb3John Reck        tests/microbench/FrameBuilderBench.cpp
3407db5ffb7dbd30202468459e2ef4426e91d4fcbb3John Reckendif
3410a24b146cd3dacf372ce98424044423a5b2fbf2aChris Craik
342991da31d4073396768f215c5c3e77e54368da75fDerek Sollenbergerinclude $(LOCAL_PATH)/hwui_static_deps.mk
3434a4bc892e826849bd58606d99408f1bfbceddc3bJohn Reckinclude $(BUILD_EXECUTABLE)
344