egl: plumb through counter events to atrace

egl_angle_platform handled some but not all trace events that ANGLE can
emit. In particular, counters were dropped on the floor.

From a change proposed in b/216025815.

Bug: b/216025815
Change-Id: I7abb78d5feed90de16099e97e4a816f56443cf27
diff --git a/opengl/libs/EGL/egl_angle_platform.cpp b/opengl/libs/EGL/egl_angle_platform.cpp
index d38f2ef..f1122fd 100644
--- a/opengl/libs/EGL/egl_angle_platform.cpp
+++ b/opengl/libs/EGL/egl_angle_platform.cpp
@@ -68,9 +68,9 @@
 
 static TraceEventHandle addTraceEvent(
         PlatformMethods* /**platform*/, char phase, const unsigned char* /*category_group_enabled*/,
-        const char* name, unsigned long long /*id*/, double /*timestamp*/, int /*num_args*/,
-        const char** /*arg_names*/, const unsigned char* /*arg_types*/,
-        const unsigned long long* /*arg_values*/, unsigned char /*flags*/) {
+        const char* name, unsigned long long /*id*/, double /*timestamp*/, int num_args,
+        const char** arg_names, const unsigned char* /*arg_types*/,
+        const unsigned long long* arg_values, unsigned char /*flags*/) {
     switch (phase) {
         case 'B': {
             ATRACE_BEGIN(name);
@@ -84,6 +84,13 @@
             ATRACE_NAME(name);
             break;
         }
+       case 'C': {
+             for(int i=0; i<num_args ; i++)
+             {
+                 ATRACE_INT(arg_names[i],arg_values[i]);
+             }
+             break;
+        }
         default:
             // Could handle other event types here
             break;