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

Commit e768daa3 authored by Patrick Williams's avatar Patrick Williams Committed by Android (Google) Code Review
Browse files

Merge "Replace PixelColor ints with Color ints"

parents 5130279d f1968da1
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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();
+1 −2
Original line number Diff line number Diff line
@@ -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)