Don't clear the dirty clip flag if it's not applied
Bug #6833979
Change-Id: I0ea78b7f31a557a335de10d910d03b0520029080
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 265e12f..a54c188 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -40,14 +40,19 @@
external/skia/include/utils
LOCAL_CFLAGS += -DUSE_OPENGL_RENDERER -DGL_GLEXT_PROTOTYPES
- LOCAL_CFLAGS += -fvisibility=hidden
- # Uncomment the following line to use `perf`
- # LOCAL_CFLAGS += -fno-omit-frame-pointer -marm -mapcs
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_SHARED_LIBRARIES := libcutils libutils libGLESv2 libskia libui
LOCAL_MODULE := libhwui
LOCAL_MODULE_TAGS := optional
-
+
+ ifndef HWUI_COMPILE_SYMBOLS
+ LOCAL_CFLAGS += -fvisibility=hidden
+ endif
+
+ ifdef HWUI_COMPILE_FOR_PERF
+ LOCAL_CFLAGS += -fno-omit-frame-pointer -marm -mapcs
+ endif
+
include $(BUILD_SHARED_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))