Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1fcd3dd authored by Chris Forbes's avatar Chris Forbes
Browse files

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
parent 46295180
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -68,9 +68,9 @@ static void logInfo(PlatformMethods* /*platform*/, const char* infoMessage) {

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 @@ static TraceEventHandle addTraceEvent(
            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;