diff --git a/libs/hwui/Android.common.mk b/libs/hwui/Android.common.mk deleted file mode 100644 index 5c487092f08f2..0000000000000 --- a/libs/hwui/Android.common.mk +++ /dev/null @@ -1,118 +0,0 @@ -# getConfig in external/skia/include/core/SkBitmap.h is deprecated. -# Allow Gnu extension: in-class initializer of static 'const float' member. -# DeferredLayerUpdater.h: private field 'mRenderThread' is not used. - -LOCAL_SRC_FILES := \ - font/CacheTexture.cpp \ - font/Font.cpp \ - renderstate/Blend.cpp \ - renderstate/MeshState.cpp \ - renderstate/PixelBufferState.cpp \ - renderstate/RenderState.cpp \ - renderstate/Scissor.cpp \ - renderstate/Stencil.cpp \ - renderstate/TextureState.cpp \ - renderthread/CanvasContext.cpp \ - renderthread/DrawFrameTask.cpp \ - renderthread/EglManager.cpp \ - renderthread/RenderProxy.cpp \ - renderthread/RenderTask.cpp \ - renderthread/RenderThread.cpp \ - renderthread/TimeLord.cpp \ - thread/TaskManager.cpp \ - utils/Blur.cpp \ - utils/GLUtils.cpp \ - utils/LinearAllocator.cpp \ - utils/NinePatchImpl.cpp \ - AmbientShadow.cpp \ - AnimationContext.cpp \ - Animator.cpp \ - AnimatorManager.cpp \ - AssetAtlas.cpp \ - Caches.cpp \ - CanvasState.cpp \ - ClipArea.cpp \ - DamageAccumulator.cpp \ - DeferredDisplayList.cpp \ - DeferredLayerUpdater.cpp \ - DisplayList.cpp \ - DisplayListCanvas.cpp \ - Dither.cpp \ - Extensions.cpp \ - FboCache.cpp \ - FontRenderer.cpp \ - FrameInfo.cpp \ - FrameInfoVisualizer.cpp \ - GammaFontRenderer.cpp \ - GlopBuilder.cpp \ - GradientCache.cpp \ - Image.cpp \ - Interpolator.cpp \ - JankTracker.cpp \ - Layer.cpp \ - LayerCache.cpp \ - LayerRenderer.cpp \ - Matrix.cpp \ - OpenGLRenderer.cpp \ - Patch.cpp \ - PatchCache.cpp \ - PathCache.cpp \ - PathTessellator.cpp \ - PixelBuffer.cpp \ - Program.cpp \ - ProgramCache.cpp \ - Properties.cpp \ - RenderBufferCache.cpp \ - RenderNode.cpp \ - RenderProperties.cpp \ - ResourceCache.cpp \ - ShadowTessellator.cpp \ - SkiaCanvas.cpp \ - SkiaCanvasProxy.cpp \ - SkiaShader.cpp \ - Snapshot.cpp \ - SpotShadow.cpp \ - TessellationCache.cpp \ - TextDropShadowCache.cpp \ - Texture.cpp \ - TextureCache.cpp - -intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,) - -LOCAL_C_INCLUDES += \ - external/skia/src/core - -LOCAL_CFLAGS += -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES -LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libEGL libGLESv2 libskia libui libgui - -ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) - LOCAL_CFLAGS += -DANDROID_ENABLE_RENDERSCRIPT - LOCAL_SHARED_LIBRARIES += libRS libRScpp - LOCAL_C_INCLUDES += \ - $(intermediates) \ - frameworks/rs/cpp \ - frameworks/rs \ - -endif - -ifndef HWUI_COMPILE_SYMBOLS - LOCAL_CFLAGS += -fvisibility=hidden -endif - -ifdef HWUI_COMPILE_FOR_PERF - # TODO: Non-arm? - LOCAL_CFLAGS += -fno-omit-frame-pointer -marm -mapcs -endif - -ifeq (true, $(HWUI_NULL_GPU)) - LOCAL_SRC_FILES += \ - tests/nullegl.cpp \ - tests/nullgles.cpp - - LOCAL_CFLAGS += -DHWUI_NULL_GPU -endif - -# Defaults for ATRACE_TAG and LOG_TAG for libhwui -LOCAL_CFLAGS += -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" -LOCAL_CFLAGS += -Wall -Wno-unused-parameter -Wunreachable-code -LOCAL_CFLAGS += -ffast-math -O3 -Werror diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk index 91e289c32b97e..b3b3479ebe534 100644 --- a/libs/hwui/Android.mk +++ b/libs/hwui/Android.mk @@ -2,11 +2,198 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +hwui_src_files := \ + font/CacheTexture.cpp \ + font/Font.cpp \ + renderstate/Blend.cpp \ + renderstate/MeshState.cpp \ + renderstate/PixelBufferState.cpp \ + renderstate/RenderState.cpp \ + renderstate/Scissor.cpp \ + renderstate/Stencil.cpp \ + renderstate/TextureState.cpp \ + renderthread/CanvasContext.cpp \ + renderthread/DrawFrameTask.cpp \ + renderthread/EglManager.cpp \ + renderthread/RenderProxy.cpp \ + renderthread/RenderTask.cpp \ + renderthread/RenderThread.cpp \ + renderthread/TimeLord.cpp \ + thread/TaskManager.cpp \ + utils/Blur.cpp \ + utils/GLUtils.cpp \ + utils/LinearAllocator.cpp \ + utils/NinePatchImpl.cpp \ + AmbientShadow.cpp \ + AnimationContext.cpp \ + Animator.cpp \ + AnimatorManager.cpp \ + AssetAtlas.cpp \ + Caches.cpp \ + CanvasState.cpp \ + ClipArea.cpp \ + DamageAccumulator.cpp \ + DeferredDisplayList.cpp \ + DeferredLayerUpdater.cpp \ + DisplayList.cpp \ + DisplayListCanvas.cpp \ + Dither.cpp \ + Extensions.cpp \ + FboCache.cpp \ + FontRenderer.cpp \ + FrameInfo.cpp \ + FrameInfoVisualizer.cpp \ + GammaFontRenderer.cpp \ + GlopBuilder.cpp \ + GradientCache.cpp \ + Image.cpp \ + Interpolator.cpp \ + JankTracker.cpp \ + Layer.cpp \ + LayerCache.cpp \ + LayerRenderer.cpp \ + Matrix.cpp \ + OpenGLRenderer.cpp \ + Patch.cpp \ + PatchCache.cpp \ + PathCache.cpp \ + PathTessellator.cpp \ + PixelBuffer.cpp \ + Program.cpp \ + ProgramCache.cpp \ + Properties.cpp \ + RenderBufferCache.cpp \ + RenderNode.cpp \ + RenderProperties.cpp \ + ResourceCache.cpp \ + ShadowTessellator.cpp \ + SkiaCanvas.cpp \ + SkiaCanvasProxy.cpp \ + SkiaShader.cpp \ + Snapshot.cpp \ + SpotShadow.cpp \ + TessellationCache.cpp \ + TextDropShadowCache.cpp \ + Texture.cpp \ + TextureCache.cpp + +hwui_cflags := \ + -DEGL_EGLEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES \ + -DATRACE_TAG=ATRACE_TAG_VIEW -DLOG_TAG=\"OpenGLRenderer\" \ + -Wall -Wno-unused-parameter -Wunreachable-code \ + -ffast-math -O3 -Werror + +ifndef HWUI_COMPILE_SYMBOLS + hwui_cflags += -fvisibility=hidden +endif + +ifdef HWUI_COMPILE_FOR_PERF + # TODO: Non-arm? + hwui_cflags += -fno-omit-frame-pointer -marm -mapcs +endif + +hwui_c_includes += \ + external/skia/src/core + +hwui_shared_libraries := \ + liblog \ + libcutils \ + libutils \ + libEGL \ + libGLESv2 \ + libskia \ + libui \ + libgui \ + +ifneq (false,$(ANDROID_ENABLE_RENDERSCRIPT)) + hwui_cflags += -DANDROID_ENABLE_RENDERSCRIPT + hwui_shared_libraries += libRS libRScpp + hwui_c_includes += \ + $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,) \ + frameworks/rs/cpp \ + frameworks/rs +endif + + +# ------------------------ +# static library +# ------------------------ + +include $(CLEAR_VARS) + +LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_MODULE := libhwui_static +LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) +LOCAL_CFLAGS := $(hwui_cflags) +LOCAL_SRC_FILES := $(hwui_src_files) +LOCAL_C_INCLUDES := $(hwui_c_includes) + +include $(BUILD_STATIC_LIBRARY) + +# ------------------------ +# shared library +# ------------------------ + +include $(CLEAR_VARS) + LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_MODULE := libhwui - -include $(LOCAL_PATH)/Android.common.mk +LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static +LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) include $(BUILD_SHARED_LIBRARY) -include $(call all-makefiles-under,$(LOCAL_PATH)) +# ------------------------ +# unit tests +# ------------------------ + +include $(CLEAR_VARS) + +LOCAL_MODULE := hwui_unit_tests +LOCAL_MODULE_TAGS := tests +LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) +LOCAL_STATIC_LIBRARIES := libhwui_static +LOCAL_C_INCLUDES := $(hwui_c_includes) +LOCAL_CFLAGS := $(hwui_cflags) + +LOCAL_SRC_FILES += \ + unit_tests/ClipAreaTests.cpp \ + unit_tests/DamageAccumulatorTests.cpp \ + unit_tests/LinearAllocatorTests.cpp + +include $(BUILD_NATIVE_TEST) + +# ------------------------ +# test app +# ------------------------ + +include $(CLEAR_VARS) + +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp +LOCAL_MODULE:= hwuitest +LOCAL_MODULE_TAGS := tests +LOCAL_MULTILIB := both +LOCAL_MODULE_STEM_32 := hwuitest +LOCAL_MODULE_STEM_64 := hwuitest64 +LOCAL_SHARED_LIBRARIES := $(hwui_shared_libraries) +LOCAL_CFLAGS := $(hwui_cflags) +LOCAL_C_INCLUDES := $(hwui_c_includes) + +HWUI_NULL_GPU := false + +ifeq (true, $(HWUI_NULL_GPU)) + LOCAL_SRC_FILES := \ + $(hwui_src_files) \ + tests/nullegl.cpp \ + tests/nullgles.cpp + + LOCAL_CFLAGS += -DHWUI_NULL_GPU +else + LOCAL_WHOLE_STATIC_LIBRARIES := libhwui_static +endif + +LOCAL_SRC_FILES += \ + tests/TestContext.cpp \ + tests/main.cpp + +include $(BUILD_EXECUTABLE) diff --git a/libs/hwui/tests/Android.mk b/libs/hwui/tests/Android.mk deleted file mode 100644 index b6f0baf4bf3ea..0000000000000 --- a/libs/hwui/tests/Android.mk +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright (C) 2014 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -local_target_dir := $(TARGET_OUT_DATA)/local/tmp -LOCAL_PATH:= $(call my-dir)/.. -include $(CLEAR_VARS) - -LOCAL_MODULE_PATH := $(local_target_dir) -LOCAL_MODULE:= hwuitest -LOCAL_MODULE_TAGS := tests -LOCAL_MULTILIB := both -LOCAL_MODULE_STEM_32 := hwuitest -LOCAL_MODULE_STEM_64 := hwuitest64 - -HWUI_NULL_GPU := false - -include $(LOCAL_PATH)/Android.common.mk - -LOCAL_SRC_FILES += \ - tests/TestContext.cpp \ - tests/main.cpp - -include $(BUILD_EXECUTABLE) diff --git a/libs/hwui/tests/how_to_run.txt b/libs/hwui/tests/how_to_run.txt index 686cd7878c506..85900eff2f78c 100644 --- a/libs/hwui/tests/how_to_run.txt +++ b/libs/hwui/tests/how_to_run.txt @@ -1,4 +1,4 @@ -mmm -j8 frameworks/base/libs/hwui/tests/ && +mmm -j8 frameworks/base/libs/hwui/ && adb push $OUT/data/local/tmp/hwuitest /data/local/tmp/hwuitest && adb shell /data/local/tmp/hwuitest diff --git a/libs/hwui/unit_tests/Android.mk b/libs/hwui/unit_tests/Android.mk deleted file mode 100644 index 93cee4a26b055..0000000000000 --- a/libs/hwui/unit_tests/Android.mk +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright (C) 2014 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -LOCAL_PATH:= $(call my-dir)/.. - -include $(CLEAR_VARS) - -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.common.mk -LOCAL_MODULE := hwui_unit_tests -LOCAL_MODULE_TAGS := tests - -include $(LOCAL_PATH)/Android.common.mk - -LOCAL_SRC_FILES += \ - unit_tests/ClipAreaTests.cpp \ - unit_tests/DamageAccumulatorTests.cpp \ - unit_tests/LinearAllocatorTests.cpp - - -include $(BUILD_NATIVE_TEST) diff --git a/libs/hwui/unit_tests/how_to_run.txt b/libs/hwui/unit_tests/how_to_run.txt index a2d6a34726dfb..c11d6eb333587 100755 --- a/libs/hwui/unit_tests/how_to_run.txt +++ b/libs/hwui/unit_tests/how_to_run.txt @@ -1,4 +1,4 @@ -mmm -j8 $ANDROID_BUILD_TOP/frameworks/base/libs/hwui/unit_tests && +mmm -j8 frameworks/base/libs/hwui && adb push $ANDROID_PRODUCT_OUT/data/nativetest/hwui_unit_tests/hwui_unit_tests \ /data/nativetest/hwui_unit_tests/hwui_unit_tests && adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests