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

Commit e6c966ca authored by Michael Jurka's avatar Michael Jurka Committed by Android (Google) Code Review
Browse files

Merge "Add frame counter to dumpGfxInfo"

parents 78b0d9fa a3fabff9
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -260,6 +260,13 @@ public abstract class HardwareRenderer {
     */
    abstract void dumpGfxInfo(PrintWriter pw);

    /**
     * Outputs the total number of frames rendered (used for fps calculations)
     *
     * @return the number of frames rendered
     */
    abstract long getFrameCount();

    /**
     * Sets the directory to use as a persistent storage for hardware rendering
     * resources.
@@ -513,7 +520,7 @@ public abstract class HardwareRenderer {
        GL mGl;
        HardwareCanvas mCanvas;

        int mFrameCount;
        long mFrameCount;
        Paint mDebugPaint;

        static boolean sDirtyRegions;
@@ -591,6 +598,11 @@ public abstract class HardwareRenderer {
            }
        }

        @Override
        long getFrameCount() {
            return mFrameCount;
        }

        /**
         * Indicates whether this renderer instance can track and update dirty regions.
         */
@@ -1056,13 +1068,13 @@ public abstract class HardwareRenderer {
                        callbacks.onHardwarePostDraw(canvas);
                        canvas.restoreToCount(saveCount);
                        view.mRecreateDisplayList = false;

                        mFrameCount++;
                        if (mDebugDirtyRegions) {
                            if (mDebugPaint == null) {
                                mDebugPaint = new Paint();
                                mDebugPaint.setColor(0x7fff0000);
                            }
                            if (dirty != null && (mFrameCount++ & 1) == 0) {
                            if (dirty != null && (mFrameCount & 1) == 0) {
                                canvas.drawRect(dirty, mDebugPaint);
                            }
                        }
+6 −1
Original line number Diff line number Diff line
@@ -510,8 +510,13 @@ public class WindowManagerImpl implements WindowManager {

                        String name = root.getClass().getName() + '@' +
                                Integer.toHexString(hashCode());                        
                        pw.printf("  %s: %d views, %.2f kB (display lists)\n",
                        pw.printf("  %s: %d views, %.2f kB (display lists)",
                                name, info[0], info[1] / 1024.0f);
                        HardwareRenderer renderer = root.getView().mAttachInfo.mHardwareRenderer;
                        if (renderer != null) {
                            pw.printf(", %d frames rendered", renderer.getFrameCount());
                        }
                        pw.printf("\n");

                        viewsCount += info[0];
                        displayListsSize += info[1];
+2 −2
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ public class WindowManagerService extends IWindowManager.Stub
        implements Watchdog.Monitor, WindowManagerPolicy.WindowManagerFuncs {
    static final String TAG = "WindowManager";
    static final boolean DEBUG = false;
    static final boolean DEBUG_ADD_REMOVE = false;
    static final boolean DEBUG_ADD_REMOVE = true;
    static final boolean DEBUG_FOCUS = false;
    static final boolean DEBUG_ANIM = false;
    static final boolean DEBUG_LAYOUT = false;
@@ -158,7 +158,7 @@ public class WindowManagerService extends IWindowManager.Stub
    static final boolean DEBUG_INPUT = false;
    static final boolean DEBUG_INPUT_METHOD = false;
    static final boolean DEBUG_VISIBILITY = false;
    static final boolean DEBUG_WINDOW_MOVEMENT = false;
    static final boolean DEBUG_WINDOW_MOVEMENT = true;
    static final boolean DEBUG_TOKEN_MOVEMENT = false;
    static final boolean DEBUG_ORIENTATION = false;
    static final boolean DEBUG_APP_ORIENTATION = false;