hwc: Add additional trace points

Require HAL tag for tracing HWC and add additional trace points
for systrace.

Change-Id: If0abb438da96d3507fb3e2a42bcb8d8b4734fb8f
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 5fd7564..b661e5e 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -17,7 +17,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+#define ATRACE_TAG (ATRACE_TAG_GRAPHICS | ATRACE_TAG_HAL)
 #include <fcntl.h>
 #include <errno.h>
 
@@ -144,6 +144,7 @@
 
 static int hwc_prepare_primary(hwc_composer_device_1 *dev,
         hwc_display_contents_1_t *list) {
+    ATRACE_CALL();
     hwc_context_t* ctx = (hwc_context_t*)(dev);
     const int dpy = HWC_DISPLAY_PRIMARY;
     if (LIKELY(list && list->numHwLayers > 1) &&
@@ -169,6 +170,7 @@
 
 static int hwc_prepare_external(hwc_composer_device_1 *dev,
         hwc_display_contents_1_t *list) {
+    ATRACE_CALL();
     hwc_context_t* ctx = (hwc_context_t*)(dev);
     const int dpy = HWC_DISPLAY_EXTERNAL;
 
@@ -210,6 +212,7 @@
 
 static int hwc_prepare_virtual(hwc_composer_device_1 *dev,
         hwc_display_contents_1_t *list) {
+    ATRACE_CALL();
 
     hwc_context_t* ctx = (hwc_context_t*)(dev);
     const int dpy = HWC_DISPLAY_VIRTUAL;
@@ -294,6 +297,7 @@
 static int hwc_eventControl(struct hwc_composer_device_1* dev, int dpy,
                              int event, int enable)
 {
+    ATRACE_CALL();
     int ret = 0;
     hwc_context_t* ctx = (hwc_context_t*)(dev);
     switch(event) {