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

Commit 1b9cbdb8 authored by Jian-Syuan (Shane) Wong's avatar Jian-Syuan (Shane) Wong Committed by Android (Google) Code Review
Browse files

Merge "[ARR] Add trace for the View with preferred frame rate." into main

parents 0c16c8ee 67d8adee
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -34271,6 +34271,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                frameRateToSet = velocityFrameRate;
            }
            viewRootImpl.votePreferredFrameRate(frameRateToSet, compatibility);
            if (Trace.isTagEnabled(TRACE_TAG_VIEW)) {
                Trace.instant(TRACE_TAG_VIEW,
                        getClass().getSimpleName()
                            + " - votePreferredFrameRate: " + frameRateToSet);
            }
        }
        if (viewRootImpl.shouldCheckFrameRateCategory()) {
@@ -34306,6 +34312,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                                | FRAME_RATE_CATEGORY_REASON_INVALID;
                    }
                }
                if (Trace.isTagEnabled(TRACE_TAG_VIEW)) {
                    Trace.instant(TRACE_TAG_VIEW,
                            getClass().getSimpleName() + " - votePreferredFrameRate: "
                                + viewRootImpl.categoryToString(
                                    frameRateCategory & ~FRAME_RATE_CATEGORY_REASON_MASK));
                }
            } else {
                // Category doesn't control it. It is directly controlled by frame rate
                frameRateCategory = FRAME_RATE_CATEGORY_NO_PREFERENCE
+1 −1
Original line number Diff line number Diff line
@@ -13218,7 +13218,7 @@ public final class ViewRootImpl implements ViewParent,
        }
    }
    private static String categoryToString(int frameRateCategory) {
    static String categoryToString(int frameRateCategory) {
        String category;
        switch (frameRateCategory) {
            case FRAME_RATE_CATEGORY_NO_PREFERENCE -> category = "no preference";