diff options
author | 2023-07-28 16:46:32 +0000 | |
---|---|---|
committer | 2023-08-02 21:34:00 +0000 | |
commit | 958499616c60d28409cccb53522c828ba84a05ef (patch) | |
tree | ae204afdcc10d3f64b121fdfa1784a9c97a3ef14 | |
parent | ff27ed486991a8fa48a4e10ab7409f85d92ea74f (diff) |
Add BlastBufferQueue tests to SurfaceFlingerPerfTests
Bug: 287081404
Test: atest SurfaceFlingerPerfTests:SurfaceFlingerPerfTest
Change-Id: I8a2e1552956368e721a5b0be69911a569522d90f
-rw-r--r-- | apct-tests/perftests/surfaceflinger/src/android/surfaceflinger/SurfaceFlingerPerfTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apct-tests/perftests/surfaceflinger/src/android/surfaceflinger/SurfaceFlingerPerfTest.java b/apct-tests/perftests/surfaceflinger/src/android/surfaceflinger/SurfaceFlingerPerfTest.java index f92c297936dd..dca818ec9708 100644 --- a/apct-tests/perftests/surfaceflinger/src/android/surfaceflinger/SurfaceFlingerPerfTest.java +++ b/apct-tests/perftests/surfaceflinger/src/android/surfaceflinger/SurfaceFlingerPerfTest.java @@ -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); + } + } } |