Home
last modified time | relevance | path

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

12345678910>>...15

/cts/tests/tests/uirendering/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.java78 int width = idealBitmap.getWidth(); in dumpBitmaps() local
80 int[] testedArray = new int[width * height]; in dumpBitmaps()
81 int[] idealArray = new int[width * height]; in dumpBitmaps()
82 idealBitmap.getPixels(testedArray, 0, width, 0, 0, width, height); in dumpBitmaps()
83 testedBitmap.getPixels(idealArray, 0, width, 0, 0, width, height); in dumpBitmaps()
85 visualizerBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in dumpBitmaps()
86 visualizerBitmap.setPixels(visualizerArray, 0, width, 0, 0, width, height); in dumpBitmaps()
87 Bitmap croppedBitmap = Bitmap.createBitmap(testedBitmap, 0, 0, width, height); in dumpBitmaps()
/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
DGoldenImageVerifier.java41 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
43 width, height); in verify()
45 mDifferenceBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in verify()
47 mDifferenceBitmap.setPixels(differences, 0, width, 0, 0, width, height); in verify()
DWideGamutBitmapVerifier.java32 int width = bitmap.getWidth(); in verify() local
34 return verify(dst, 0, bitmap.getRowBytes(), width, height); in verify()
38 int width, int height); in verify() argument
41 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
/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 …]
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()
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 …]
/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/graphics/src/android/graphics/cts/
DPorterDuffColorFilterTest.java40 int width = 100; in testPorterDuffColorFilter() local
42 Bitmap b1 = Bitmap.createBitmap(width / 2, height, Config.ARGB_8888); in testPorterDuffColorFilter()
44 Bitmap b2 = Bitmap.createBitmap(width, height / 2, Config.ARGB_8888); in testPorterDuffColorFilter()
47 Bitmap target = Bitmap.createBitmap(width, height, Config.ARGB_8888); in testPorterDuffColorFilter()
57 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
58 int lowerLeft = target.getPixel(width / 4, height * 3 / 4); in testPorterDuffColorFilter()
61 int lowerRight = target.getPixel(width * 3 / 4, height * 3 / 4); in testPorterDuffColorFilter()
70 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
71 assertEquals(Color.BLUE, target.getPixel(width / 4, height * 3 / 4)); in testPorterDuffColorFilter()
72 assertEquals(Color.BLUE, target.getPixel(width * 3 / 4, height * 3 / 4)); in testPorterDuffColorFilter()
[all …]
DYuvImageTest.java94 int width = 100; in testYuvImage() local
96 byte[] yuv = new byte[width * height * 2]; in testYuvImage()
102 new YuvImage(yuv, FORMATS[i], width, height, null); in testYuvImage()
114 expected = new int[]{width, width}; in testYuvImage()
116 expected = new int[]{width * 2}; in testYuvImage()
120 image = new YuvImage(yuv, FORMATS[i], width, height, null); in testYuvImage()
192 int width = mTestBitmaps[0].getWidth(); in testGetYuvData() local
194 int stride = width; in testGetYuvData()
196 mTestBitmaps[0].getPixels(argb, 0, stride, 0, 0, width, height); in testGetYuvData()
201 YuvImage image = new YuvImage(yuv, ImageFormat.NV21, width, height, strides); in testGetYuvData()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DShaderTests.java48 public void draw(Canvas canvas, int width, int height) { in testSinglePixelBitmapShader()
55 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelBitmapShader()
68 public void draw(Canvas canvas, int width, int height) { in testSinglePixelComposeShader()
86 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelComposeShader()
110 public void draw(Canvas canvas, int width, int height) { in testComplexShaderUsage()
112 mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
115 final float radius = width / 2.0f; in testComplexShaderUsage()
116 bitmapCanvas.drawCircle(width / 2, height / 2, radius, mPaint); in testComplexShaderUsage()
120 width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
122 bitmapCanvas.drawCircle(width / 2, 0, radius, mPaint); in testComplexShaderUsage()
[all …]
DExactCanvasTests.java50 .addCanvasClient((canvas, width, height) -> { in testBlueRect()
62 .addCanvasClient((canvas, width, height) -> { in testPoints()
77 .addCanvasClient((canvas, width, height) -> { in testBlackRectWithStroke()
92 .addCanvasClient((canvas, width, height) -> { in testBlackLineOnGreenBack()
105 .addCanvasClient((canvas, width, height) -> { in testDrawRedRectOnBlueBack()
117 .addCanvasClient((canvas, width, height) -> { in testDrawLine()
132 .addCanvasClient((canvas, width, height) -> canvas.drawColor(Color.WHITE)) in testDrawWhiteScreen()
140 .addCanvasClient((canvas, width, height) -> { in testBasicText()
163 .addCanvasClient((canvas, width, height) -> { in testTextOnPath()
175 .addCanvasClient((canvas, width, height) -> { in testTextOnPathUsingPicture()
[all …]
DRgba16fTests.java45 .addCanvasClient("RGBA16F_TransferFunctions", (canvas, width, height) -> { in testTransferFunctions()
50 width / (float) bitmap.getWidth(), in testTransferFunctions()
66 .addCanvasClient("RGBA16F_TransferFunctions", (canvas, width, height) -> { in testAlpha()
71 width / (float) bitmap.getWidth(), in testAlpha()
90 .addCanvasClient("RGBA16F_Masked", (canvas, width, height) -> { in testMasked()
107 width / (float) bitmap.getWidth(), in testMasked()
124 .addCanvasClient("RGBA16F_TransferFunctions_Shader", (canvas, width, height) -> { in testTransferFunctionsShader()
131 canvas.drawRect(0.0f, 0.0f, width, height, p); in testTransferFunctionsShader()
145 .addCanvasClient("RGBA16F_TransferFunctions_Mirror", (canvas, width, height) -> { in testMirroredTransferFunctions()
152 width / (float) bitmap.getWidth(), in testMirroredTransferFunctions()
/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/tools/cts-media-preparer-app/src/android/mediastress/cts/preconditions/app/
DMediaPreparerAppTest.java60 private final int width; field in MediaPreparerAppTest.Resolution
63 private Resolution(int width, int height) { in Resolution() argument
64 this.width = width; in Resolution()
72 this.width = Integer.parseInt(matcher.group(WIDTH_INDEX)); in Resolution()
78 return String.format("%dx%d", width, height); in toString()
87 int width = 0; in testGetResolutions() local
91 width = Math.max(width, format.getInteger(MediaFormat.KEY_WIDTH)); in testGetResolutions()
98 Resolution fileResolution = new Resolution(width, height); in testGetResolutions()
100 if (fileResolution.width > maxRes.width) { in testGetResolutions()
/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/hostsidetests/sustainedperf/shadertoy_android/jni/
Dhooks_android.cpp19 extern void Init(int width, int height);
24 …ICALL Java_com_android_gputest_GLtestLib_init(JNIEnv * env, jobject obj, jint width, jint height);
28 …__attribute__((unused)) JNIEnv * env,__attribute__((unused)) jobject obj, jint width, jint height) in Java_com_android_gputest_GLtestLib_init() argument
30 Init(width, height); in Java_com_android_gputest_GLtestLib_init()
/cts/tests/camera/src/android/hardware/cts/
DCamera_SizeTest.java92 float jpegAspect = largestJpegDimen.width / (float) largestJpegDimen.height; in testMaxAspectRatios()
94 largestPreviewDimen.width / (float) largestPreviewDimen.height; in testMaxAspectRatios()
98 "Largest preview dimension (w=" + largestPreviewDimen.width + ", h=" + in testMaxAspectRatios()
100 "as the largest Jpeg dimension (w=" + largestJpegDimen.width + in testMaxAspectRatios()
110 private void checkSize(Parameters parameters, int width, int height) { in checkSize() argument
111 parameters.setPictureSize(width, height); in checkSize()
112 assertEquals(width, parameters.getPictureSize().width); in checkSize()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DDialogFrameTestActivity.java130 params.width = MATCH_PARENT; in testMatchParent()
137 params.width = MATCH_PARENT; in testMatchParentLayoutInOverscan()
146 params.width = 200; in testExplicitSize()
153 params.width = 200; in testExplicitSizeTopLeftGravity()
161 params.width = 200; in testExplicitSizeBottomRightGravity()
169 params.width = 100000; in testOversizedDimensions()
176 params.width = 5000; in testOversizedDimensionsNoLimits()
185 params.width = MATCH_PARENT; in testExplicitPositionMatchParent()
194 params.width = MATCH_PARENT; in testExplicitPositionMatchParentNoLimits()
212 params.width = 200; in testWithMargins()
/cts/tests/tests/widget/src/android/widget/cts/
DTableLayout_LayoutParamsTest.java56 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
61 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
66 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
71 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
77 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
82 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
87 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
92 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
100 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.width); in testSetBaseAttributes()
110 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.width); in testSetBaseAttributes()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DNativeEncoderTest.java76 private boolean testEncode(int res, String mime, int width, int height) { in testEncode() argument
81 mime, width, height); in testEncode()
84 String mime, int width, int height); in testEncodeSurfaceNative() argument
112 private boolean testEncodeDynamicSyncFrame(int res, String mime, int width, int height) { in testEncodeDynamicSyncFrame() argument
117 mime, width, height); in testEncodeDynamicSyncFrame()
120 String mime, int width, int height); in testEncodeSurfaceDynamicSyncFrameNative() argument
148 private boolean testEncodeDynamicBitrate(int res, String mime, int width, int height) { in testEncodeDynamicBitrate() argument
153 mime, width, height); in testEncodeDynamicBitrate()
156 String mime, int width, int height); in testEncodeSurfaceDynamicBitrateNative() argument
184 private boolean testEncodePersistentSurface(int res, String mime, int width, int height) { in testEncodePersistentSurface() argument
[all …]
/cts/tests/tests/graphics/jni/
Dandroid_graphics_cts_BitmapTest.cpp25 static void validateBitmapInfo(JNIEnv* env, jclass, jobject jbitmap, jint width, jint height, in validateBitmapInfo() argument
31 ASSERT_TRUE(width >= 0 && height >= 0); in validateBitmapInfo()
32 ASSERT_EQ((uint32_t) width, info.width); in validateBitmapInfo()

12345678910>>...15