/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
D | ColorSpace.java | 42 ByteBuffer input, ByteBuffer output, int width, int height) { in convertYuv420pToRgba8888() argument 43 expectInputSize(input, (3 * width * height) / 2); in convertYuv420pToRgba8888() 44 expectOutputSize(output, width * height * 4); in convertYuv420pToRgba8888() 45 nativeYuv420pToRgba8888(input, output, width, height); in convertYuv420pToRgba8888() 61 ByteBuffer input, ByteBuffer output, int width, int height) { in convertArgb8888ToRgba8888() argument 62 expectInputSize(input, width * height * 4); in convertArgb8888ToRgba8888() 63 expectOutputSize(output, width * height * 4); in convertArgb8888ToRgba8888() 64 nativeArgb8888ToRgba8888(input, output, width, height); in convertArgb8888ToRgba8888() 80 ByteBuffer input, ByteBuffer output, int width, int height) { in convertRgba8888ToHsva8888() argument 81 expectInputSize(input, width * height * 4); in convertRgba8888ToHsva8888() [all …]
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | BitmapMeshLayerActivity.java | 50 final float height = mBitmap1.getHeight() / 3.0f; in BitmapMeshView() local 54 0.0f, height, width, height, width * 2, height, width * 4, height, in BitmapMeshView() 55 0.0f, height * 2, width, height * 2, width * 2, height * 2, width * 3, height * 2, in BitmapMeshView() 56 0.0f, height * 4, width, height * 4, width * 2, height * 4, width * 4, height * 4, in BitmapMeshView()
|
D | BitmapMeshActivity.java | 49 final float height = mBitmap1.getHeight() / 3.0f; in BitmapMeshView() local 53 0.0f, height, width, height, width * 2, height, width * 4, height, in BitmapMeshView() 54 0.0f, height * 2, width, height * 2, width * 2, height * 2, width * 3, height * 2, in BitmapMeshView() 55 0.0f, height * 4, width, height * 4, width * 2, height * 4, width * 4, height * 4, in BitmapMeshView()
|
D | Alpha8BitmapActivity.java | 60 final float height = texture.getHeight() / 3.0f; in BitmapsView() local 64 0.0f, height, width, height, width * 2, height, width * 4, height, in BitmapsView() 65 … 0.0f, height * 2, width, height * 2, width * 2, height * 2, width * 3, height * 2, in BitmapsView() 66 … 0.0f, height * 4, width, height * 4, width * 2, height * 4, width * 4, height * 4, in BitmapsView()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/ |
D | LegacySizeSpecSource.kt | 69 getDisplayBounds().height()) in getMaxSize() 73 (getDisplayBounds().height() - insetBounds.bottom)) in getMaxSize() 81 val maxHeight = Math.max(getDefaultSize(aspectRatio).height, in getMaxSize() 93 getDisplayBounds().height()) in getDefaultSize() 97 val height: Int in getDefaultSize() constant 104 height = Math.round(width / aspectRatio) in getDefaultSize() 107 height = minSize in getDefaultSize() 108 width = Math.round(height * aspectRatio) in getDefaultSize() 115 height = Math.round(Math.sqrt((radius * radius / in getDefaultSize() 117 width = Math.round(height * aspectRatio) in getDefaultSize() [all …]
|
/frameworks/av/media/libstagefright/colorconversion/fuzzer/ |
D | color_conversion_fuzzer.cpp | 48 int32_t getFrameSize(OMX_COLOR_FORMATTYPE colorFormat, int32_t stride, int32_t height); 53 int32_t height) { in getFrameSize() argument 58 frameSize = 2 * stride * height; in getFrameSize() 64 frameSize = 3 * stride * height; in getFrameSize() 70 frameSize = 4 * stride * height; in getFrameSize() 78 frameSize = stride * height + 2 * (((stride + 1) / 2) * ((height + 1) / 2)); in getFrameSize() 92 int32_t srcLeft, srcTop, srcRight, srcBottom, width, height, stride; in process() local 94 height = mFdp.ConsumeIntegralInRange<int32_t>(kMinFrameSize, kMaxFrameSize); in process() 98 srcTop = mFdp.ConsumeIntegralInRange<int32_t>(0, height - 1); in process() 100 srcBottom = mFdp.ConsumeIntegralInRange<int32_t>(srcTop, height - 1); in process() [all …]
|
/frameworks/native/libs/vr/libbufferhub/ |
D | ion_buffer.cpp | 20 IonBuffer::IonBuffer(uint32_t width, uint32_t height, uint32_t format, in IonBuffer() argument 23 Alloc(width, height, kDefaultGraphicBufferLayerCount, format, usage); in IonBuffer() 26 IonBuffer::IonBuffer(buffer_handle_t handle, uint32_t width, uint32_t height, in IonBuffer() argument 28 : IonBuffer(handle, width, height, kDefaultGraphicBufferLayerCount, stride, in IonBuffer() 31 IonBuffer::IonBuffer(buffer_handle_t handle, uint32_t width, uint32_t height, in IonBuffer() argument 38 handle, width, height, layer_count, stride, format, usage); in IonBuffer() 40 Import(handle, width, height, layer_count, stride, format, usage); in IonBuffer() 48 handle(), width(), height(), stride(), format(), usage()); in ~IonBuffer() 74 int IonBuffer::Alloc(uint32_t width, uint32_t height, uint32_t layer_count, in Alloc() argument 78 "usage=%" PRIx64, width, height, layer_count, format, usage); in Alloc() [all …]
|
/frameworks/base/tests/SilkFX/src/com/android/test/silkfx/hdr/ |
D | GainmapTransformsTest.kt | 69 process { Bitmap.createScaledBitmap(it, it.width / 3, it.height / 3, true) } in <lambda>() 75 val height: Int = it.height in <lambda>() constant 78 m.setRotate(90.0f, (width / 2).toFloat(), (height / 2).toFloat()) in <lambda>() 79 Bitmap.createBitmap(it, 0, 0, width, height, m, false) in <lambda>() 86 val height: Int = it.height in <lambda>() constant 89 m.setRotate(90.0f, (width / 2).toFloat(), (height / 2).toFloat()) in <lambda>() 91 Bitmap.createBitmap(it, 0, 0, width, height, m, false) in <lambda>() 98 val height: Int = it.height in <lambda>() constant 99 Bitmap.createBitmap(it, width / 2, height / 2, in <lambda>() 100 width / 4, height / 4, null, false) in <lambda>() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shared/animation/ |
D | UnfoldMoveFromCenterAnimatorTest.kt | 58 givenScreen(width = 100, height = 100, rotation = ROTATION_0) in testRegisterViewOnTheLeftOfVerticalFold_halfProgress_viewTranslatedToTheRight() 59 val view = createView(x = 20, width = 10, height = 10) in testRegisterViewOnTheLeftOfVerticalFold_halfProgress_viewTranslatedToTheRight() 74 givenScreen(width = 100, height = 100, rotation = ROTATION_0) in testRegisterViewOnTheLeftOfVerticalFold_zeroProgress_viewTranslatedToTheRight() 75 val view = createView(x = 20, width = 10, height = 10) in testRegisterViewOnTheLeftOfVerticalFold_zeroProgress_viewTranslatedToTheRight() 90 givenScreen(width = 100, height = 100, rotation = ROTATION_0) in testRegisterViewOnTheLeftOfVerticalFold_fullProgress_viewTranslatedToTheOriginalPosition() 91 val view = createView(x = 20, width = 10, height = 10) in testRegisterViewOnTheLeftOfVerticalFold_fullProgress_viewTranslatedToTheOriginalPosition() 106 givenScreen(width = 100, height = 100, rotation = ROTATION_0) in testViewOnTheLeftOfVerticalFoldWithTranslation_halfProgress_viewTranslatedToTheRight() 107 val view = createView(x = 20, width = 10, height = 10, translationX = 100f) in testViewOnTheLeftOfVerticalFoldWithTranslation_halfProgress_viewTranslatedToTheRight() 122 givenScreen(width = 100, height = 100, rotation = ROTATION_0) in testRegisterViewAndUnregister_halfProgress_viewIsNotUpdated() 123 val view = createView(x = 20, width = 10, height = 10) in testRegisterViewAndUnregister_halfProgress_viewIsNotUpdated() [all …]
|
/frameworks/base/media/mca/filterfw/native/core/ |
D | geometry.cpp | 73 if (width <= 0.0f || height <= 0.0f || ratio <= 0.0f) { in ExpandToAspectRatio() 77 const float current_ratio = width / height; in ExpandToAspectRatio() 83 const float dy = height * (current_ratio / ratio - 1.0f); in ExpandToAspectRatio() 85 height += dy; in ExpandToAspectRatio() 91 if (width <= 0.0f || height <= 0.0f || length <= 0.0f) { in ExpandToMinLength() 95 const float current_length = width > height ? width : height; in ExpandToMinLength() 100 const float dy = height * (length / current_length - 1.0f); in ExpandToMinLength() 102 height += dy; in ExpandToMinLength() 108 if (width <= 0.0f || height <= 0.0f || factor <= 0.0f) { in ScaleWithLengthLimit() 112 const float current_length = width > height ? width : height; in ScaleWithLengthLimit() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/ |
D | TriangleShape.java | 37 public static TriangleShape create(float width, float height, boolean isPointingUp) { in create() argument 40 triangularPath.moveTo(0, height); in create() 41 triangularPath.lineTo(width, height); in create() 46 triangularPath.lineTo(width / 2, height); in create() 50 return new TriangleShape(triangularPath, width, height); in create() 55 float width, float height, boolean isPointingLeft) { in createHorizontal() argument 58 triangularPath.moveTo(0, height / 2); in createHorizontal() 59 triangularPath.lineTo(width, height); in createHorizontal() 63 triangularPath.moveTo(0, height); in createHorizontal() 64 triangularPath.lineTo(width, height / 2); in createHorizontal() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/ |
D | TriangleShape.java | 39 public static TriangleShape create(float width, float height, boolean isPointingUp) { in create() argument 42 triangularPath.moveTo(0, height); in create() 43 triangularPath.lineTo(width, height); in create() 48 triangularPath.lineTo(width / 2, height); in create() 52 return new TriangleShape(triangularPath, width, height); in create() 57 float width, float height, boolean isPointingLeft) { in createHorizontal() argument 60 triangularPath.moveTo(0, height / 2); in createHorizontal() 61 triangularPath.lineTo(width, height); in createHorizontal() 65 triangularPath.moveTo(0, height); in createHorizontal() 66 triangularPath.lineTo(width, height / 2); in createHorizontal() [all …]
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
D | BitmapFillrate.cpp | 38 void createContent(int width, int height, Canvas& canvas) override { in createContent() argument 40 createNode(canvas, 0x909C27B0, 0, 0, width, height); in createContent() 41 createNode(canvas, 0xA0CDDC39, width / 3, height / 3, width, height); in createContent() 42 createNode(canvas, 0x90009688, width / 3, 0, width, height); in createContent() 43 createNode(canvas, 0xA0FF5722, 0, height / 3, width, height); in createContent() 44 createNode(canvas, 0x9000796B, width / 6, height / 6, width, height); in createContent() 45 createNode(canvas, 0xA0FFC107, width / 6, 0, width, height); in createContent() 57 void createNode(Canvas& canvas, SkColor color, int left, int top, int width, int height) { in createNode() argument 59 int itemHeight = 2 * height / 3; in createNode()
|
/frameworks/base/media/jni/ |
D | android_media_Utils.cpp | 121 width = (buffer->width + buffer->stride * (buffer->height - 1)) * 4; in Image_getBlobSize() 185 if (buffer->height % 2 != 0) { in getLockedImageInfo() 186 ALOGE("YCbCr_420_888: height (%d) should be a multiple of 2", buffer->height); in getLockedImageInfo() 195 if (buffer->height <= 0) { in getLockedImageInfo() 196 ALOGE("YCbCr_420_888: height (%d) should be a > 0", buffer->height); in getLockedImageInfo() 210 dataSize = buffer->stride * (buffer->height - 1) + buffer->width; in getLockedImageInfo() 214 dataSize = buffer->chromaStride * (buffer->height / 2 - 1) + in getLockedImageInfo() 226 if (buffer->height % 2 != 0) { in getLockedImageInfo() 227 ALOGE("YCrCb_420_SP: height (%d) should be a multiple of 2", buffer->height); in getLockedImageInfo() 236 if (buffer->height <= 0) { in getLockedImageInfo() [all …]
|
/frameworks/base/opengl/java/android/opengl/ |
D | ETC1Util.java | 75 int height = texture.getHeight(); in loadTexture() local 79 GLES10.glCompressedTexImage2D(target, level, ETC1.ETC1_RGB8_OES, width, height, in loadTexture() 85 ByteBuffer decodedData = ByteBuffer.allocateDirect(stride*height) in loadTexture() 87 ETC1.decodeImage(data, decodedData, width, height, pixelSize, stride); in loadTexture() 88 GLES10.glTexImage2D(target, level, fallbackFormat, width, height, border, in loadTexture() 117 public ETC1Texture(int width, int height, ByteBuffer data) { in ETC1Texture() argument 119 mHeight = height; in ETC1Texture() 154 int height = 0; in createTexture() local 167 height = ETC1.getHeight(headerBuffer); in createTexture() 169 int encodedSize = ETC1.getEncodedDataSize(width, height); in createTexture() [all …]
|
/frameworks/base/media/mca/filterpacks/native/base/ |
D | geometry.cpp | 74 if (width <= 0.0f || height <= 0.0f || ratio <= 0.0f) { in ExpandToAspectRatio() 78 const float current_ratio = width / height; in ExpandToAspectRatio() 84 const float dy = height * (current_ratio / ratio - 1.0f); in ExpandToAspectRatio() 86 height += dy; in ExpandToAspectRatio() 92 if (width <= 0.0f || height <= 0.0f || length <= 0.0f) { in ExpandToMinLength() 96 const float current_length = width > height ? width : height; in ExpandToMinLength() 101 const float dy = height * (length / current_length - 1.0f); in ExpandToMinLength() 103 height += dy; in ExpandToMinLength() 109 if (width <= 0.0f || height <= 0.0f || factor <= 0.0f) { in ScaleWithLengthLimit() 113 const float current_length = width > height ? width : height; in ScaleWithLengthLimit() [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | Bitmap.java | 128 Bitmap(long nativeBitmap, int width, int height, int density, in Bitmap() argument 131 this(nativeBitmap, width, height, density, requestPremultiplied, ninePatchChunk, in Bitmap() 136 Bitmap(long nativeBitmap, int width, int height, int density, in Bitmap() argument 144 mHeight = height; in Bitmap() 184 void reinit(int width, int height, boolean requestPremultiplied) { in reinit() argument 186 mHeight = height; in reinit() 284 public void reconfigure(int width, int height, @NonNull Config config) { in reconfigure() argument 286 if (width <= 0 || height <= 0) { in reconfigure() 293 nativeReconfigure(mNativePtr, width, height, config.nativeInt, mRequestPremultiplied); in reconfigure() 295 mHeight = height; in reconfigure() [all …]
|
/frameworks/av/services/camera/libcameraservice/tests/ |
D | ZoomRatioTest.cpp | 164 int32_t height = testActiveArraySize[3]; in subScaleCoordinatesTest() local 167 height = testPreCorrActiveArraySize[3]; in subScaleCoordinatesTest() 173 0, height - 1, // bottom-left in subScaleCoordinatesTest() 174 width - 1, height - 1, // bottom-right in subScaleCoordinatesTest() 175 (width - 1) / 2, (height - 1) / 2, // center in subScaleCoordinatesTest() 176 (width - 1) / 4, (height - 1) / 4, // top-left after 2x in subScaleCoordinatesTest() 177 (width - 1) / 3, (height - 1) * 2 / 3, // bottom-left after 3x zoom in subScaleCoordinatesTest() 178 (width - 1) * 7 / 8, (height - 1) / 2, // middle-right after 1.33x zoom in subScaleCoordinatesTest() 183 mapper.scaleCoordinates(coords.data(), coords.size()/2, 1.0f, false /*clamp*/, width, height); in subScaleCoordinatesTest() 190 - (width - 1) / 2.0f, - (height - 1) / 2.0f,// top-left in subScaleCoordinatesTest() [all …]
|
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/ |
D | BitmapRenderer.java | 35 static Bitmap createSoftwareBitmap(int width, int height, BitmapRenderer renderer) { in createSoftwareBitmap() argument 37 Bitmap result = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in createSoftwareBitmap() 43 static Bitmap createHardwareBitmap(int width, int height, BitmapRenderer renderer) { in createHardwareBitmap() argument 45 return createSoftwareBitmap(width, height, renderer); in createHardwareBitmap() 50 renderer.draw(picture.beginRecording(width, height)); in createHardwareBitmap() 59 static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height) { in createBitmap() argument 61 return createHardwareBitmap(width, height, c -> c.drawBitmap(source, in createBitmap() 62 new Rect(x, y, x + width, y + height), new RectF(0, 0, width, height), null)); in createBitmap() 65 return Bitmap.createBitmap(source, x, y, width, height); in createBitmap()
|
/frameworks/av/media/module/libmediaformatshaper/ |
D | CodecProperties.cpp | 182 int32_t height = 0; in bppPoint() local 187 width = 1080; height = 1920; in bppPoint() 189 width = 720; height = 1280; in bppPoint() 191 width = 540; height = 960; in bppPoint() 193 width = 480; height = 854; in bppPoint() 213 height = strtol(p, &q, 0); in bppPoint() 215 height = -1; in bppPoint() 217 if (width <= 0 || height <= 0 || width > DIMENSION_LIMIT || height > DIMENSION_LIMIT) { in bppPoint() 237 point->pixels = width * height; in bppPoint() 239 point->height = height; in bppPoint() [all …]
|
/frameworks/base/core/java/com/android/internal/view/ |
D | ActionBarPolicy.java | 55 final int height = config.screenHeightDp; in getMaxActionButtons() local 57 if (smallest > 600 || (width > 960 && height > 720) || (width > 720 && height > 960)) { in getMaxActionButtons() 60 } else if (width >= 500 || (width > 640 && height > 480) || (width > 480 && height > 640)) { in getMaxActionButtons() 91 final int height = configuration.screenHeightDp; in hasEmbeddedTabs() local 93 width >= 480 || (width >= 640 && height >= 480); in hasEmbeddedTabs() 100 int height = a.getLayoutDimension(R.styleable.ActionBar_height, 0); in getTabContainerHeight() local 104 height = Math.min(height, in getTabContainerHeight() 108 return height; in getTabContainerHeight()
|
/frameworks/native/libs/ui/ |
D | GraphicBufferAllocator.cpp | 100 list.keyAt(i), sizeStr.c_str(), rec.width, rec.stride, rec.height, in dump() 116 status_t GraphicBufferAllocator::allocateHelper(uint32_t width, uint32_t height, PixelFormat format, in allocateHelper() argument 124 if (!width || !height) in allocateHelper() 125 width = height = 1; in allocateHelper() 128 if (std::numeric_limits<size_t>::max() / width / height < static_cast<size_t>(bpp)) { in allocateHelper() 131 width, height, layerCount, format, usage); in allocateHelper() 143 status_t error = mAllocator->allocate(requestorName, width, height, format, layerCount, usage, in allocateHelper() 148 width, height, layerCount, format, usage, error); in allocateHelper() 160 std::numeric_limits<size_t>::max() / height / (*stride) < static_cast<size_t>(bpp)) { in allocateHelper() 161 bufSize = static_cast<size_t>(width) * height * bpp; in allocateHelper() [all …]
|
/frameworks/av/media/ndk/ |
D | NdkImage.cpp | 35 int64_t timestamp, int32_t width, int32_t height, int32_t numPlanes) : in AImage() argument 37 mTimestamp(timestamp), mWidth(width), mHeight(height), mNumPlanes(numPlanes) { in AImage() 107 AImage::getHeight(int32_t* height) const { in getHeight() 108 if (height == nullptr) { in getHeight() 111 *height = -1; in getHeight() 116 *height = mHeight; in getHeight() 465 dataSize = mLockedBuffer->stride * (mLockedBuffer->height - 1) + in getPlaneData() 470 (mLockedBuffer->height / 2 - 1) + in getPlaneData() 478 (mLockedBuffer->stride * mLockedBuffer->height); in getPlaneData() 481 ySize = mLockedBuffer->width * (mLockedBuffer->height - 1) + in getPlaneData() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/surfaceeffects/ripple/ |
D | RippleShaderTest.kt | 49 assertThat(maxSize.height).isEqualTo(expectedMaxHeight) in setMaxSize_hasCorrectSizes() 54 val expectedSize0 = RippleShader.SizeAtProgress(t = 0f, width = 100f, height = 100f) in setSizeAtProgresses_hasCorrectSizes() 55 val expectedSize1 = RippleShader.SizeAtProgress(t = 0.2f, width = 1500f, height = 1200f) in setSizeAtProgresses_hasCorrectSizes() 56 val expectedSize2 = RippleShader.SizeAtProgress(t = 0.4f, width = 200f, height = 70f) in setSizeAtProgresses_hasCorrectSizes() 68 val expectedSize0 = RippleShader.SizeAtProgress(t = 0f, width = 100f, height = 100f) in setSizeAtProgresses_sizeListIsSortedByT() 69 val expectedSize1 = RippleShader.SizeAtProgress(t = 0.2f, width = 1500f, height = 1200f) in setSizeAtProgresses_sizeListIsSortedByT() 70 val expectedSize2 = RippleShader.SizeAtProgress(t = 0.4f, width = 200f, height = 70f) in setSizeAtProgresses_sizeListIsSortedByT() 71 val expectedSize3 = RippleShader.SizeAtProgress(t = 0.8f, width = 300f, height = 900f) in setSizeAtProgresses_sizeListIsSortedByT() 72 val expectedSize4 = RippleShader.SizeAtProgress(t = 1f, width = 500f, height = 300f) in setSizeAtProgresses_sizeListIsSortedByT() 93 val expectedSize0 = RippleShader.SizeAtProgress(t = 0f, width = 100f, height = 100f) in update_getsCorrectNextTargetSize() [all …]
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | TaskResizingAlgorithm.java | 90 int height = bottom - top; in resizeDrag() local 97 height = Math.max(minVisibleHeight, Math.min(height - deltaY, maxVisibleSize.y)); in resizeDrag() 99 height = Math.max(minVisibleHeight, Math.min(height + deltaY, maxVisibleSize.y)); in resizeDrag() 103 final float aspect = (float) width / (float) height; in resizeDrag() 115 height1 = Math.min(height, Math.round((float) width1 / MIN_ASPECT)); in resizeDrag() 123 height2 = Math.max(minVisibleHeight, Math.min(maxVisibleSize.y, height)); in resizeDrag() 134 height1 = Math.max(height, Math.round((float) width1 * MIN_ASPECT)); in resizeDrag() 142 height2 = Math.max(minVisibleHeight, Math.min(maxVisibleSize.y, height)); in resizeDrag() 154 final boolean grows = width > (right - left) || height > (bottom - top); in resizeDrag() 157 height = height1; in resizeDrag() [all …]
|