Merge "Replace PixelColor ints with Color ints"
This commit is contained in:
committed by
Android (Google) Code Review
commit
e768daa3f2
@@ -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;
|
||||
@@ -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();
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user