/platform_testing/libraries/screenshot/src/main/java/platform/test/screenshot/ |
D | DefaultDeviceEmulationSpec.kt | 48 width = 1440, 56 width = 2560, 64 width = 1080, 72 width = 2208, 80 width = 1080, 88 width = 2076, 96 width = 720, 104 width = 1280, 112 width = 1920, 120 width = 3840,
|
D | MaterialYouColorsSimulationUtils.kt | 47 private fun pixelWithinFilterRange(row: Int, col: Int, width: Int, height: Int): Boolean { in pixelWithinFilterRange() 51 col < width - FILTER_SIZE) in pixelWithinFilterRange() 106 val colorValidArray = IntArray(originalBitmap.width * originalBitmap.height, { 0 }) in bitmapWithMaterialYouColorsSimulation() 107 val stream = IntStream.range(0, originalBitmap.width * originalBitmap.height) in bitmapWithMaterialYouColorsSimulation() 122 val newStream = IntStream.range(0, originalBitmap.width * originalBitmap.height) in bitmapWithMaterialYouColorsSimulation() 127 val col = it % originalBitmap.width in bitmapWithMaterialYouColorsSimulation() 128 val row = (it - col) / originalBitmap.width in bitmapWithMaterialYouColorsSimulation() 133 originalBitmap.width, in bitmapWithMaterialYouColorsSimulation() 142 originalBitmap.width in bitmapWithMaterialYouColorsSimulation() 151 originalBitmap.width, in bitmapWithMaterialYouColorsSimulation()
|
D | DeviceEmulationRule.kt | 71 val (width, height) = getEmulatedDisplaySize() in <lambda>() constant 79 val scaledWidth = width * 160 / density in <lambda>() 96 if (prevWidth != width || prevHeight != height) { in <lambda>() 97 setDisplaySize(width, height) in <lambda>() 108 setDisplaySize(width, height) in <lambda>() 126 val isPortraitNaturalPosition = display.width < display.height in <lambda>() 128 display.height to display.width in <lambda>() 130 display.width to display.height in <lambda>() 142 private fun setDisplaySize(width: Int, height: Int) { in <lambda>() 146 wm.setForcedDisplaySize(Display.DEFAULT_DISPLAY, width, height) in <lambda>() [all …]
|
D | ScreenshotTestRule.kt | 193 if (actual.width != expected.width || actual.height != expected.height) { in <lambda>() 198 expectedWidth = expected.width, in <lambda>() 200 actualWidth = actual.width, in <lambda>() 213 val expectedWidth = expected.width in <lambda>() 229 width = actual.width, in <lambda>() 278 val imageRect = Rect(0, 0, original.width, original.height) in <lambda>() 404 val bitmapArray = IntArray(width * height) in toIntArray() 405 getPixels(bitmapArray, 0, width, 0, 0, width, height) in toIntArray()
|
/platform_testing/libraries/flicker/utils/src/android/tools/datatypes/ |
D | Size.kt | 26 open class Size protected constructor(val width: Int, val height: Int) : DataType() { constant in android.tools.datatypes.Size 27 override val isEmpty = height == 0 || width == 0 29 override fun doPrintValue() = "$width x $height" in doPrintValue() 33 get() = withCache { Size(width = 0, height = 0) } in doPrintValue() 34 fun from(width: Int, height: Int): Size = withCache { Size(width, height) } in doPrintValue()
|
D | ActiveBuffer.kt | 26 class ActiveBuffer private constructor(width: Int, height: Int, val stride: Int, val format: Int) : 27 Size(width, height) { 28 override fun doPrintValue() = "w:$width, h:$height, stride:$stride, format:$format" in doPrintValue() 32 get() = withCache { ActiveBuffer(width = 0, height = 0, stride = 0, format = 0) } in doPrintValue() 33 fun from(width: Int, height: Int, stride: Int, format: Int): ActiveBuffer = withCache { in doPrintValue() 34 ActiveBuffer(width, height, stride, format) in doPrintValue()
|
/platform_testing/libraries/screenshot/src/androidTest/java/platform/test/screenshot/ |
D | MSSIMMatcherTest.kt | 35 val filter = BooleanArray(first.width * first.height) { true } in performDiff_sameBitmaps() 42 first.width, in performDiff_sameBitmaps() 55 val filter = BooleanArray(first.width * first.height) { false } in performDiff_noPixelsCompared() 62 first.width, in performDiff_noPixelsCompared() 74 val filter = BooleanArray(first.width * first.height) { false } in performDiff_sameRegion() 77 val startWidth = 10 * first.width / 20 in performDiff_sameRegion() 78 val endWidth = 11 * first.width / 20 in performDiff_sameRegion() 81 filter[j + i * first.width] = true in performDiff_sameRegion() 90 first.width, in performDiff_sameRegion() 103 val filter = BooleanArray(first.width * first.height) { true } in performDiff_checkedAgainstUnchecked() [all …]
|
D | PixelPerfectMatcherTest.kt | 42 first.width, in performDiff_sameBitmaps() 59 width = first.width, in performDiff_sameSize_partialCompare_topLeftOutOfBoundaries_diff() 77 width = first.width, in performDiff_sameSize_partialCompare_topLeft_diffBoundaries() 79 regions = listOf(Rect(0, 0, first.width / 2, first.height / 2)) in performDiff_sameSize_partialCompare_topLeft_diffBoundaries() 95 width = first.width, in performDiff_sameSize_partialCompare_bottomRight() 97 regions = listOf(Rect(first.width / 2, first.height / 2, first.width, first.height)) in performDiff_sameSize_partialCompare_bottomRight() 113 width = first.width, in performDiff_sameSize_partialCompare_bottomRightOutOfBoundaries_diff() 117 Rect(first.width / 2, first.height / 2, first.width + 10, first.height + 10) in performDiff_sameSize_partialCompare_bottomRightOutOfBoundaries_diff() 134 first.width, in performDiff_sameSize_differentBorders() 151 first.width, in performDiff_sameSize_differentBorders_partialCompare() [all …]
|
/platform_testing/libraries/screenshot/src/main/java/platform/test/screenshot/matchers/ |
D | BitmapMatcher.kt | 43 width: Int, in <lambda>() 69 val width = if (expectedWidth < actualWidth) expectedWidth else actualWidth in <lambda>() constant 74 val diffArray = lazy { IntArray(width * height) { Color.TRANSPARENT } } in <lambda>() 77 for (j in 0..<width) { in <lambda>() 84 diffArray.value[i * width + j] = Color.MAGENTA in <lambda>() 91 .setNumberPixelsCompared(width * height) in <lambda>() 97 val diff = Bitmap.createBitmap(diffArray.value, width, height, Bitmap.Config.ARGB_8888) in <lambda>() 105 protected fun getFilter(width: Int, height: Int, regions: List<Rect>): BooleanArray { in <lambda>() 107 BooleanArray(width * height) { true } in <lambda>() 109 val regionsSanitised = regions.map { Rect(it).apply { intersect(0, 0, width, height) } } in <lambda>() [all …]
|
D | AlmostPerfectMatcher.kt | 41 width: Int, in <lambda>() 47 val filter = getFilter(width, height, regions) in <lambda>() 52 val diffArray = lazy { IntArray(width * height) { Color.TRANSPARENT } } in <lambda>() 64 else (acceptableThreshold * width * height).toInt() in <lambda>() 68 else Bitmap.createBitmap(diffArray.value, width, height, Bitmap.Config.ARGB_8888) in <lambda>() 76 .setNumberPixelsCompared(width * height) in <lambda>() 93 val width = if (expectedWidth < actualWidth) expectedWidth else actualWidth in <lambda>() constant 99 val diffArray = lazy { IntArray(width * height) { Color.TRANSPARENT } } in <lambda>() 102 for (j in 0..<width) { in <lambda>() 109 diffArray.value[i * width + j] = Color.MAGENTA in <lambda>() [all …]
|
D | HumanEyeMatcher.kt | 29 width: Int, in <lambda>() 37 val filter = getFilter(width, height, regions) in <lambda>() 42 IntArray(width * height) { index -> in <lambda>() 58 val diffArray = lazy { IntArray(width * height) { Color.TRANSPARENT } } in <lambda>() 67 width, in <lambda>() 69 width * height - ignored - different, in <lambda>() 77 val colorDiff = colorDiffSqArray[x + width * y] in <lambda>() 95 val x = index % width in <lambda>() 96 val y = index / width in <lambda>() 103 val rightThreshold = if (x < width - 1) getEasiestThresholdFailed(x + 1, y) else null in <lambda>() [all …]
|
D | PixelPerfectMatcher.kt | 31 width: Int, in <lambda>() 37 val filter = getFilter(width, height, regions) in <lambda>() 42 val diffArray = lazy { IntArray(width * height) { Color.TRANSPARENT } } in <lambda>() 54 .setNumberPixelsCompared(width * height) in <lambda>() 61 val diff = Bitmap.createBitmap(diffArray.value, width, height, Bitmap.Config.ARGB_8888) in <lambda>()
|
D | MSSIMMatcher.kt | 47 width: Int, in compareBitmaps() 51 val filter = getFilter(width, height, regions) in compareBitmaps() 52 val calSSIMResult = calculateSSIM(expected, given, width, height, filter) in compareBitmaps() 71 val result = PixelPerfectMatcher().compareBitmaps(expected, given, width, height, regions) in compareBitmaps() 78 width: Int, in calculateSSIM() 82 return calculateSSIM(ideal, given, 0, width, width, height, filter) in calculateSSIM() 90 width: Int, in calculateSSIM() 102 while (currentWindowX < width) { in calculateSSIM() 103 val windowWidth = computeWindowSize(currentWindowX, width) in calculateSSIM()
|
/platform_testing/libraries/screenshot/src/androidTest/java/platform/test/screenshot/matchers/ |
D | AlmostPerfectMatcherTest.kt | 38 width = 1, in diffColor_exactMatch() 56 width = 1, in diffColor_almostMatchLowRed() 74 width = 1, in diffColor_almostMatchHighRed() 92 width = 1, in diffColor_notMatch() 111 width = first.width, in performDiff_sameBitmaps() 129 width = first.width, in performDiff_sameSize_partialCompare_checkDiffImage() 137 for (j in 0 until first.width) { in performDiff_sameSize_partialCompare_checkDiffImage() 141 assertThat(diffImage[i * first.width + j] == 0).isTrue() in performDiff_sameSize_partialCompare_checkDiffImage()
|
D | HumanEyeMatcherTest.kt | 24 width = 1, in <lambda>() 41 width = 1, in <lambda>() 58 width = 1, in <lambda>() 75 width = 1, in <lambda>() 92 width = first.width, in <lambda>() 108 width = 3, in <lambda>() 136 width = 3, in <lambda>() 167 width = 3, in <lambda>() 186 width = 4, in <lambda>() 221 width = 4, in <lambda>() [all …]
|
/platform_testing/libraries/media-helper/src/android/test/mediahelper/ |
D | MediaValidationHelper.java | 92 int width = format.getInteger(MediaFormat.KEY_WIDTH); in validateVideoTrackMediaFormat() local 97 "Duration: %d; Width: %d; Height: %d", durationMillis, width, height)); in validateVideoTrackMediaFormat() 99 assertThat(width).isEqualTo(expWidth); in validateVideoTrackMediaFormat() 113 int width = bitmap.getWidth(); in validateImage() local 114 Log.d(TAG, String.format("Height: %d; Width: %d", height, width)); in validateImage() 116 assertThat(width).isGreaterThan(minWidth); in validateImage()
|
/platform_testing/libraries/flicker/src/android/tools/flicker/assertors/assertions/ |
D | SplitAppLayerBoundsSnapToDivider.kt | 62 return if (displaySize.width > displaySize.height) { in calculateExpectedDisplaySize() 74 displaySize.width, in calculateExpectedDisplaySize() 83 displaySize.width, in calculateExpectedDisplaySize() 90 displaySize.width, in calculateExpectedDisplaySize()
|
/platform_testing/libraries/motion/src/platform/test/motion/filmstrip/ |
D | Filmstrip.kt | 39 private var screenshotWidth = screenshots.maxOf { it.bitmap.width } in <lambda>() 77 val scaleX = screenshotWidth.toFloat() / screenshots.maxOf { it.bitmap.width } in <lambda>() 144 val width = screenshots.size * tileWidth in render() constant 147 val filmstrip = Bitmap.createBitmap(width, height, bitmapConfig) in render() 154 /* right = */ width.toFloat(), in render() 196 val width = screenshotWidth + labelWidth + 2 * labelMargin in render() constant 199 val filmstrip = Bitmap.createBitmap(width, height, bitmapConfig) in render() 205 /* right = */ width.toFloat(), in render()
|
/platform_testing/libraries/flicker/utils/src/android/tools/helpers/ |
D | WindowUtils.kt | 71 Rect(0, 0, displayBounds.height(), displayBounds.width()) in getDisplayBounds() 73 Rect(0, 0, displayBounds.width(), displayBounds.height()) in getDisplayBounds() 98 return Region(0, 0, display.displayRect.width(), height) in getExpectedStatusBarPosition() 119 val displayWidth = display.layerStackSpace.width() in getNavigationBarPosition() 146 displayWidth = displayBounds.width() in estimateNavigationBarPosition() 151 displayHeight = displayBounds.width() in estimateNavigationBarPosition()
|
/platform_testing/libraries/screenshot/src/androidTest/java/platform/test/screenshot/utils/ |
D | BitmapUtils.kt | 33 width: Int = 100, in createBitmap() 36 ) = Bitmap.createBitmap(width, height, bitmapConfig).also { Canvas(it).drawColor(color) } in createBitmap()
|
/platform_testing/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/helper/ |
D | SimpleGLRenderer.java | 96 public void onSurfaceChanged(GL10 unused, int width, int height) { in onSurfaceChanged() argument 99 GLES20.glViewport(0, 0, width, height); in onSurfaceChanged() 101 float ratio = (float) width / height; in onSurfaceChanged()
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/wm/ |
D | WindowLayoutParams.kt | 32 val width: Int = 0, constant in android.tools.traces.wm.WindowLayoutParams 69 if (width != other.width) return false in equals() 105 result = 31 * result + width in hashCode() 137 return "WindowLayoutParams(type=$type, x=$x, y=$y, width=$width, height=$height, " + in toString() 164 width: Int, in from() 196 width, in from()
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/monitors/ |
D | ScreenRecorder.kt | 32 private val width: Int = 720, constant in android.tools.traces.monitors.ScreenRecorder 41 val runnable = ScreenRecordingRunnable(outputFile, context, width, height) in newRecordingThread()
|
/platform_testing/libraries/uiautomator-helpers/src/android/platform/uiautomator_helpers/ |
D | SwipeUtils.kt | 30 Point(bounds.right - (bounds.width() * percent).toInt(), centerY) in calculateStartEndPoint() 34 Point(bounds.left + (bounds.width() * percent).toInt(), centerY) in calculateStartEndPoint()
|
/platform_testing/libraries/systemui-helper/src/android/platform/helpers/ |
D | ColorUtils.kt | 28 val lastColumn = screenshot.columnColor(x = screenshot.width - 1) in <lambda>() 57 for (i in 0 until width) { in darkerThan()
|