/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/src/androidx/media/filterfw/samples/simplecamera/ |
D | FaceSquareFilterTest.java | 80 bitmap.getPixels(pixels, 0, bitmap.getWidth(), 0, 0, bitmap.getWidth(), in testFaceSquareFilter() 89 int left = (faceRect.left+WIDTH_OFFSET)*bitmap.getWidth()/FACE_X_RANGE; in testFaceSquareFilter() 90 int right = (faceRect.right+WIDTH_OFFSET)*bitmap.getWidth()/FACE_X_RANGE; in testFaceSquareFilter() 99 } else if (left > bitmap.getWidth()) { in testFaceSquareFilter() 100 left = bitmap.getWidth(); in testFaceSquareFilter() 107 if (right > bitmap.getWidth()) { in testFaceSquareFilter() 108 right = bitmap.getWidth(); in testFaceSquareFilter() 116 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + left) + in testFaceSquareFilter() 118 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + left) + in testFaceSquareFilter() 120 pixels[ImageConstants.PIX_CHANNELS * (bitmap.getWidth() * (top + j) + left) + in testFaceSquareFilter() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/ |
D | MagnifierView.java | 113 int radius = getWidth() / 2; in onLayout() 137 canvas.translate(-mDrawable.getBounds().width() * mLastCenter + getWidth() / 2, in onDraw() 143 Rect scrimRect = new Rect(0, 0, getWidth(), getHeight() / 2); in onDraw() 149 canvas.drawLine(0, getHeight() / 2, getWidth(), getHeight() / 2, mHandlePaint); in onDraw() 158 float translateXTarget = touchOnRight ? 0 : getParentWidth() - getWidth(); in onCropDragStarted() 161 setPivotX(getWidth() / 2); in onCropDragStarted() 166 setTranslationX((getParentWidth() - getWidth()) / 2); in onCropDragStarted() 178 float translateXTarget = touchOnRight ? 0 : getParentWidth() - getWidth(); in onCropDragMoved() 183 boolean viewOnLeft = getTranslationX() < (getParentWidth() - getWidth()) / 2; in onCropDragMoved() 196 animate().alpha(0).translationX((getParentWidth() - getWidth()) / 2).scaleX(0.2f) [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/ |
D | PipSizeSpecHandler.java | 167 int defaultWidth = Math.max((int) (maxSize.getWidth() * mDefaultSizePercent), in getDefaultSize() 168 minSize.getWidth()); in getDefaultSize() 190 int minWidth = (int) (maxSize.getWidth() * mMinimumSizePercent); in getMinSize() 215 float currAspectRatio = (float) size.getWidth() / size.getHeight(); in getSizeForAspectRatio() 219 float currentPercent = (float) size.getWidth() / currentMaxSize.getWidth(); in getSizeForAspectRatio() 224 int width = Math.round(updatedMaxSize.getWidth() * currentPercent); in getSizeForAspectRatio() 270 maxWidth = (int) Math.max(getDefaultSize(aspectRatio).getWidth(), in getMaxSize() 332 minWidth = (int) Math.min(getDefaultSize(aspectRatio).getWidth(), in getMinSize() 346 final int smallestSize = Math.min(size.getWidth(), size.getHeight()); in getSizeForAspectRatio() 400 : new Point(dpToPx(screenEdgeInsetsDp.getWidth(), res.getDisplayMetrics()), in reloadResources() [all …]
|
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/ |
D | SurfaceViewRequestReceiver.java | 67 viewSize = new Size(surfaceControl.getWidth(), surfaceControl.getHeight()); in onReceive() 81 viewSize.getWidth(), in onReceive() 88 final float scale = Math.min(surfaceControl.getWidth() / (float) viewSize.getWidth(), in onReceive() 94 view.setTranslationX((surfaceControl.getWidth() - scale * viewSize.getWidth()) / 2); in onReceive()
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
D | RenderDrawable.java | 156 Bitmap bitmap = Bitmap.createBitmap(image.getWidth(), image.getHeight(), in renderImage() 158 bitmap.setPixels(image.getRGB(0, 0, image.getWidth(), image.getHeight(), in renderImage() 159 null, 0, image.getWidth()), 0, image.getWidth(), 0, 0, image in renderImage() 160 .getWidth(), image.getHeight()); in renderImage() 168 int[] pixels = new int[image.getWidth() * image.getHeight()]; in renderImage() 169 bitmap.getPixels(pixels, 0, image.getWidth(), 0, 0, image.getWidth(), in renderImage() 171 image.setRGB(0, 0, image.getWidth(), image.getHeight(), pixels, 0, image.getWidth()); in renderImage()
|
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/ |
D | ImageUtils.java | 81 BufferedImage temp = new BufferedImage(goldenImage.getWidth(), goldenImage.getHeight(), in assertImageSimilar() 88 int imageWidth = Math.min(goldenImage.getWidth(), image.getWidth()); in assertImageSimilar() 147 } else if (Math.abs(goldenImage.getWidth() - image.getWidth()) >= 2) { in assertImageSimilar() 149 goldenImage.getWidth() + "x" + goldenImage.getHeight() + in assertImageSimilar() 150 "vs" + image.getWidth() + "x" + image.getHeight(); in assertImageSimilar() 153 goldenImage.getWidth() + "x" + goldenImage.getHeight() + in assertImageSimilar() 154 "vs" + image.getWidth() + "x" + image.getHeight(); in assertImageSimilar()
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
D | FrameImage2D.java | 137 if (bitmap.getWidth() != dimensions[0] || bitmap.getHeight() != dimensions[1]) { in validateBitmapSize() 138 throw new IllegalArgumentException("Cannot assign bitmap of size " + bitmap.getWidth() in validateBitmapSize() 160 Rect srcIRect = new Rect((int) srcRect.left * srcImage.getWidth(), in cpuImageCopy() 162 (int) srcRect.right * srcImage.getWidth(), in cpuImageCopy() 164 Rect dstIRect = new Rect((int) dstRect.left * srcImage.getWidth(), in cpuImageCopy() 166 (int) dstRect.right * srcImage.getWidth(), in cpuImageCopy() 171 Bitmap dstBitmap = Bitmap.createBitmap(dstImage.getWidth(), dstImage.getHeight(), config); in cpuImageCopy()
|
/frameworks/base/core/java/com/android/internal/widget/floatingtoolbar/ |
D | LocalFloatingToolbarPopup.java | 432 mPopupWindow.getWidth(), mPopupWindow.getHeight()); in updateCoordinates() 441 contentRectOnScreen.centerX() - mPopupWindow.getWidth() / 2, in refreshCoordinatesAndOverflowDirection() 442 mViewPortOnScreen.right - mPopupWindow.getWidth()); in refreshCoordinatesAndOverflowDirection() 573 final int targetWidth = mOverflowPanelSize.getWidth(); in openOverflow() 575 final int startWidth = mContentContainer.getWidth(); in openOverflow() 579 final float right = left + mContentContainer.getWidth(); in openOverflow() 592 mContentContainer.setX(right - mContentContainer.getWidth()); in openOverflow() 596 mMainPanel.setX(mContentContainer.getWidth() - startWidth); in openOverflow() 597 mOverflowPanel.setX(mContentContainer.getWidth() - targetWidth); in openOverflow() 615 isInRTLMode() ? overflowButtonStartX + targetWidth - mOverflowButton.getWidth() in openOverflow() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/layout/table/ |
D | WeightTest.java | 61 assertEquals(mCell1.getWidth() + mCell2.getWidth() + mCell3.getWidth(), mRow.getWidth()); in testAllCellsFillParent()
|
D | FixedWidthTest.java | 59 assertEquals(150, mFixedWidth.getWidth()); in testFixedWidth() 60 assertEquals(mFixedWidth.getWidth(), mNonFixedWidth.getWidth()); in testFixedWidth()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/widget/ |
D | LocalImageResolverTest.java | 101 assertThat(bd.getBitmap().getWidth()).isLessThan( in resolveImage_largeBitmapIcon_defaultSize_resizeToDefaultSize() 117 assertThat(bd.getBitmap().getWidth()).isLessThan( in resolveImage_largeAdaptiveBitmapIcon_defaultSize_resizeToDefaultSize() 132 assertThat(bd.getBitmap().getWidth()).isLessThan( in resolveImage_largeResourceIcon_defaultSize_resizeToDefaultSize() 145 assertThat(bd.getBitmap().getWidth()).isLessThan(101); in resolveImage_largeResourceIcon_passedSize_resizeToDefinedSize() 157 assertThat(bd.getBitmap().getWidth()).isGreaterThan(101); in resolveImage_largeResourceIcon_negativeWidth_dontResize() 169 assertThat(bd.getBitmap().getWidth()).isGreaterThan(101); in resolveImage_largeResourceIcon_negativeHeight_dontResize() 182 assertThat(bd.getBitmap().getWidth()).isGreaterThan(101); in resolveImage_largeBitmapIcon_passedNegativeWidth_dontResize() 195 assertThat(bd.getBitmap().getWidth()).isGreaterThan(101); in resolveImage_largeBitmapIcon_passedNegativeHeight_dontResize() 206 assertThat(bd.getBitmap().getWidth()).isEqualTo(32); in resolveImage_smallBitmapIcon_passedSmallerSize_dontResize() 218 assertThat(bd.getBitmap().getWidth()).isLessThan(101); in resolveImage_largeBitmapIcon_passedSize_resizeToDefinedSize() [all …]
|
/frameworks/native/services/surfaceflinger/CompositionEngine/src/planner/ |
D | TexturePool.cpp | 64 if (static_cast<int32_t>(texture->getBuffer()->getWidth()) != mSize.getWidth() || in returnTexture() 68 texture->getBuffer()->getWidth(), texture->getBuffer()->getHeight(), mSize.getWidth(), in returnTexture() 88 make(static_cast<uint32_t>(mSize.getWidth()), in genTexture()
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | Transform3dActivity.java | 57 final float centerX = getWidth() / 2.0f - mBitmap1.getWidth() / 2.0f; in onDraw() 67 drawBitmap(canvas, centerX, centerY, -mBitmap1.getWidth(), matrix); in onDraw() 70 drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth(), matrix); in onDraw() 73 drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth() * 2.0f, matrix); in onDraw()
|
/frameworks/rs/tests/java_api/CannyLive/src/com/android/example/cannylive/ |
D | CameraOps.java | 143 int leftArea = lhs.getHeight() * lhs.getWidth(); in resume() 144 int rightArea = lhs.getHeight() * lhs.getWidth(); in resume() 152 Log.v(TAG,"max big "+max.getWidth()+" x "+max.getHeight()); in resume() 160 Log.v(TAG,"BIG wil be "+big.getWidth()+" x "+big.getHeight()); in resume() 161 mImageReader = ImageReader.newInstance(big.getWidth(), big.getHeight(), in resume() 233 Log.v(TAG, "S>> size=" + mImage.getWidth() + in run() 237 Log.v(TAG, "S>> bytes out " + bytes.length / mImage.getWidth()); in run() 323 if (candidateSize.getWidth() <= MAX_WIDTH) { in getBestSize() 332 double aspectDelta = Math.abs(maxSize.getWidth() / maxSize.getHeight() - TARGET_ASPECT); in getBestSize() 334 if (maxSize.getWidth() < candidateSize.getWidth()) { in getBestSize() [all …]
|
/frameworks/base/core/java/android/service/selectiontoolbar/ |
D | RemoteSelectionToolbar.java | 260 contentLeft + mContentContainer.getWidth(), in updateFloatingToolbarRootContentRect() 485 final int targetWidth = mOverflowPanelSize.getWidth(); in openOverflow() 487 final int startWidth = mContentContainer.getWidth(); in openOverflow() 491 final float right = left + mContentContainer.getWidth(); in openOverflow() 504 mContentContainer.setX(right - mContentContainer.getWidth()); in openOverflow() 508 mMainPanel.setX(mContentContainer.getWidth() - startWidth); in openOverflow() 509 mOverflowPanel.setX(mContentContainer.getWidth() - targetWidth); in openOverflow() 527 isInRTLMode() ? overflowButtonStartX + targetWidth - mOverflowButton.getWidth() in openOverflow() 528 : overflowButtonStartX - targetWidth + mOverflowButton.getWidth(); in openOverflow() 535 isInRTLMode() ? 0 : mContentContainer.getWidth() - startWidth; in openOverflow() [all …]
|
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/startingsurface/ |
D | TaskSnapshotWindowTest.java | 116 when(mockCanvas.getWidth()).thenReturn(200); in fillEmptyBackground_fillHorizontally() 126 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_fillVertically() 136 when(mockCanvas.getWidth()).thenReturn(200); in fillEmptyBackground_fillBoth() 147 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_dontFill_sameSize() 157 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_dontFill_bitmapLarger() 226 when(mockCanvas.getWidth()).thenReturn(100); in testDrawStatusBarBackground() 238 when(mockCanvas.getWidth()).thenReturn(100); in testDrawStatusBarBackground_nullFrame() 250 when(mockCanvas.getWidth()).thenReturn(100); in testDrawStatusBarBackground_nope() 263 when(mockCanvas.getWidth()).thenReturn(100); in testDrawNavigationBarBackground() 276 when(mockCanvas.getWidth()).thenReturn(100); in testDrawNavigationBarBackground_left() [all …]
|
/frameworks/base/media/java/android/media/ |
D | ImageUtils.java | 152 Size srcSize = new Size(src.getWidth(), src.getHeight()); in imageCopy() 153 Size dstSize = new Size(dst.getWidth(), dst.getHeight()); in imageCopy() 191 int srcByteCount = effectivePlaneSize.getWidth() * srcPlanes[i].getPixelStride(); in imageCopy() 283 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage() 285 return new Size(image.getWidth() / 2, image.getHeight() / 2); in getEffectivePlaneSizeForImage() 289 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage() 291 return new Size(image.getWidth(), image.getHeight() / 2); in getEffectivePlaneSizeForImage() 307 return new Size(image.getWidth(), image.getHeight()); in getEffectivePlaneSizeForImage()
|
D | ThumbnailUtils.java | 103 final int widthSample = info.getSize().getWidth() / size.getWidth(); in onHeaderDecoded() 280 new MediaMetadataRetriever.BitmapParams(), size.getWidth(), in createImageThumbnail() 281 size.getWidth() * size.getHeight()); in createImageThumbnail() 309 final int width = bitmap.getWidth(); in createImageThumbnail() 382 if (size.getWidth() > width && size.getHeight() > height) { in createVideoThumbnail() 388 size.getWidth(), size.getHeight(), params)); in createVideoThumbnail() 422 if (source.getWidth() < source.getHeight()) { in extractThumbnail() 423 scale = width / (float) source.getWidth(); in extractThumbnail() 478 int deltaX = source.getWidth() - targetWidth; in transform() 496 deltaXHalf + Math.min(targetWidth, source.getWidth()), in transform() [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | ZeroSizedTest.java | 62 assertTrue(mWithDimension.getWidth() > 0); in testDrawingCacheWithDimension() 69 assertTrue(mWithNoWdith.getWidth() == 0); in testDrawingCacheWithNoWidth() 76 assertTrue(mWithNoHeight.getWidth() > 0); in testDrawingCacheWithNoHeight() 83 assertTrue(mWithNoDimension.getWidth() == 0); in testDrawingCacheWithNoDimension()
|
/frameworks/base/core/tests/coretests/src/android/graphics/drawable/ |
D | IconTest.java | 119 assertThat(bm.getWidth()).isEqualTo(4321); in testScaleDownIfNecessary() 122 assertThat(ic.getBitmap().getWidth()).isLessThan(41); in testScaleDownIfNecessary() 169 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testWithBitmapResource() 226 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testWithStatSysAdbResource() 251 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testWithFile() 284 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testAsync() 311 originalbits.getWidth() * originalbits.getHeight() * 2); // guess 50% compression in testParcel() 357 draw1.setBounds(0, 0, test1.getWidth(), test1.getHeight()); in testParcel() 396 final int w = a.getWidth(); in printBits() 406 if (a.getWidth() != b.getWidth() || a.getHeight() != b.getHeight()) return false; in equalBitmaps() [all …]
|
/frameworks/base/core/java/android/view/ |
D | ViewOutlineProvider.java | 40 outline.setRect(0, 0, view.getWidth(), view.getHeight()); 55 outline.setRect(0, 0, view.getWidth(), view.getHeight()); 70 view.getWidth() - view.getPaddingRight(),
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/ |
D | PipBoundsAlgorithm.java | 235 final int left = (int) (stackBounds.centerX() - size.getWidth() / 2f); in transformBoundsToAspectRatio() 237 stackBounds.set(left, top, left + size.getWidth(), top + size.getHeight()); in transformBoundsToAspectRatio() 249 defaultBounds.set(0, 0, size.getWidth(), size.getHeight()); in getDefaultBounds() 266 defaultBounds.set(0, 0, defaultSize.getWidth(), defaultSize.getHeight()); in getDefaultBounds() 270 Gravity.apply(mDefaultStackGravity, defaultSize.getWidth(), defaultSize.getHeight(), in getDefaultBounds() 363 if (normalBounds.width() >= minMenuSize.getWidth() in adjustNormalBoundsToFitMenu() 369 final boolean needsWidthAdj = minMenuSize.getWidth() > normalBounds.width(); in adjustNormalBoundsToFitMenu() 378 ((float) (minMenuSize.getWidth())) / ((float) (normalBounds.width())); in adjustNormalBoundsToFitMenu() 382 adjWidth = minMenuSize.getWidth(); in adjustNormalBoundsToFitMenu() 390 adjWidth = minMenuSize.getWidth(); in adjustNormalBoundsToFitMenu()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/ |
D | Camera2RecordingTest.java | 400 (videoSz.getWidth() > maxPreviewSize.getWidth() || in basicRecordingTestByCamera() 557 (videoSz.getWidth() > maxPreviewSize.getWidth() || in videoSnapshotTestByCamera() 585 if (candidateSize.getWidth() <= videoSz.getWidth() && in videoSnapshotTestByCamera() 593 if (candidateSize.getWidth() <= videoSz.getWidth() && in videoSnapshotTestByCamera() 610 videoSz.getWidth() <= maxPreviewSize.getWidth() && in videoSnapshotTestByCamera() 630 if (videoSnapshotSz.getWidth() * videoSnapshotSz.getHeight() > FRAME_SIZE_15M) in videoSnapshotTestByCamera() 781 if (videoSize.getWidth() > maxPreviewSize.getWidth() || in updatePreviewSurfaceWithVideo() 792 s.getWidth() <= videoSize.getWidth() && in updatePreviewSurfaceWithVideo() 847 mMediaRecorder.setVideoSize(sz.getWidth(), sz.getHeight()); in prepareRecording() 996 CameraTestUtils.validateImage(image, size.getWidth(), size.getHeight(), [all …]
|
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/ |
D | VrView.java | 198 double dist_x = (mDownPointX - x) * mDownScreenWidth / getWidth(); in panMove() 199 double dist_y = (y - mDownPointY) * mDownScreenWidth / getWidth(); in panMove() 259 deltax = (float) ((mDownPointX - e.getX()) / getWidth()); in actionMove() 260 deltay = (float) -((mDownPointY - e.getY()) / getWidth()); in actionMove() 264 deltax = (float) ((mDownPointX - e.getX()) / getWidth()); in actionMove() 265 deltay = (float) -((mDownPointY - e.getY()) / getWidth()); in actionMove() 269 deltax = (float) ((mDownPointX - e.getX()) / getWidth()); in actionMove() 270 deltay = (float) -((mDownPointY - e.getY()) / getWidth()); in actionMove() 298 mState1.mTransform.look(looks[last_look], mState1.mCubeScreen, getWidth(), getHeight()); in resetCut() 311 mState1.mTransform.look(ViewMatrix.DOWN_AT, mState1.mCubeScreen, getWidth(), getHeight()); in setVolume() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | ImageUtils.java | 71 int width = bitmap.getWidth(); in isGrayscale() 192 || currentSize.getWidth() > requestedSize.getWidth()) { in calculateSampleSize() 194 final int halfWidth = currentSize.getWidth() / 2; in calculateSampleSize() 199 && (halfWidth / inSampleSize) >= requestedSize.getWidth()) { in calculateSampleSize() 219 new Point(size.getWidth(), size.getHeight())); in loadThumbnail()
|