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

Commit 5429e1d1 authored by Romain Guy's avatar Romain Guy
Browse files

Use static final debug fields.

Change-Id: I304c39f54f609729bcec581091f285b2baa6fefa
parent 14cd0653
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -7298,9 +7298,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
            if (ViewDebug.TRACE_HIERARCHY) {
                ViewDebug.trace(this, ViewDebug.HierarchyTraceType.BUILD_CACHE);
            }
            if (Config.DEBUG && ViewDebug.profileDrawing) {
                EventLog.writeEvent(60002, hashCode());
            }

            int width = mRight - mLeft;
            int height = mBottom - mTop;
@@ -7947,6 +7944,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
     * @param r Right position, relative to parent
     * @param b Bottom position, relative to parent
     */
    @SuppressWarnings({"unchecked"})
    public final void layout(int l, int t, int r, int b) {
        int oldL = mLeft;
        int oldT = mTop;
@@ -10129,11 +10127,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
         */
        final RectF mTmpTransformRect = new RectF();

        /**
         * Temporary for use in computing invalidation areas with transformed views
         */
        final float[] mTmpTransformBounds = new float[8];

        /**
         * Temporary list for use in collecting focusable descendents of a view.
         */
+3 −6
Original line number Diff line number Diff line
@@ -119,24 +119,21 @@ public class ViewDebug {
     *
     * @hide
     */
    @Debug.DebugProperty
    public static boolean profileDrawing = false;
    public static final boolean DEBUG_PROFILE_DRAWING = false;

    /**
     * Profiles layout times in the events log.
     *
     * @hide
     */
    @Debug.DebugProperty
    public static boolean profileLayout = false;
    public static final boolean DEBUG_PROFILE_LAYOUT = false;

    /**
     * Profiles real fps (times between draws) and displays the result.
     *
     * @hide
     */
    @Debug.DebugProperty
    public static boolean showFps = false;
    public static final boolean DEBUG_SHOW_FPS = false;

    /**
     * <p>Enables or disables views consistency check. Even when this property is enabled,
+0 −5
Original line number Diff line number Diff line
@@ -32,8 +32,6 @@ import android.graphics.Region;
import android.os.Parcelable;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.util.Config;
import android.util.EventLog;
import android.util.Log;
import android.util.SparseArray;
import android.view.accessibility.AccessibilityEvent;
@@ -2020,9 +2018,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                cachePaint.setAlpha(255);
                mGroupFlags &= ~FLAG_ALPHA_LOWER_THAN_ONE;
            }
            if (Config.DEBUG && ViewDebug.profileDrawing) {
                EventLog.writeEvent(60003, hashCode());
            }
            canvas.drawBitmap(cache, 0.0f, 0.0f, cachePaint);
        }

+5 −5
Original line number Diff line number Diff line
@@ -1008,7 +1008,7 @@ public final class ViewRoot extends Handler implements ViewParent, View.AttachIn
                TAG, "Laying out " + host + " to (" +
                host.mMeasuredWidth + ", " + host.mMeasuredHeight + ")");
            long startTime = 0L;
            if (ViewDebug.profileLayout) {
            if (ViewDebug.DEBUG_PROFILE_LAYOUT) {
                startTime = SystemClock.elapsedRealtime();
            }
            host.layout(0, 0, host.mMeasuredWidth, host.mMeasuredHeight);
@@ -1021,7 +1021,7 @@ public final class ViewRoot extends Handler implements ViewParent, View.AttachIn
                }
            }

            if (ViewDebug.profileLayout) {
            if (ViewDebug.DEBUG_PROFILE_LAYOUT) {
                EventLog.writeEvent(60001, SystemClock.elapsedRealtime() - startTime);
            }

@@ -1321,7 +1321,7 @@ public final class ViewRoot extends Handler implements ViewParent, View.AttachIn
                        //canvas.drawARGB(255, 255, 0, 0);
                    }

                    if (ViewDebug.profileDrawing) {
                    if (ViewDebug.DEBUG_PROFILE_DRAWING) {
                        startTime = SystemClock.elapsedRealtime();
                    }

@@ -1364,7 +1364,7 @@ public final class ViewRoot extends Handler implements ViewParent, View.AttachIn
                        mView.dispatchConsistencyCheck(ViewDebug.CONSISTENCY_DRAWING);
                    }

                    if (SHOW_FPS || ViewDebug.showFps) {
                    if (SHOW_FPS || ViewDebug.DEBUG_SHOW_FPS) {
                        int now = (int)SystemClock.elapsedRealtime();
                        if (sDrawTime != 0) {
                            nativeShowFPS(canvas, now - sDrawTime);
@@ -1372,7 +1372,7 @@ public final class ViewRoot extends Handler implements ViewParent, View.AttachIn
                        sDrawTime = now;
                    }

                    if (ViewDebug.profileDrawing) {
                    if (ViewDebug.DEBUG_PROFILE_DRAWING) {
                        EventLog.writeEvent(60000, SystemClock.elapsedRealtime() - startTime);
                    }
                }