Home
last modified time | relevance | path

Searched refs:targetWidth (Results 1 – 25 of 47) sorted by relevance

12

/aosp12/packages/apps/Camera2/src/com/android/camera/
H A DThumbnail.java25 public static Bitmap createVideoThumbnailBitmap(FileDescriptor fd, int targetWidth) { in createVideoThumbnailBitmap() argument
26 return createVideoThumbnailBitmap(null, fd, targetWidth); in createVideoThumbnailBitmap()
29 public static Bitmap createVideoThumbnailBitmap(String filePath, int targetWidth) { in createVideoThumbnailBitmap() argument
30 return createVideoThumbnailBitmap(filePath, null, targetWidth); in createVideoThumbnailBitmap()
34 int targetWidth) { in createVideoThumbnailBitmap() argument
60 if (width > targetWidth) { in createVideoThumbnailBitmap()
61 float scale = (float) targetWidth / width; in createVideoThumbnailBitmap()
/aosp12/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/
H A DBitmapCachingAsset.java94 public void decodeBitmap(int targetWidth, int targetHeight, BitmapReceiver receiver) { in decodeBitmap() argument
97 mOriginalAsset.decodeBitmap(targetWidth, targetHeight, receiver::onBitmapDecoded); in decodeBitmap()
100 CacheKey key = new CacheKey(mOriginalAsset, targetWidth, targetHeight); in decodeBitmap()
105 mOriginalAsset.decodeBitmap(targetWidth, targetHeight, bitmap -> { in decodeBitmap()
115 public void decodeBitmapRegion(Rect rect, int targetWidth, int targetHeight, in decodeBitmapRegion() argument
119 mOriginalAsset.decodeBitmapRegion(rect, targetWidth, targetHeight, shouldAdjustForRtl, in decodeBitmapRegion()
123 CacheKey key = new CacheKey(mOriginalAsset, targetWidth, targetHeight, shouldAdjustForRtl, in decodeBitmapRegion()
129 mOriginalAsset.decodeBitmapRegion(rect, targetWidth, targetHeight, shouldAdjustForRtl, in decodeBitmapRegion()
H A DStreamableAsset.java76 public void decodeBitmap(int targetWidth, int targetHeight, in decodeBitmap() argument
78 DecodeBitmapAsyncTask task = new DecodeBitmapAsyncTask(targetWidth, targetHeight, receiver); in decodeBitmap()
89 public void decodeBitmapRegion(Rect rect, int targetWidth, int targetHeight, in decodeBitmapRegion() argument
91 runDecodeBitmapRegionTask(rect, targetWidth, targetHeight, shouldAdjustForRtl, receiver); in decodeBitmapRegion()
144 public AsyncTask runDecodeBitmapRegionTask(Rect rect, int targetWidth, int targetHeight, in runDecodeBitmapRegionTask() argument
147 new DecodeBitmapRegionAsyncTask(rect, targetWidth, targetHeight, isRtl, receiver); in runDecodeBitmapRegionTask()
247 public DecodeBitmapAsyncTask(int targetWidth, int targetHeight, BitmapReceiver receiver) { in DecodeBitmapAsyncTask() argument
249 mTargetWidth = targetWidth; in DecodeBitmapAsyncTask()
309 public DecodeBitmapRegionAsyncTask(Rect rect, int targetWidth, int targetHeight, in DecodeBitmapRegionAsyncTask() argument
313 mTargetWidth = targetWidth; in DecodeBitmapRegionAsyncTask()
H A DCurrentWallpaperAssetV16.java43 public void decodeBitmapRegion(Rect rect, int targetWidth, int targetHeight, in decodeBitmapRegion() argument
49 public void decodeBitmap(int targetWidth, int targetHeight, in decodeBitmap() argument
51 DecodeBitmapAsyncTask task = new DecodeBitmapAsyncTask(receiver, targetWidth, targetHeight); in decodeBitmap()
H A DBitmapUtils.java45 int srcWidth, int srcHeight, int targetWidth, int targetHeight) { in calculateInSampleSize() argument
52 while (((halfHeight >> shift) >= targetHeight) && ((halfWidth >> shift) >= targetWidth)) { in calculateInSampleSize()
H A DBuiltInWallpaperAsset.java69 public void decodeBitmapRegion(Rect rect, int targetWidth, int targetHeight, in decodeBitmapRegion() argument
82 public void decodeBitmap(int targetWidth, int targetHeight, in decodeBitmap() argument
84 DecodeBitmapAsyncTask task = new DecodeBitmapAsyncTask(targetWidth, targetHeight, receiver); in decodeBitmap()
/aosp12/packages/apps/Camera2/src/com/android/camera/data/
H A DFilmstripItemUtils.java105 int targetWidth = imageWidth; in loadImageThumbnailFromStream() local
108 while (targetHeight > heightBound || targetWidth > widthBound || in loadImageThumbnailFromStream()
109 targetHeight > GL11.GL_MAX_TEXTURE_SIZE || targetWidth > GL11.GL_MAX_TEXTURE_SIZE || in loadImageThumbnailFromStream()
110 targetHeight * targetWidth > maximumPixels) { in loadImageThumbnailFromStream()
112 targetWidth = imageWidth / sampleSize; in loadImageThumbnailFromStream()
123 targetWidth * targetHeight < maximumPixels / 4 && sampleSize > 1) { in loadImageThumbnailFromStream()
/aosp12/packages/apps/Dialer/java/com/android/dialer/contactphoto/
H A DBitmapUtil.java101 public static Bitmap getRoundedBitmap(Bitmap input, int targetWidth, int targetHeight) { in getRoundedBitmap() argument
108 targetWidth, targetHeight, inputConfig != null ? inputConfig : Bitmap.Config.ARGB_8888); in getRoundedBitmap()
113 final RectF dst = new RectF(0, 0, targetWidth, targetHeight); in getRoundedBitmap()
126 Math.min((float) inputWidth / targetWidth, (float) inputHeight / targetHeight); in getRoundedBitmap()
128 final int xCropAmountHalved = (int) (scaleBy * targetWidth / 2); in getRoundedBitmap()
/aosp12/packages/apps/Gallery/src/com/android/camera/
H A DUtil.java152 int targetWidth, in transform() argument
156 int deltaX = source.getWidth() - targetWidth; in transform()
165 Bitmap b2 = Bitmap.createBitmap(targetWidth, targetHeight, in transform()
174 deltaXHalf + Math.min(targetWidth, source.getWidth()), in transform()
176 int dstX = (targetWidth - src.width()) / 2; in transform()
181 targetWidth - dstX, in transform()
193 float viewAspect = (float) targetWidth / targetHeight; in transform()
203 float scale = targetWidth / bitmapWidthF; in transform()
224 int dx1 = Math.max(0, b1.getWidth() - targetWidth); in transform()
231 targetWidth, in transform()
/aosp12/packages/apps/Contacts/src/com/android/contacts/util/
H A DBitmapUtil.java126 public static Bitmap getRoundedBitmap(Bitmap input, int targetWidth, int targetHeight) { in getRoundedBitmap() argument
131 final Bitmap result = Bitmap.createBitmap(targetWidth, targetHeight, in getRoundedBitmap()
137 final RectF dst = new RectF(0, 0, targetWidth, targetHeight); in getRoundedBitmap()
149 final float scaleBy = Math.min((float) inputWidth / targetWidth, in getRoundedBitmap()
152 final int xCropAmountHalved = (int) (scaleBy * targetWidth / 2); in getRoundedBitmap()
/aosp12/frameworks/base/media/java/android/media/
H A DThumbnailUtils.java472 int targetWidth, in transform() argument
478 int deltaX = source.getWidth() - targetWidth; in transform()
487 Bitmap b2 = Bitmap.createBitmap(targetWidth, targetHeight, in transform()
496 deltaXHalf + Math.min(targetWidth, source.getWidth()), in transform()
498 int dstX = (targetWidth - src.width()) / 2; in transform()
503 targetWidth - dstX, in transform()
516 float viewAspect = (float) targetWidth / targetHeight; in transform()
526 float scale = targetWidth / bitmapWidthF; in transform()
547 int dx1 = Math.max(0, b1.getWidth() - targetWidth); in transform()
554 targetWidth, in transform()
/aosp12/packages/apps/LegacyCamera/src/com/android/camera/
H A DThumbnail.java256 public static Bitmap createVideoThumbnail(FileDescriptor fd, int targetWidth) { in createVideoThumbnail() argument
257 return createVideoThumbnail(null, fd, targetWidth); in createVideoThumbnail()
260 public static Bitmap createVideoThumbnail(String filePath, int targetWidth) { in createVideoThumbnail() argument
261 return createVideoThumbnail(filePath, null, targetWidth); in createVideoThumbnail()
264 … private static Bitmap createVideoThumbnail(String filePath, FileDescriptor fd, int targetWidth) { in createVideoThumbnail() argument
290 if (width > targetWidth) { in createVideoThumbnail()
291 float scale = (float) targetWidth / width; in createVideoThumbnail()
/aosp12/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
H A DDecodedImageResource.java208 final int targetWidth = (int) (bitmapWidth * targetScale); in loadMediaBlocking() local
211 if (targetScale < 1.0f && targetWidth > 0 && targetHeight > 0 && in loadMediaBlocking()
212 targetWidth != bitmapWidth && targetHeight != bitmapHeight) { in loadMediaBlocking()
214 Bitmap.createScaledBitmap(bitmap, targetWidth, targetHeight, false); in loadMediaBlocking()
/aosp12/packages/services/BuiltInPrintService/src/com/android/bips/
H A DImageToPdfTask.java142 float targetWidth = (extent.width() / POINTS_PER_INCH * mDpi); in drawOptimized() local
144 float offsetX = ((targetWidth / scale) - mBitmap.getWidth()) / 2; in drawOptimized()
147 Bitmap targetBitmap = Bitmap.createBitmap((int) targetWidth, (int) targetHeight, in drawOptimized()
153 matrix.postRotate(90, targetWidth / 2, targetHeight / 2); in drawOptimized()
/aosp12/frameworks/base/core/java/com/android/internal/graphics/palette/
H A DColorCutQuantizer.java493 private static int modifyWordWidth(int value, int currentWidth, int targetWidth) { in modifyWordWidth() argument
495 if (targetWidth > currentWidth) { in modifyWordWidth()
497 newValue = value << (targetWidth - currentWidth); in modifyWordWidth()
500 newValue = value >> (currentWidth - targetWidth); in modifyWordWidth()
502 return newValue & ((1 << targetWidth) - 1); in modifyWordWidth()
/aosp12/packages/apps/WallpaperPicker2/tests/src/com/android/wallpaper/testing/
H A DTestAsset.java59 public void decodeBitmap(int targetWidth, int targetHeight, BitmapReceiver receiver) { in decodeBitmap() argument
64 public void decodeBitmapRegion(Rect unused, int targetWidth, int targetHeight, in decodeBitmapRegion() argument
/aosp12/packages/apps/TV/src/com/android/tv/dvr/ui/list/
H A DSchedulesHeaderRowPresenter.java231 final int targetWidth = focusedView.getWidth(); in updateSelector() local
243 lp.width = targetWidth; in updateSelector()
248 final float deltaWidth = lp.width - targetWidth; in updateSelector()
261 targetWidth in updateSelector()
H A DScheduleRowPresenter.java195 final int targetWidth; in updateSelector() local
200 targetWidth = mInfoContainerTargetWidthWithNoAction; in updateSelector()
202 targetWidth = mInfoContainerTargetWidthWithOneAction; in updateSelector()
204 targetWidth = mInfoContainerTargetWidthWithTwoAction; in updateSelector()
207 targetWidth = Math.max(mSecondActionContainer.getWidth(), 2 * mRoundRectRadius); in updateSelector()
209 targetWidth = in updateSelector()
257 lp.width = targetWidth; in updateSelector()
262 final float deltaWidth = lp.width - targetWidth; in updateSelector()
272 lp.width = targetWidth + Math.round(deltaWidth * fraction); in updateSelector()
/aosp12/packages/apps/ThemePicker/src/com/google/android/apps/wallpaper/asset/
H A DThemeBundleThumbAsset.java45 public void decodeBitmap(int targetWidth, int targetHeight, BitmapReceiver receiver) { in decodeBitmap() argument
52 public void decodeBitmapRegion(Rect rect, int targetWidth, int targetHeight, in decodeBitmapRegion() argument
/aosp12/frameworks/base/core/java/com/android/internal/widget/
H A DLocalImageResolver.java78 final int targetWidth = size.getWidth() * maxHeight / size.getHeight(); in resolveImage() local
79 decoder.setTargetSize(targetWidth, maxHeight); in resolveImage()
H A DSlidingTab.java353 final int targetWidth = targetDrawable.getIntrinsicWidth(); in layout() local
358 final int leftTarget = (int) (THRESHOLD * parentWidth) - targetWidth + handleWidth / 2; in layout()
373 target.layout(leftTarget, targetTop, leftTarget + targetWidth, targetBottom); in layout()
378 target.layout(rightTarget, targetTop, rightTarget + targetWidth, targetBottom); in layout()
384 final int targetLeft = (parentWidth - targetWidth) / 2; in layout()
385 final int targetRight = (parentWidth + targetWidth) / 2; in layout()
/aosp12/frameworks/base/libs/hwui/hwui/
H A DImageDecoder.cpp410 int targetWidth = mTargetSize.width(); in decode() local
413 outputMatrix.preConcat(SkEncodedOriginToMatrix(origin, targetWidth, targetHeight)); in decode()
415 std::swap(targetWidth, targetHeight); in decode()
419 float scaleX = (float) targetWidth / mDecodeSize.width(); in decode()
/aosp12/frameworks/base/core/java/com/android/internal/view/menu/
H A DActionMenuItemView.java290 final int targetWidth = widthMode == MeasureSpec.AT_MOST ? Math.min(widthSize, mMinWidth) in onMeasure() local
293 if (widthMode != MeasureSpec.EXACTLY && mMinWidth > 0 && oldMeasuredWidth < targetWidth) { in onMeasure()
295 super.onMeasure(MeasureSpec.makeMeasureSpec(targetWidth, MeasureSpec.EXACTLY), in onMeasure()
/aosp12/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/
H A DDividerHandleView.java117 private void animateToTarget(int targetWidth, int targetHeight, boolean touching) { in animateToTarget() argument
119 mCurrentWidth, targetWidth); in animateToTarget()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/
H A DUdfpsEnrollDrawable.java307 final float targetWidth = shouldShow ? mHintMaxWidthPx : 0f; in updateTipHintVisibility() local
308 mTipHintWidthAnimator = ValueAnimator.ofFloat(mTipHintPaint.getStrokeWidth(), targetWidth); in updateTipHintVisibility()
335 final float targetWidth = shouldShow ? mHintMaxWidthPx : 0f; in updateEdgeHintVisibility() local
337 ValueAnimator.ofFloat(mEdgeHintPaint.getStrokeWidth(), targetWidth); in updateEdgeHintVisibility()

12