Home
last modified time | relevance | path

Searched refs:width (Results 1 – 25 of 446) sorted by relevance

12345678910>>...18

/cts/tests/tests/graphics/jni/
Dandroid_graphics_cts_AImageDecoderTest.cpp171 static void testInfo(JNIEnv* env, jclass, jlong imageDecoderPtr, jint width, jint height, in testInfo() argument
180 ASSERT_EQ(width, actualWidth); in testInfo()
393 const int32_t width = AImageDecoderHeaderInfo_getWidth(info); in testGetMinimumStride() local
397 ASSERT_EQ(bytesPerPixel(ANDROID_BITMAP_FORMAT_RGBA_F16) * width, stride); in testGetMinimumStride()
399 ASSERT_EQ(bytesPerPixel(ANDROID_BITMAP_FORMAT_RGBA_8888) * width, stride); in testGetMinimumStride()
402 auto setFormatAndCheckStride = [env, decoder, width, &stride](AndroidBitmapFormat format) { in testGetMinimumStride()
407 ASSERT_EQ(bytesPerPixel(format) * width, stride); in testGetMinimumStride()
459 int width, int height, int alphaFlags, size_t minStride, in bitmapsEqual() argument
477 EXPECT_EQ("Wrong width", jInfo.width, width); in bitmapsEqual()
526 const int32_t width = AImageDecoderHeaderInfo_getWidth(info); in testDecode() local
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/
DAllocationCopyPaddedTest.java27 int width = random.nextInt(128);; in test_AllocationPadded_Byte3_1D() local
28 int arr_len = width * 3; in test_AllocationPadded_Byte3_1D()
35 typeBuilder.setX(width); in test_AllocationPadded_Byte3_1D()
55 int width = random.nextInt(128); in test_AllocationPadded_Byte3_2D() local
57 int arr_len = width * height * 3; in test_AllocationPadded_Byte3_2D()
64 typeBuilder.setX(width).setY(height); in test_AllocationPadded_Byte3_2D()
114 int width = random.nextInt(512); in test_AllocationPadded_Short3_1D_Helper() local
115 int arr_len = width * 3; in test_AllocationPadded_Short3_1D_Helper()
125 typeBuilder.setX(width); in test_AllocationPadded_Short3_1D_Helper()
150 int width = random.nextInt(128); in test_AllocationPadded_Short3_2D_Helper() local
[all …]
DRsAllocationCopyTest.java29 int width = random.nextInt(512); in test_RsAllocationCopy1D_Byte() local
30 int arr_len = width; in test_RsAllocationCopy1D_Byte()
39 typeBuilder.setX(width); in test_RsAllocationCopy1D_Byte()
74 int width = random.nextInt(512); in test_RsAllocationCopy1D_Short() local
75 int arr_len = width; in test_RsAllocationCopy1D_Short()
86 typeBuilder.setX(width); in test_RsAllocationCopy1D_Short()
121 int width = random.nextInt(512); in test_RsAllocationCopy1D_Int() local
122 int arr_len = width; in test_RsAllocationCopy1D_Int()
133 typeBuilder.setX(width); in test_RsAllocationCopy1D_Int()
168 int width = random.nextInt(512); in test_RsAllocationCopy1D_Float() local
[all …]
DAllocationCopyToTest.java37 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Byte() local
38 int arr_len = width; in test_Allocationcopy1DRangeTo_Byte()
45 typeBuilder.setX(width); in test_Allocationcopy1DRangeTo_Byte()
71 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Short_Helper() local
72 int arr_len = width; in test_Allocationcopy1DRangeTo_Short_Helper()
82 typeBuilder.setX(width); in test_Allocationcopy1DRangeTo_Short_Helper()
119 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Int() local
120 int arr_len = width; in test_Allocationcopy1DRangeTo_Int()
130 typeBuilder.setX(width); in test_Allocationcopy1DRangeTo_Int()
156 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Float() local
[all …]
DAllocationCopy2DRangeTest.java32 int width = random.nextInt(512); in testAllocationCopy2DRange() local
35 int[] inArray = new int[width * height]; in testAllocationCopy2DRange()
36 int[] outArray = new int[width * height]; in testAllocationCopy2DRange()
38 for (int i = 0; i < width * height; i++) { in testAllocationCopy2DRange()
44 typeBuilder.setX(width).setY(height); in testAllocationCopy2DRange()
47 mInAllocation.copy2DRangeFrom(0, 0, width, height, inArray); in testAllocationCopy2DRange()
50 mScript.set_width(width); in testAllocationCopy2DRange()
57 compareTwoArrays(inArray, outArray, width*height)); in testAllocationCopy2DRange()
/cts/tests/tests/uirendering27/src/android/uirendering/cts/util/
DBitmapAsserter.java52 int width = bitmap1.getWidth(); in assertBitmapsAreSimilar() local
55 if (width != bitmap2.getWidth() || height != bitmap2.getHeight()) { in assertBitmapsAreSimilar()
59 int[] pixels1 = new int[width * height]; in assertBitmapsAreSimilar()
60 int[] pixels2 = new int[width * height]; in assertBitmapsAreSimilar()
61 bitmap1.getPixels(pixels1, 0, width, 0, 0, width, height); in assertBitmapsAreSimilar()
62 bitmap2.getPixels(pixels2, 0, width, 0, 0, width, height); in assertBitmapsAreSimilar()
63 success = comparer.verifySame(pixels1, pixels2, 0, width, width, height); in assertBitmapsAreSimilar()
78 int width = bitmap.getWidth(); in assertBitmapIsVerified() local
82 Bitmap croppedBitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height); in assertBitmapIsVerified()
DBitmapDumper.java77 int width = idealBitmap.getWidth(); in dumpBitmaps() local
79 int[] testedArray = new int[width * height]; in dumpBitmaps()
80 int[] idealArray = new int[width * height]; in dumpBitmaps()
81 idealBitmap.getPixels(testedArray, 0, width, 0, 0, width, height); in dumpBitmaps()
82 testedBitmap.getPixels(idealArray, 0, width, 0, 0, width, height); in dumpBitmaps()
84 visualizerBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in dumpBitmaps()
85 visualizerBitmap.setPixels(visualizerArray, 0, width, 0, 0, width, height); in dumpBitmaps()
86 Bitmap croppedBitmap = Bitmap.createBitmap(testedBitmap, 0, 0, width, height); in dumpBitmaps()
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
DBitmapAsserter.java46 int width = bitmap1.getWidth(); in assertBitmapsAreSimilar() local
49 if (width != bitmap2.getWidth() || height != bitmap2.getHeight()) { in assertBitmapsAreSimilar()
53 int[] pixels1 = new int[width * height]; in assertBitmapsAreSimilar()
54 int[] pixels2 = new int[width * height]; in assertBitmapsAreSimilar()
55 bitmap1.getPixels(pixels1, 0, width, 0, 0, width, height); in assertBitmapsAreSimilar()
56 bitmap2.getPixels(pixels2, 0, width, 0, 0, width, height); in assertBitmapsAreSimilar()
57 success = comparer.verifySame(pixels1, pixels2, 0, width, width, height); in assertBitmapsAreSimilar()
73 int width = bitmap.getWidth(); in assertBitmapIsVerified() local
77 Bitmap croppedBitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height); in assertBitmapIsVerified()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DShaderTests.java49 public void draw(Canvas canvas, int width, int height) { in testSinglePixelBitmapShader()
56 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelBitmapShader()
69 public void draw(Canvas canvas, int width, int height) { in testSinglePixelComposeShader()
87 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelComposeShader()
111 public void draw(Canvas canvas, int width, int height) { in testComplexShaderUsage()
113 mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
116 final float radius = width / 2.0f; in testComplexShaderUsage()
117 bitmapCanvas.drawCircle(width / 2, height / 2, radius, mPaint); in testComplexShaderUsage()
121 width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
123 bitmapCanvas.drawCircle(width / 2, 0, radius, mPaint); in testComplexShaderUsage()
[all …]
DExactCanvasTests.java55 .addCanvasClient((canvas, width, height) -> { in testBlueRect()
67 .addCanvasClient((canvas, width, height) -> { in testPoints()
82 .addCanvasClient((canvas, width, height) -> { in testBlackRectWithStroke()
97 .addCanvasClient((canvas, width, height) -> { in testBlackLineOnGreenBack()
110 .addCanvasClient((canvas, width, height) -> { in testDrawRedRectOnBlueBack()
122 .addCanvasClient((canvas, width, height) -> { in testDrawLine()
137 .addCanvasClient((canvas, width, height) -> canvas.drawColor(Color.WHITE)) in testDrawWhiteScreen()
145 .addCanvasClient((canvas, width, height) -> { in testBasicText()
168 .addCanvasClient((canvas, width, height) -> { in testTextOnPath()
180 .addCanvasClient((canvas, width, height) -> { in testTextOnPathUsingPicture()
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DPorterDuffColorFilterTest.java41 int width = 100; in testPorterDuffColorFilter() local
43 Bitmap b1 = Bitmap.createBitmap(width / 2, height, Config.ARGB_8888); in testPorterDuffColorFilter()
45 Bitmap b2 = Bitmap.createBitmap(width, height / 2, Config.ARGB_8888); in testPorterDuffColorFilter()
48 Bitmap target = Bitmap.createBitmap(width, height, Config.ARGB_8888); in testPorterDuffColorFilter()
58 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
59 int lowerLeft = target.getPixel(width / 4, height * 3 / 4); in testPorterDuffColorFilter()
62 int lowerRight = target.getPixel(width * 3 / 4, height * 3 / 4); in testPorterDuffColorFilter()
71 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
72 assertEquals(Color.BLUE, target.getPixel(width / 4, height * 3 / 4)); in testPorterDuffColorFilter()
73 assertEquals(Color.BLUE, target.getPixel(width * 3 / 4, height * 3 / 4)); in testPorterDuffColorFilter()
[all …]
DYuvImageTest.java96 int width = 100; in testYuvImage() local
98 byte[] yuv = new byte[width * height * 2]; in testYuvImage()
104 new YuvImage(yuv, FORMATS[i], width, height, null); in testYuvImage()
116 expected = new int[]{width, width}; in testYuvImage()
118 expected = new int[]{width * 2}; in testYuvImage()
122 image = new YuvImage(yuv, FORMATS[i], width, height, null); in testYuvImage()
194 int width = mTestBitmaps[0].getWidth(); in testGetYuvData() local
196 int stride = width; in testGetYuvData()
198 mTestBitmaps[0].getPixels(argb, 0, stride, 0, 0, width, height); in testGetYuvData()
203 YuvImage image = new YuvImage(yuv, ImageFormat.NV21, width, height, strides); in testGetYuvData()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DBitmapVerifier.java31 int width = bitmap.getWidth(); in verify() local
33 int[] pixels = new int[width * height]; in verify()
34 bitmap.getPixels(pixels, 0, width, 0, 0, width, height); in verify()
35 return verify(pixels, 0, width, width, height); in verify()
41 public abstract boolean verify(int[] bitmap, int offset, int stride, int width, int height); in verify() argument
/cts/tests/tests/uirendering27/src/android/uirendering/cts/bitmapverifiers/
DBitmapVerifier.java31 int width = bitmap.getWidth(); in verify() local
33 int[] pixels = new int[width * height]; in verify()
34 bitmap.getPixels(pixels, 0, width, 0, 0, width, height); in verify()
35 return verify(pixels, 0, width, width, height); in verify()
41 public abstract boolean verify(int[] bitmap, int offset, int stride, int width, int height); in verify() argument
/cts/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/
DResourceModifier.java98 final float width = bitmap.getWidth() / 8.0f; in ResourceModifier() local
103 0.0f, 0.0f, width, 0.0f, width * 2, 0.0f, width * 3, 0.0f, in ResourceModifier()
104 0.0f, height, width, height, width * 2, height, width * 4, height, in ResourceModifier()
105 0.0f, height * 2, width, height * 2, width * 2, height * 2, width * 3, height * 2, in ResourceModifier()
106 0.0f, height * 4, width, height * 4, width * 2, height * 4, width * 4, height * 4, in ResourceModifier()
/cts/tests/tests/rscpp/src/android/cts/rscpp/
DRSYuvTest.java31 int width; field in RSYuvTest
41 return (width + 1) / 2; in getCWidth()
49 width = w; in makeYuvBuffer()
77 … return Allocation.createTyped(mRS, Type.createXY(mRS, Element.RGBA_8888(mRS), width, height)); in makeOutput()
88 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in testV17()
90 for (int j = 0; j < (width * height); j++) { in testV17()
105 byte[] nativeByteAlloc = new byte[width * height * 4]; in testV17()
106 yuvTest(this.getContext().getCacheDir().toString(), width, height, tmp, nativeByteAlloc, 0); in testV17() local
122 tb.setX(width); in test_YV12()
127 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in test_YV12()
[all …]
/cts/tools/cts-media-preparer-app/src/android/mediastress/cts/preconditions/app/
DMediaPreparerAppTest.java61 private final int width; field in MediaPreparerAppTest.Resolution
64 private Resolution(int width, int height) { in Resolution() argument
65 this.width = width; in Resolution()
73 this.width = Integer.parseInt(matcher.group(WIDTH_INDEX)); in Resolution()
79 return String.format("%dx%d", width, height); in toString()
88 int width = 0; in testGetResolutions() local
92 width = Math.max(width, format.getInteger(MediaFormat.KEY_WIDTH)); in testGetResolutions()
99 Resolution fileResolution = new Resolution(width, height); in testGetResolutions()
101 if (fileResolution.width > maxRes.width) { in testGetResolutions()
/cts/tests/media/src/android/mediav2/cts/
DEncoderProfileLevelTest.java251 private int getMinLevel(String mime, int width, int height, int frameRate, int bitrate, in getMinLevel() argument
255 return getMinLevelAVC(width, height, frameRate, bitrate); in getMinLevel()
257 return getMinLevelHEVC(width, height, frameRate, bitrate); in getMinLevel()
259 return getMinLevelH263(width, height, frameRate, bitrate); in getMinLevel()
261 return getMinLevelMPEG2(width, height, frameRate, bitrate); in getMinLevel()
263 return getMinLevelMPEG4(width, height, frameRate, bitrate, profile); in getMinLevel()
268 return getMinLevelVP9(width, height, frameRate, bitrate); in getMinLevel()
270 return getMinLevelAV1(width, height, frameRate, bitrate); in getMinLevel()
276 private int getMinLevelAVC(int width, int height, int frameRate, int bitrate) { in getMinLevelAVC() argument
312 long mbs = ((width + 15) / 16) * ((height + 15) / 16); in getMinLevelAVC()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DASurfaceControlTest.java100 public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { in surfaceChanged() argument
156 long surfaceControl, long surfaceTransaction, int width, int height, int color) { in setSolidBuffer() argument
158 surfaceControl, surfaceTransaction, width, height, color); in setSolidBuffer()
163 public void setSolidBuffer(long surfaceControl, int width, int height, int color) { in setSolidBuffer() argument
165 setSolidBuffer(surfaceControl, surfaceTransaction, width, height, color); in setSolidBuffer()
169 public void setQuadrantBuffer(long surfaceControl, long surfaceTransaction, int width, in setQuadrantBuffer() argument
173 width, height, colorTopLeft, colorTopRight, colorBottomRight, colorBottomLeft); in setQuadrantBuffer()
178 public void setQuadrantBuffer(long surfaceControl, int width, int height, int colorTopLeft, in setQuadrantBuffer() argument
181 setQuadrantBuffer(surfaceControl, surfaceTransaction, width, height, colorTopLeft, in setQuadrantBuffer()
360 public boolean checkPixels(int pixelCount, int width, int height) { in testSurfaceControl_createFromWindow()
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DBitmapUtils.java100 final int width = bmp1.getWidth(); in compareBitmaps() local
103 final long numberPixels = width * height; in compareBitmaps()
106 for (int i = 0; i < width; i++) { in compareBitmaps()
125 public static Bitmap generateRandomBitmap(int width, int height) { in generateRandomBitmap() argument
126 final Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in generateRandomBitmap()
128 for (int x = 0; x < width; x++) { in generateRandomBitmap()
136 public static Bitmap generateWhiteBitmap(int width, int height) { in generateWhiteBitmap() argument
137 final Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in generateWhiteBitmap()
200 int width = expected.getWidth(); in compareBitmapsMse() local
204 int[] expColors = new int [width * height]; in compareBitmapsMse()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/fov/
DSelectableResolution.java24 public final int width; field in SelectableResolution
30 public SelectableResolution(int cameraId, int width, int height) { in SelectableResolution() argument
32 this.width = width; in SelectableResolution()
40 return "Cam " + cameraId + ": " + width + " x " + height + " - " in toString()
/cts/hostsidetests/inputmethodservice/deviceside/lib/src/android/inputmethodservice/cts/ime/
DBitmapImage.java34 BitmapImage(@NonNull int[] pixels, int width, int height) { in BitmapImage() argument
35 mWidth = width; in BitmapImage()
48 final int width = bitmap.getWidth(); in createFromBitmap() local
50 final int[] pixels = new int[width * height]; in createFromBitmap()
51 bitmap.getPixels(pixels, 0, width, 0, 0, width, height); in createFromBitmap()
52 return new BitmapImage(pixels, width, height); in createFromBitmap()
/cts/tests/tests/uirendering/src/android/uirendering/cts/blendmode/
DBitmapBlendModeCanvasClient.java65 public void draw(Canvas canvas, int width, int height) { in draw() argument
66 Bitmap bitmap = createBitmap(width, height); in draw()
73 canvas.drawRect(0, 0, width, height, mPaint); in draw()
76 private Bitmap createBitmap(int width, int height) { in createBitmap() argument
79 Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in createBitmap()
82 width / 2.0f, in createBitmap()
84 Math.min(width, height) / 2.0f, in createBitmap()
/cts/tests/tests/uirendering27/src/android/uirendering/cts/blendmode/
DBitmapBlendModeCanvasClient.java65 public void draw(Canvas canvas, int width, int height) { in draw() argument
66 Bitmap bitmap = createBitmap(width, height); in draw()
73 canvas.drawRect(0, 0, width, height, mPaint); in draw()
76 private Bitmap createBitmap(int width, int height) { in createBitmap() argument
79 Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in createBitmap()
82 width / 2.0f, in createBitmap()
84 Math.min(width, height) / 2.0f, in createBitmap()
/cts/tests/tests/widget/src/android/widget/cts/
DTableLayout_LayoutParamsTest.java57 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
62 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
67 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
72 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
78 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
83 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
88 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
93 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
101 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.width); in testSetBaseAttributes()
111 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.width); in testSetBaseAttributes()
[all …]

12345678910>>...18