Loading services/tests/wmtests/src/com/android/server/wm/ScreenshotTests.java +2 −3 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ import android.view.IWindowManager; import android.view.PointerIcon; import android.view.SurfaceControl; import android.view.cts.surfacevalidator.BitmapPixelChecker; import android.view.cts.surfacevalidator.PixelColor; import android.view.cts.surfacevalidator.SaveBitmapHelper; import android.window.ScreenCapture; import android.window.ScreenCapture.ScreenCaptureListener; Loading Loading @@ -132,7 +131,7 @@ public class ScreenshotTests { Bitmap swBitmap = screenshot.copy(Bitmap.Config.ARGB_8888, false); screenshot.recycle(); BitmapPixelChecker bitmapPixelChecker = new BitmapPixelChecker(PixelColor.RED); BitmapPixelChecker bitmapPixelChecker = new BitmapPixelChecker(Color.RED); Rect bounds = new Rect(0, 0, swBitmap.getWidth(), swBitmap.getHeight()); int numMatchingPixels = bitmapPixelChecker.getNumMatchingPixels(swBitmap, bounds); int sizeOfBitmap = bounds.width() * bounds.height(); Loading Loading @@ -182,7 +181,7 @@ public class ScreenshotTests { Bitmap swBitmap = screenshot.copy(Bitmap.Config.ARGB_8888, false); screenshot.recycle(); BitmapPixelChecker bitmapPixelChecker = new BitmapPixelChecker(PixelColor.RED); BitmapPixelChecker bitmapPixelChecker = new BitmapPixelChecker(Color.RED); Rect bounds = new Rect(point.x, point.y, BUFFER_WIDTH + point.x, BUFFER_HEIGHT + point.y); int numMatchingPixels = bitmapPixelChecker.getNumMatchingPixels(swBitmap, bounds); int pixelMatchSize = bounds.width() * bounds.height(); Loading tests/SurfaceViewBufferTests/src/com/android/test/SharedBufferModeScreenRecordTests.kt +1 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.test import android.graphics.Color import android.graphics.Rect import android.os.SystemClock import android.view.cts.surfacevalidator.PixelColor import junit.framework.Assert.assertEquals import org.junit.Assert.assertTrue import org.junit.Test Loading Loading @@ -53,7 +52,7 @@ class SharedBufferModeScreenRecordTests(useBlastAdapter: Boolean) : SystemClock.sleep(4000) } val result = withScreenRecording(svBounds, PixelColor.RED) { val result = withScreenRecording(svBounds, Color.RED) { it.mSurfaceProxy.drawBuffer(0, Color.RED) } val failRatio = 1.0f * result.failFrames / (result.failFrames + result.passFrames) Loading Loading
services/tests/wmtests/src/com/android/server/wm/ScreenshotTests.java +2 −3 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ import android.view.IWindowManager; import android.view.PointerIcon; import android.view.SurfaceControl; import android.view.cts.surfacevalidator.BitmapPixelChecker; import android.view.cts.surfacevalidator.PixelColor; import android.view.cts.surfacevalidator.SaveBitmapHelper; import android.window.ScreenCapture; import android.window.ScreenCapture.ScreenCaptureListener; Loading Loading @@ -132,7 +131,7 @@ public class ScreenshotTests { Bitmap swBitmap = screenshot.copy(Bitmap.Config.ARGB_8888, false); screenshot.recycle(); BitmapPixelChecker bitmapPixelChecker = new BitmapPixelChecker(PixelColor.RED); BitmapPixelChecker bitmapPixelChecker = new BitmapPixelChecker(Color.RED); Rect bounds = new Rect(0, 0, swBitmap.getWidth(), swBitmap.getHeight()); int numMatchingPixels = bitmapPixelChecker.getNumMatchingPixels(swBitmap, bounds); int sizeOfBitmap = bounds.width() * bounds.height(); Loading Loading @@ -182,7 +181,7 @@ public class ScreenshotTests { Bitmap swBitmap = screenshot.copy(Bitmap.Config.ARGB_8888, false); screenshot.recycle(); BitmapPixelChecker bitmapPixelChecker = new BitmapPixelChecker(PixelColor.RED); BitmapPixelChecker bitmapPixelChecker = new BitmapPixelChecker(Color.RED); Rect bounds = new Rect(point.x, point.y, BUFFER_WIDTH + point.x, BUFFER_HEIGHT + point.y); int numMatchingPixels = bitmapPixelChecker.getNumMatchingPixels(swBitmap, bounds); int pixelMatchSize = bounds.width() * bounds.height(); Loading
tests/SurfaceViewBufferTests/src/com/android/test/SharedBufferModeScreenRecordTests.kt +1 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.test import android.graphics.Color import android.graphics.Rect import android.os.SystemClock import android.view.cts.surfacevalidator.PixelColor import junit.framework.Assert.assertEquals import org.junit.Assert.assertTrue import org.junit.Test Loading Loading @@ -53,7 +52,7 @@ class SharedBufferModeScreenRecordTests(useBlastAdapter: Boolean) : SystemClock.sleep(4000) } val result = withScreenRecording(svBounds, PixelColor.RED) { val result = withScreenRecording(svBounds, Color.RED) { it.mSurfaceProxy.drawBuffer(0, Color.RED) } val failRatio = 1.0f * result.failFrames / (result.failFrames + result.passFrames) Loading