Home
last modified time | relevance | path

Searched refs:height (Results 1 – 25 of 227) sorted by relevance

12345678910

/cts/tests/tests/graphics/src/android/graphics/cts/
DPorterDuffColorFilterTest.java33 int height = 100; in testPorterDuffColorFilter() local
34 Bitmap b1 = Bitmap.createBitmap(width / 2, height, Config.ARGB_8888); in testPorterDuffColorFilter()
36 Bitmap b2 = Bitmap.createBitmap(width, height / 2, Config.ARGB_8888); in testPorterDuffColorFilter()
39 Bitmap target = Bitmap.createBitmap(width, height, Config.ARGB_8888); in testPorterDuffColorFilter()
48 canvas.drawBitmap(b2, 0, height / 2, p); in testPorterDuffColorFilter()
49 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
50 int lowerLeft = target.getPixel(width / 4, height * 3 / 4); in testPorterDuffColorFilter()
53 int lowerRight = target.getPixel(width * 3 / 4, height * 3 / 4); in testPorterDuffColorFilter()
61 canvas.drawBitmap(b2, 0, height / 2, p); in testPorterDuffColorFilter()
62 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
[all …]
DYuvImageTest.java94 int height = 100; in testYuvImage() local
95 byte[] yuv = new byte[width * height * 2]; in testYuvImage()
101 image = new YuvImage(yuv, mFormats[i], width, height, null); in testYuvImage()
119 image = new YuvImage(yuv, mFormats[i], width, height, null); in testYuvImage()
133 image = new YuvImage(yuv, format, -1, height, null); in testYuvImage()
149 image = new YuvImage(null, format, width, height, null); in testYuvImage()
201 int height = mTestBitmaps[0].getHeight(); in testGetYuvData() local
203 int[] argb = new int[stride * height]; in testGetYuvData()
204 mTestBitmaps[0].getPixels(argb, 0, stride, 0, 0, width, height); in testGetYuvData()
205 byte[] yuv = convertArgbsToYuvs(argb, stride, height, ImageFormat.NV21); in testGetYuvData()
[all …]
DPixelXorXfermodeTest.java31 int height = 100; in testPixelXorXfermode() local
32 Bitmap b1 = Bitmap.createBitmap(width / 2, height, Config.ARGB_8888); in testPixelXorXfermode()
34 Bitmap b2 = Bitmap.createBitmap(width, height / 2, Config.ARGB_8888); in testPixelXorXfermode()
37 Bitmap target = Bitmap.createBitmap(width, height, Config.ARGB_8888); in testPixelXorXfermode()
43 canvas.drawBitmap(b2, 0, height / 2, p); in testPixelXorXfermode()
44 assertEquals(Color.WHITE, target.getPixel(width / 4, height / 4)); in testPixelXorXfermode()
46 assertEquals(Color.YELLOW, target.getPixel(width / 4, height * 3 / 4)); in testPixelXorXfermode()
48 assertEquals(Color.BLUE, target.getPixel(width * 3 / 4, height * 3 / 4)); in testPixelXorXfermode()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/fov/
DSelectableResolution.java25 public final int height; field in SelectableResolution
30 public SelectableResolution(int cameraId, int width, int height) { in SelectableResolution() argument
33 this.height = height; in SelectableResolution()
40 return "Cam " + cameraId + ": " + width + " x " + height + " - " in toString()
DSize.java24 public final int height; field in Size
26 public Size(int width, int height) { in Size() argument
28 this.height = height; in Size()
/cts/tests/tests/renderscript/src/android/renderscript/cts/
DAllocationCopy2DRangeTest.java33 int height = 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()
49 mScript.set_height(height); in testAllocationCopy2DRange()
57 compareTwoArrays(inArray, outArray, width*height)); in testAllocationCopy2DRange()
DAllocationCopyToTest.java212 int height = random.nextInt(128); in test_Allocationcopy2DRangeTo_Byte() local
214 int yoff = random.nextInt(height); in test_Allocationcopy2DRangeTo_Byte()
216 int ycount = height - yoff; in test_Allocationcopy2DRangeTo_Byte()
224 typeBuilder.setX(width).setY(height); in test_Allocationcopy2DRangeTo_Byte()
243 int height = random.nextInt(128); in test_Allocationcopy2DRangeTo_Short() local
245 int yoff = random.nextInt(height); in test_Allocationcopy2DRangeTo_Short()
247 int ycount = height - yoff; in test_Allocationcopy2DRangeTo_Short()
258 typeBuilder.setX(width).setY(height); in test_Allocationcopy2DRangeTo_Short()
277 int height = random.nextInt(128); in test_Allocationcopy2DRangeTo_Int() local
279 int yoff = random.nextInt(height); in test_Allocationcopy2DRangeTo_Int()
[all …]
DYuvTest.java24 int height; field in YuvTest
39 return (height + 1) / 2; in getCHeight()
45 height = h; in makeYuvBuffer()
72 … return Allocation.createTyped(mRS, Type.createXY(mRS, Element.RGBA_8888(mRS), width, height)); in makeOutput()
76 return Allocation.createTyped(mRS, Type.createXY(mRS, Element.F32_4(mRS), width, height)); in makeOutput_f4()
87 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in testV17()
89 for (int j = 0; j < (width * height); j++) { in testV17()
129 tb.setY(height); in test_NV21()
133 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in test_NV21()
135 for (int j = 0; j < (width * height); j++) { in test_NV21()
[all …]
DrsAllocationCopyTest.java265 int height = random.nextInt(128); in test_rsAllocationCopy2D_Byte() local
267 int yOff = random.nextInt(height); in test_rsAllocationCopy2D_Byte()
269 int yCount = random.nextInt(height - yOff); in test_rsAllocationCopy2D_Byte()
270 int arr_len = width * height; in test_rsAllocationCopy2D_Byte()
277 typeBuilder.setX(width).setY(height); in test_rsAllocationCopy2D_Byte()
295 for (int i = 0; i < height; i++) { in test_rsAllocationCopy2D_Byte()
319 int height = random.nextInt(128); in test_rsAllocationCopy2D_Short() local
321 int yOff = random.nextInt(height); in test_rsAllocationCopy2D_Short()
323 int yCount = random.nextInt(height - yOff); in test_rsAllocationCopy2D_Short()
324 int arr_len = width * height; in test_rsAllocationCopy2D_Short()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/
DResourceModifier.java99 final float height = bitmap.getHeight() / 8.0f; in ResourceModifier() local
103 0.0f, height, width, height, width * 2, height, width * 4, height, in ResourceModifier()
104 0.0f, height * 2, width, height * 2, width * 2, height * 2, width * 3, height * 2, in ResourceModifier()
105 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.java32 int height; field in RSYuvTest
44 return (height + 1) / 2; in getCHeight()
50 height = h; 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
123 tb.setY(height); in test_YV12()
127 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in test_YV12()
[all …]
/cts/suite/cts/deviceTests/browserbench/assets/octane/
Dnavier-stokes.js111 x[i + (height+1) *rowSize] = x[i + height * rowSize];
114 for (var j = 1; i <= height; i++) {
121 x[i + (height + 1) * rowSize] = -x[i + height * rowSize];
124 for (var j = 1; j <= height; j++) {
131 x[i + (height + 1) * rowSize] = x[i + height * rowSize];
134 for (var j = 1; j <= height; j++) {
139 var maxEdge = (height + 1) * rowSize;
141 x[maxEdge] = 0.5 * (x[1 + maxEdge] + x[height * rowSize]);
143 x[(width+1)+maxEdge] = 0.5 * (x[width + maxEdge] + x[(width + 1) + height * rowSize]);
149 for (var j=1 ; j<=height; j++) {
[all …]
/cts/tests/tests/hardware/src/android/hardware/cts/
DCamera_SizeTest.java90 float jpegAspect = largestJpegDimen.width / (float) largestJpegDimen.height; in testMaxAspectRatios()
92 largestPreviewDimen.width / (float) largestPreviewDimen.height; in testMaxAspectRatios()
97 largestPreviewDimen.height + ") should have the same aspect ratio " + in testMaxAspectRatios()
99 ", h=" + largestJpegDimen.height + ")"); in testMaxAspectRatios()
108 private void checkSize(Parameters parameters, int width, int height) { in checkSize() argument
109 parameters.setPictureSize(width, height); in checkSize()
111 assertEquals(height, parameters.getPictureSize().height); in checkSize()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DShaderTests.java42 public void draw(Canvas canvas, int width, int height) { in testSinglePixelBitmapShader()
49 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelBitmapShader()
62 public void draw(Canvas canvas, int width, int height) { in testSinglePixelComposeShader()
80 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelComposeShader()
104 public void draw(Canvas canvas, int width, int height) { in testComplexShaderUsage()
106 mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
110 bitmapCanvas.drawCircle(width / 2, height / 2, radius, mPaint); in testComplexShaderUsage()
114 width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
117 bitmapCanvas.drawCircle(width / 2, height, radius, mPaint); in testComplexShaderUsage()
123 width / 2, height / 2, radius, in testComplexShaderUsage()
DExactCanvasTests.java43 public void draw(Canvas canvas, int width, int height) { in testBlueRect()
58 public void draw(Canvas canvas, int width, int height) { in testPoints()
76 public void draw(Canvas canvas, int width, int height) { in testBlackRectWithStroke()
94 public void draw(Canvas canvas, int width, int height) { in testBlackLineOnGreenBack()
110 public void draw(Canvas canvas, int width, int height) { in testDrawRedRectOnBlueBack()
125 public void draw(Canvas canvas, int width, int height) { in testDrawLine()
143 public void draw(Canvas canvas, int width, int height) { in testDrawWhiteScreen()
156 public void draw(Canvas canvas, int width, int height) { in testBasicText()
172 public void draw(Canvas canvas, int width, int height) { in testBasicColorXfermode()
192 public void draw(Canvas canvas, int width, int height) { in testBluePaddedSquare()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapcomparers/
DMeanSquaredComparer.java45 int height) { in verifySame() argument
46 float totalError = getMSE(ideal, given, offset, stride, width, height); in verifySame()
53 Allocation given, int offset, int stride, int width, int height, in verifySameRowsRS() argument
68 error /= (height * width); in verifySameRowsRS()
79 int height) { in getMSE() argument
82 for (int y = 0 ; y < height ; y++) { in getMSE()
92 totalError /= (width * height); in getMSE()
DBaseRenderScriptComparer.java17 int height); in verifySame() argument
24 Allocation given, int offset, int stride, int width, int height, in verifySameRowsRS() argument
28 Allocation given, int offset, int stride, int width, int height, in verifySameRS() argument
31 mHeight = height; in verifySameRS()
35 return verifySameRowsRS(resources, ideal, given, offset, stride, width, height, in verifySameRS()
/cts/tests/tests/media/src/android/media/cts/
DIvfWriter.java52 int width, int height, in IvfWriter() argument
56 mHeight = height; in IvfWriter()
73 public IvfWriter(String filename, int width, int height) throws IOException { in IvfWriter() argument
74 this(filename, width, height, 1, 1000000); in IvfWriter()
110 private static byte[] makeIvfHeader(int frameCount, int width, int height, int scale, int rate){ in makeIvfHeader() argument
123 lay16Bits(ivfHeader, 14, height); in makeIvfHeader()
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
DBitmapDumper.java79 int height = idealBitmap.getHeight(); 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/widget/src/android/widget/cts/
DTableLayout_LayoutParamsTest.java49 assertEquals(300, layoutParams.height); in testConstructor()
54 assertEquals(300, layoutParams.height); in testConstructor()
62 assertEquals(300, layoutParams.height); in testConstructor()
66 assertEquals(300, layoutParams.height); in testConstructor()
72 assertEquals(300, mockLayoutParams.height); in testSetBaseAttributes()
82 assertEquals(600, mockLayoutParams.height); in testSetBaseAttributes()
87 assertEquals(400, mockLayoutParams.height); in testSetBaseAttributes()
97 assertEquals(TableLayout.LayoutParams.WRAP_CONTENT, mockLayoutParams.height); in testSetBaseAttributes()
102 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.height); in testSetBaseAttributes()
112 assertEquals(TableLayout.LayoutParams.WRAP_CONTENT, mockLayoutParams.height); in testSetBaseAttributes()
[all …]
DRadioGroup_LayoutParamsTest.java53 assertEquals(Integer.MAX_VALUE, mLayoutParams.height); in testConstructor()
58 assertEquals(Integer.MIN_VALUE, mLayoutParams.height); in testConstructor()
64 assertEquals(Integer.MAX_VALUE, mLayoutParams.height); in testConstructor()
70 assertEquals(Integer.MAX_VALUE, mLayoutParams.height); in testConstructor()
75 assertEquals(60, mLayoutParams.height); in testConstructor()
87 assertEquals(200, mLayoutParams.height); in testConstructor()
102 assertEquals(20, mLayoutParams.height); in testConstructor()
126 assertEquals(LayoutParams.MATCH_PARENT, mLayoutParams.height); in testConstructor()
130 assertEquals(RadioGroup.LayoutParams.WRAP_CONTENT, mLayoutParams.height); in testConstructor()
144 assertEquals(LayoutParams.WRAP_CONTENT, layoutParams.height); in testSetBaseAttributes()
[all …]
DListPopupWindowTest.java99 int height = getDisplay().getHeight() / 2; in testAccessHeight() local
100 mPopupWindow.setHeight(height); in testAccessHeight()
101 assertEquals(height, mPopupWindow.getHeight()); in testAccessHeight()
103 height = getDisplay().getHeight(); in testAccessHeight()
104 mPopupWindow.setHeight(height); in testAccessHeight()
105 assertEquals(height, mPopupWindow.getHeight()); in testAccessHeight()
110 height = getDisplay().getHeight() * 2; in testAccessHeight()
111 mPopupWindow.setHeight(height); in testAccessHeight()
112 assertEquals(height, mPopupWindow.getHeight()); in testAccessHeight()
114 height = -getDisplay().getHeight() / 2; in testAccessHeight()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DGoldenImageVerifier.java35 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
37 width, height); in verify()
39 mDifferenceBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in verify()
41 mDifferenceBitmap.setPixels(differences, 0, width, 0, 0, width, height); in verify()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/streamquality/
DPlayVideoActivity.java169 public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
170 if (width != 0 && height != 0) {
172 mVideoHeight = height;
195 if (rect.width() / aspectRatio <= rect.height()) {
197 lp.height = (int) (rect.width() / aspectRatio);
199 lp.width = (int) (rect.height() * aspectRatio);
200 lp.height = rect.height();
205 @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {}
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DMediaRecorderStressTest.java222 int height; in testStressRecorder() local
235 height = previewSizes.get(0).height; in testStressRecorder()
237 if (size.width < width || size.height < height) { in testStressRecorder()
239 height = size.height; in testStressRecorder()
244 height = VIDEO_HEIGHT; in testStressRecorder()
249 Log.v(TAG, String.format("Camera video size used for test %dx%d", width, height)); in testStressRecorder()
271 mRecorder.setVideoSize(width, height); in testStressRecorder()
299 int height; in testStressCameraSwitchRecorder() local
330 height = previewSizes.get(0).height; in testStressCameraSwitchRecorder()
332 if (size.width < width || size.height < height) { in testStressCameraSwitchRecorder()
[all …]

12345678910