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

Commit 105f7dc9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Dump frame history for bugreports"

parents 2120b23f 184264d0
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -331,6 +331,7 @@ public final class ThreadedRenderer {

    private static final int FLAG_DUMP_FRAMESTATS   = 1 << 0;
    private static final int FLAG_DUMP_RESET        = 1 << 1;
    private static final int FLAG_DUMP_ALL          = FLAG_DUMP_FRAMESTATS;

    @IntDef(flag = true, prefix = { "FLAG_DUMP_" }, value = {
            FLAG_DUMP_FRAMESTATS,
@@ -636,7 +637,10 @@ public final class ThreadedRenderer {
     */
    void dumpGfxInfo(PrintWriter pw, FileDescriptor fd, String[] args) {
        pw.flush();
        int flags = 0;
        // If there's no arguments, eg 'dumpsys gfxinfo', then dump everything.
        // If there's a targetted package, eg 'dumpsys gfxinfo com.android.systemui', then only
        // dump the summary information
        int flags = (args == null || args.length == 0) ? FLAG_DUMP_ALL : 0;
        for (int i = 0; i < args.length; i++) {
            switch (args[i]) {
                case "framestats":
@@ -645,6 +649,9 @@ public final class ThreadedRenderer {
                case "reset":
                    flags |= FLAG_DUMP_RESET;
                    break;
                case "-a": // magic option passed when dumping a bugreport.
                    flags = FLAG_DUMP_ALL;
                    break;
            }
        }
        nDumpProfileInfo(mNativeProxy, fd, flags);