Add a debug property to enable Skia systrace

Add a "debug.hwui.skia_atrace_enabled" property that allows to
record a systrace with skia drawing ops. App need to be restarted
after setting the new propety to true.

Test: collected skia trace with systemui
Change-Id: I2d1c5911714bfc911894f633ec2df2f6bb953b48
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index d284269..0338a3a 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -17,6 +17,7 @@
 #include "Properties.h"
 #include "Debug.h"
 #include "DeviceInfo.h"
+#include "SkTraceEventCommon.h"
 
 #include <algorithm>
 #include <cstdlib>
@@ -140,6 +141,9 @@
 
     skpCaptureEnabled = debuggingEnabled && property_get_bool(PROPERTY_CAPTURE_SKP_ENABLED, false);
 
+    SkAndroidFrameworkTraceUtil::setEnableTracing(
+            property_get_bool(PROPERTY_SKIA_ATRACE_ENABLED, false));
+
     runningInEmulator = property_get_bool(PROPERTY_QEMU_KERNEL, false);
 
     return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw) ||