Home
last modified time | relevance | path

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

12345678910>>...28

/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DAnimatedImageDrawableTest.kt86 override fun draw(canvas: Canvas, width: Int, height: Int) { in <lambda>()
88 resizer(drawable, width, height) in <lambda>()
106 drawable, width, height -> in <lambda>() method
107 drawable.setBounds(1, 1, width - 1, height - 1) in <lambda>()
112 drawable, width, height -> in <lambda>() method
113 drawable.setBounds(width / 2, height / 2, width, height) in <lambda>()
118 drawable, width, height -> in <lambda>() method
121 drawable.setBounds(0, 0, width / 2, height / 2) in <lambda>()
126 drawable, width, height -> in <lambda>() method
129 drawable.setBounds(0, 0, width / 2, height / 2) in <lambda>()
[all …]
DShaderClippingTests.java61 .addCanvasClient((canvas, width, height) -> { in testBitmapShader()
67 Bitmap bitmap = Bitmap.createBitmap(width / 2, height / 2, in testBitmapShader()
75 clipAndDraw(canvas, width, height, s, true); in testBitmapShader()
85 .addCanvasClient((canvas, width, height) -> { in testLinearGradient()
87 LinearGradient s = new LinearGradient(width / 2f, 0, width / 2f, height, in testLinearGradient()
90 clipAndDraw(canvas, width, height, s, true); in testLinearGradient()
100 .addCanvasClient((canvas, width, height) -> { in testCompose()
102 LinearGradient s1 = new LinearGradient(width / 2f, 0, width / 2f, height, in testCompose()
104 LinearGradient s2 = new LinearGradient(0, height / 2f, width, height / 2f, in testCompose()
108 clipAndDraw(canvas, width, height, s, true); in testCompose()
[all …]
DShaderTests.java53 public void draw(Canvas canvas, int width, int height) { in testSinglePixelBitmapShader()
60 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelBitmapShader()
73 public void draw(Canvas canvas, int width, int height) { in testSinglePixelComposeShader()
91 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelComposeShader()
115 public void draw(Canvas canvas, int width, int height) { in testComplexShaderUsage()
117 mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
120 final float radius = width / 2.0f; in testComplexShaderUsage()
121 bitmapCanvas.drawCircle(width / 2, height / 2, radius, mPaint); in testComplexShaderUsage()
125 width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
127 bitmapCanvas.drawCircle(width / 2, 0, radius, mPaint); in testComplexShaderUsage()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
DBitmapAsserter.java34 int width = bitmap1.getWidth(); in assertBitmapsAreSimilar() local
37 if (width != bitmap2.getWidth() || height != bitmap2.getHeight()) { in assertBitmapsAreSimilar()
41 int[] pixels1 = new int[width * height]; in assertBitmapsAreSimilar()
42 int[] pixels2 = new int[width * height]; in assertBitmapsAreSimilar()
43 bitmap1.getPixels(pixels1, 0, width, 0, 0, width, height); in assertBitmapsAreSimilar()
44 bitmap2.getPixels(pixels2, 0, width, 0, 0, width, height); in assertBitmapsAreSimilar()
45 success = comparer.verifySame(pixels1, pixels2, 0, width, width, height); in assertBitmapsAreSimilar()
DBitmapDumper.java48 int width = idealBitmap.getWidth(); in dumpBitmaps() local
50 int[] testedArray = new int[width * height]; in dumpBitmaps()
51 int[] idealArray = new int[width * height]; in dumpBitmaps()
52 idealBitmap.getPixels(testedArray, 0, width, 0, 0, width, height); in dumpBitmaps()
53 testedBitmap.getPixels(idealArray, 0, width, 0, 0, width, height); in dumpBitmaps()
55 visualizerBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in dumpBitmaps()
56 visualizerBitmap.setPixels(visualizerArray, 0, width, 0, 0, width, height); in dumpBitmaps()
57 Bitmap croppedBitmap = Bitmap.createBitmap(testedBitmap, 0, 0, width, height); in dumpBitmaps()
/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/graphics/jni/
Dandroid_graphics_cts_AImageDecoderTest.cpp189 static void testInfo(JNIEnv* env, jclass, jlong imageDecoderPtr, jint width, jint height, in testInfo() argument
198 ASSERT_EQ(width, actualWidth); in testInfo()
411 const int32_t width = AImageDecoderHeaderInfo_getWidth(info); in testGetMinimumStride() local
415 ASSERT_EQ(bytesPerPixel(ANDROID_BITMAP_FORMAT_RGBA_F16) * width, stride); in testGetMinimumStride()
417 ASSERT_EQ(bytesPerPixel(ANDROID_BITMAP_FORMAT_RGBA_8888) * width, stride); in testGetMinimumStride()
420 auto setFormatAndCheckStride = [env, decoder, width, &stride](AndroidBitmapFormat format) { in testGetMinimumStride()
425 ASSERT_EQ(bytesPerPixel(format) * width, stride); in testGetMinimumStride()
477 int width, int height, int alphaFlags, size_t minStride, in bitmapsEqual() argument
495 EXPECT_EQ("Wrong width", jInfo.width, width); in bitmapsEqual()
544 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/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/webkit/src/android/webkit/cts/
DWebViewDarkModeTestBase.java50 public void setWebViewSize(int width, int height) { in setWebViewSize() argument
56 params.width = width; in setWebViewSize()
69 private static int[] getBitmapPixels(Bitmap bitmap, int x, int y, int width, int height) { in getBitmapPixels() argument
70 int[] pixels = new int[width * height]; in getBitmapPixels()
71 bitmap.getPixels(pixels, 0, width, x, y, width, height); in getBitmapPixels()
76 Bitmap bitmap, int x, int y, int width, int height) { in getBitmapHistogram() argument
78 for (int pixel : getBitmapPixels(bitmap, x, y, width, height)) { in getBitmapHistogram()
/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.java108 int width = 100; in testYuvImage() local
110 byte[] yuv = new byte[width * height * 2]; in testYuvImage()
116 new YuvImage(yuv, FORMATS[i], width, height, null); in testYuvImage()
129 expected = new int[]{width, width}; in testYuvImage()
132 expected = new int[]{width * 2, width * 2}; in testYuvImage()
135 expected = new int[]{width, (width + 1) / 2, (width + 1) / 2}; in testYuvImage()
138 expected = new int[]{width * 2}; in testYuvImage()
145 image = new YuvImage(yuv, FORMATS[i], width, height, null); in testYuvImage()
157 image = new YuvImage(yuv, FORMATS[0], width, height, null, null); in testYuvImage()
237 int width = mTestBitmaps[0].getWidth(); in testGetYuvData() local
[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()
DSize.java23 public final int width; field in Size
26 public Size(int width, int height) { in Size() argument
27 this.width = width; in Size()
/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/tests/tests/mediaediting/src/android/media/mediaediting/cts/
DTransformVideoAspectRatio.java60 private final int width; field in TransformVideoAspectRatio
66 public TransformVideoAspectRatio(String mediaType, int width, int height, in TransformVideoAspectRatio() argument
69 this.width = width; in TransformVideoAspectRatio()
156 .setWidth(width) in createDecFormat()
163 float inputAspectRatio = (float) width / height; in createEncFormat()
169 requestedWidth = width; in createEncFormat()
170 requestedHeight = width / requestedAspectRatio; in createEncFormat()
177 requestedWidth = width / requestedAspectRatio; in createEncFormat()
178 requestedHeight = width; in createEncFormat()
212 float inputAspectRatio = (float) width / height; in transcodeTest()
[all …]
DSsimHelper.java95 int width = referenceImage.getWidth(); in calculate() local
98 assertThat(distortedImage.getWidth()).isEqualTo(width); in calculate()
101 if (referenceLumaBuffer == null || referenceLumaBuffer.length != width * height) { in calculate()
102 referenceLumaBuffer = new byte[width * height]; in calculate()
104 if (distortedLumaBuffer == null || distortedLumaBuffer.length != width * height) { in calculate()
105 distortedLumaBuffer = new byte[width * height]; in calculate()
112 width, in calculate()
143 int width = image.getWidth(); in extractLumaChannelBuffer() local
147 for (int x = 0; x < width; x++) { in extractLumaChannelBuffer()
148 lumaChannelBuffer[y * width + x] = lumaByteBuffer.get(y * rowStride + x * pixelStride); in extractLumaChannelBuffer()
/cts/tests/mediapc/src/android/mediapc/cts/
DTestActivity.java60 public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { in surfaceChanged() argument
61 Log.v(LOG_TAG, "surface changed " + format + " " + width + " " + height); in surfaceChanged()
91 public void setScreenParams(int width, int height, boolean noStretch) { in setScreenParams() argument
94 if (noStretch && width <= dm.widthPixels && height <= dm.heightPixels) { in setScreenParams()
95 lp.width = width; in setScreenParams()
98 int a = dm.widthPixels * height / width; in setScreenParams()
100 lp.width = dm.widthPixels; in setScreenParams()
103 lp.width = dm.heightPixels * width / height; in setScreenParams()
/cts/tools/cts-media-preparer-app/src/android/mediastress/cts/preconditions/app/
DMediaPreparerAppTest.java64 private final int width; field in MediaPreparerAppTest.Resolution
67 private Resolution(int width, int height) { in Resolution() argument
68 this.width = width; in Resolution()
76 this.width = Integer.parseInt(matcher.group(WIDTH_INDEX)); in Resolution()
82 return String.format("%dx%d", width, height); in toString()
99 int width = 0; in testGetResolutions() local
103 width = Math.max(width, format.getInteger(MediaFormat.KEY_WIDTH)); in testGetResolutions()
110 Resolution fileResolution = new Resolution(width, height); in testGetResolutions()
112 if (fileResolution.width > maxRes.width) { in testGetResolutions()

12345678910>>...28