/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | PorterDuffColorFilterTest.java | 41 int height = 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() 56 canvas.drawBitmap(b2, 0, height / 2, p); 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() 69 canvas.drawBitmap(b2, 0, height / 2, p); in testPorterDuffColorFilter() 70 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter() [all …]
|
D | YuvImageTest.java | 95 int height = 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() 120 image = new YuvImage(yuv, FORMATS[i], width, height, null); in testYuvImage() 193 int height = mTestBitmaps[0].getHeight(); in testGetYuvData() local 195 int[] argb = new int[stride * height]; in testGetYuvData() 196 mTestBitmaps[0].getPixels(argb, 0, stride, 0, 0, width, height); in testGetYuvData() 197 byte[] yuv = convertArgbsToYuvs(argb, stride, height, ImageFormat.NV21); in testGetYuvData() 201 YuvImage image = new YuvImage(yuv, ImageFormat.NV21, width, height, strides); in testGetYuvData() 212 private void generateTestBitmaps(int width, int height) { in generateTestBitmaps() argument [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/fov/ |
D | SelectableResolution.java | 25 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()
|
D | Size.java | 24 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/ |
D | AllocationCopy2DRangeTest.java | 33 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()
|
D | AllocationCopyToTest.java | 231 int height = random.nextInt(128); in test_Allocationcopy2DRangeTo_Byte() local 233 int yoff = random.nextInt(height); in test_Allocationcopy2DRangeTo_Byte() 235 int ycount = height - yoff; in test_Allocationcopy2DRangeTo_Byte() 243 typeBuilder.setX(width).setY(height); in test_Allocationcopy2DRangeTo_Byte() 262 int height = random.nextInt(128); in test_Allocationcopy2DRangeTo_Short_Helper() local 264 int yoff = random.nextInt(height); in test_Allocationcopy2DRangeTo_Short_Helper() 266 int ycount = height - yoff; in test_Allocationcopy2DRangeTo_Short_Helper() 277 typeBuilder.setX(width).setY(height); in test_Allocationcopy2DRangeTo_Short_Helper() 307 int height = random.nextInt(128); in test_Allocationcopy2DRangeTo_Int() local 309 int yoff = random.nextInt(height); in test_Allocationcopy2DRangeTo_Int() [all …]
|
D | RsAllocationCopyTest.java | 265 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 …]
|
D | YuvTest.java | 24 int height; field in YuvTest 54 return (height + 1) / 2; in getCHeight() 60 height = h; in makeYuvBuffer() 87 … return Allocation.createTyped(mRS, Type.createXY(mRS, Element.RGBA_8888(mRS), width, height)); in makeOutput() 91 return Allocation.createTyped(mRS, Type.createXY(mRS, Element.F32_4(mRS), width, height)); in makeOutput_f4() 102 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in testV17() 104 for (int j = 0; j < (width * height); j++) { in testV17() 149 tb.setY(height); in test_NV21() 153 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in test_NV21() 155 for (int j = 0; j < (width * height); j++) { in test_NV21() [all …]
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/ |
D | BitmapAsserter.java | 53 int height = bitmap1.getHeight(); 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() 79 int height = bitmap.getHeight(); in assertBitmapIsVerified() local 82 Bitmap croppedBitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height); in assertBitmapIsVerified()
|
D | BitmapDumper.java | 79 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/uirendering/src/android/uirendering/cts/testinfrastructure/ |
D | ResourceModifier.java | 99 final float height = bitmap.getHeight() / 8.0f; in ResourceModifier() local 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/uirendering/src/android/uirendering/cts/testclasses/ |
D | ShaderTests.java | 48 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() 116 bitmapCanvas.drawCircle(width / 2, height / 2, radius, mPaint); in testComplexShaderUsage() 120 width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage() 123 bitmapCanvas.drawCircle(width / 2, height, radius, mPaint); in testComplexShaderUsage() 129 width / 2, height / 2, radius, in testComplexShaderUsage() [all …]
|
D | ExactCanvasTests.java | 50 .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 …]
|
D | Rgba16fTests.java | 45 .addCanvasClient("RGBA16F_TransferFunctions", (canvas, width, height) -> { in testTransferFunctions() 51 height / (float) bitmap.getHeight()); in testTransferFunctions() 66 .addCanvasClient("RGBA16F_TransferFunctions", (canvas, width, height) -> { in testAlpha() 72 height / (float) bitmap.getHeight()); in testAlpha() 90 .addCanvasClient("RGBA16F_Masked", (canvas, width, height) -> { in testMasked() 108 height / (float) bitmap.getHeight()); 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() 153 height / (float) bitmap.getHeight()); in testMirroredTransferFunctions()
|
/cts/tests/tests/rscpp/src/android/cts/rscpp/ |
D | RSYuvTest.java | 32 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/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/ |
D | BitmapVerifier.java | 32 int height = bitmap.getHeight(); 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
|
D | WideGamutBitmapVerifier.java | 33 int height = bitmap.getHeight(); 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/tools/cts-media-preparer-app/src/android/mediastress/cts/preconditions/app/ |
D | MediaPreparerAppTest.java | 61 private final int height; field in MediaPreparerAppTest.Resolution 63 private Resolution(int width, int height) { in Resolution() argument 65 this.height = height; in Resolution() 73 this.height = Integer.parseInt(matcher.group(HEIGHT_INDEX)); in Resolution() 78 return String.format("%dx%d", width, height); in toString() 88 int height = 0; in testGetResolutions() local 92 height = Math.max(height, format.getInteger(MediaFormat.KEY_HEIGHT)); in testGetResolutions() 98 Resolution fileResolution = new Resolution(width, height); in testGetResolutions()
|
/cts/hostsidetests/sustainedperf/shadertoy_android/jni/ |
D | hooks_android.cpp | 19 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/ |
D | Camera_SizeTest.java | 92 float jpegAspect = largestJpegDimen.width / (float) largestJpegDimen.height; in testMaxAspectRatios() 94 largestPreviewDimen.width / (float) largestPreviewDimen.height; in testMaxAspectRatios() 99 largestPreviewDimen.height + ") should have the same aspect ratio " + in testMaxAspectRatios() 101 ", h=" + largestJpegDimen.height + ")"); in testMaxAspectRatios() 110 private void checkSize(Parameters parameters, int width, int height) { in checkSize() argument 111 parameters.setPictureSize(width, height); in checkSize() 113 assertEquals(height, parameters.getPictureSize().height); in checkSize()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/ |
D | DialogFrameTestActivity.java | 131 params.height = MATCH_PARENT; in testMatchParent() 138 params.height = MATCH_PARENT; in testMatchParentLayoutInOverscan() 147 params.height = 200; in testExplicitSize() 154 params.height = 200; in testExplicitSizeTopLeftGravity() 162 params.height = 200; in testExplicitSizeBottomRightGravity() 170 params.height = 100000; in testOversizedDimensions() 177 params.height = 5000; in testOversizedDimensionsNoLimits() 186 params.height = MATCH_PARENT; in testExplicitPositionMatchParent() 195 params.height = MATCH_PARENT; in testExplicitPositionMatchParentNoLimits() 213 params.height = 200; in testWithMargins()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | TableLayout_LayoutParamsTest.java | 57 assertEquals(TableLayout.LayoutParams.WRAP_CONTENT, layoutParams.height); in testConstructor() 62 assertEquals(TableLayout.LayoutParams.WRAP_CONTENT, layoutParams.height); in testConstructor() 67 assertEquals(300, layoutParams.height); in testConstructor() 72 assertEquals(350, layoutParams.height); in testConstructor() 78 assertEquals(360, layoutParams.height); in testConstructor() 83 assertEquals(420, layoutParams.height); in testConstructor() 88 assertEquals(400, layoutParams.height); in testConstructor() 93 assertEquals(650, layoutParams.height); in testConstructor() 101 assertEquals(300, mockLayoutParams.height); in testSetBaseAttributes() 111 assertEquals(600, mockLayoutParams.height); in testSetBaseAttributes() [all …]
|
/cts/tests/tests/media/src/android/media/cts/ |
D | NativeEncoderTest.java | 76 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 …]
|
D | IvfWriter.java | 56 String filename, String mimeType, int width, int height, int scale, in IvfWriter() argument 61 mHeight = height; in IvfWriter() 79 public IvfWriter(String filename, String mimeType, int width, int height) throws IOException { in IvfWriter() argument 80 this(filename, mimeType, width, height, 1, 1000000); in IvfWriter() 117 int frameCount, int width, int height, int scale, int rate, String mimeType) { in makeIvfHeader() argument 130 lay16Bits(ivfHeader, 14, height); in makeIvfHeader()
|
/cts/tests/tests/graphics/jni/ |
D | android_graphics_cts_BitmapTest.cpp | 25 static void validateBitmapInfo(JNIEnv* env, jclass, jobject jbitmap, jint width, jint height, in validateBitmapInfo() argument 31 ASSERT_TRUE(width >= 0 && height >= 0); in validateBitmapInfo() 33 ASSERT_EQ((uint32_t) height, info.height); in validateBitmapInfo()
|