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

Commit 7d51fb85 authored by Azwa Bajwah's avatar Azwa Bajwah Committed by Android (Google) Code Review
Browse files

Merge "Add BlastBufferQueue tests to SurfaceFlingerPerfTests" into udc-qpr-dev

parents 880aef88 95849961
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -17,10 +17,14 @@
package android.surfaceflinger;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceControl;
import android.view.SurfaceHolder;
import android.view.SurfaceView;


import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.filters.LargeTest;
@@ -194,4 +198,16 @@ public class SurfaceFlingerPerfTest {
            mTransaction.apply(true);
        }
    }

    @Test
    public void bufferQueue() throws Exception {
        SurfaceView testSV = mActivity.mTestSurfaceView;
        SurfaceHolder holder = testSV.getHolder();
        holder.getSurface();
        for (int i = 0; i < sProfilingIterations; i++) {
            Canvas canvas = holder.lockCanvas();
            holder.unlockCanvasAndPost(canvas);
            mTransaction.apply(true);
        }
    }
}