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

Commit 3da55255 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Factor viewport scaling into coverage calculation"

parents 08cfd61d 6f92c151
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -37,10 +37,10 @@ public class PlaybackGraphs {
    private static Paint whiteLabels;

    private static double viewportCoverage(TileData view, TileData tile) {
        if (tile.left < view.right
                && tile.right >= view.left
                && tile.top < view.bottom
                && tile.bottom >= view.top) {
        if (tile.left < (view.right * view.scale)
                && tile.right >= (view.left * view.scale)
                && tile.top < (view.bottom * view.scale)
                && tile.bottom >= (view.top * view.scale)) {
            return 1.0f;
        }
        return 0.0f;
@@ -215,7 +215,7 @@ public class PlaybackGraphs {
        int lastBar = 0;
        for (int frameIndex = 0; frameIndex < data.frames.length; frameIndex++) {
            TileData frame[] = data.frames[frameIndex];
            int newBar = (frame[0].top + frame[0].bottom) / 2;
            int newBar = (int)((frame[0].top + frame[0].bottom) * frame[0].scale / 2.0f);

            MetricGen s = Metrics[metricIndex];
            double absoluteValue = s.getValue(frame);
+2 −1
Original line number Diff line number Diff line
@@ -46,7 +46,8 @@ public class RunData implements Serializable {

        public String toString() {
            return "Tile (" + left + "," + top + ")->("
                    + right + "," + bottom + ")";
                    + right + "," + bottom + ")"
                    + (isReady ? "ready" : "NOTready") + " at scale " + scale;
        }
    }