Home
last modified time | relevance | path

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

12

/packages/apps/Camera2/src/com/android/camera/
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()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/
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, receiver); in decodeBitmapRegion()
143 public AsyncTask runDecodeBitmapRegionTask(Rect rect, int targetWidth, int targetHeight, in runDecodeBitmapRegionTask() argument
146 new DecodeBitmapRegionAsyncTask(rect, targetWidth, targetHeight, receiver); in runDecodeBitmapRegionTask()
246 public DecodeBitmapAsyncTask(int targetWidth, int targetHeight, BitmapReceiver receiver) { in DecodeBitmapAsyncTask() argument
248 mTargetWidth = targetWidth; in DecodeBitmapAsyncTask()
307 public DecodeBitmapRegionAsyncTask(Rect rect, int targetWidth, int targetHeight, in DecodeBitmapRegionAsyncTask() argument
311 mTargetWidth = targetWidth; in DecodeBitmapRegionAsyncTask()
DBitmapCachingAsset.java82 public void decodeBitmap(int targetWidth, int targetHeight, BitmapReceiver receiver) { in decodeBitmap() argument
85 mOriginalAsset.decodeBitmap(targetWidth, targetHeight, receiver::onBitmapDecoded); in decodeBitmap()
88 CacheKey key = new CacheKey(mOriginalAsset, targetWidth, targetHeight); in decodeBitmap()
93 mOriginalAsset.decodeBitmap(targetWidth, targetHeight, bitmap -> { in decodeBitmap()
103 public void decodeBitmapRegion(Rect rect, int targetWidth, int targetHeight, in decodeBitmapRegion() argument
105 mOriginalAsset.decodeBitmapRegion(rect, targetWidth, targetHeight, receiver); in decodeBitmapRegion()
DCurrentWallpaperAssetV16.java42 public void decodeBitmapRegion(Rect rect, int targetWidth, int targetHeight, in decodeBitmapRegion() argument
48 public void decodeBitmap(int targetWidth, int targetHeight, in decodeBitmap() argument
50 DecodeBitmapAsyncTask task = new DecodeBitmapAsyncTask(receiver, targetWidth, targetHeight); in decodeBitmap()
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()
DBitmapUtils.java45 int srcWidth, int srcHeight, int targetWidth, int targetHeight) { in calculateInSampleSize() argument
52 while (((halfHeight >> shift) >= targetHeight) && ((halfWidth >> shift) >= targetWidth)) { in calculateInSampleSize()
DLiveWallpaperThumbAsset.java49 public void decodeBitmap(int targetWidth, int targetHeight, in decodeBitmap() argument
57 public void decodeBitmapRegion(Rect rect, int targetWidth, int targetHeight, in decodeBitmapRegion() argument
/packages/apps/Gallery/src/com/android/camera/
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()
/packages/apps/Camera2/src/com/android/camera/data/
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()
/packages/apps/Dialer/java/com/android/dialer/contactphoto/
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()
/packages/apps/LegacyCamera/src/com/android/camera/
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()
/packages/apps/Contacts/src/com/android/contacts/util/
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()
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
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()
/packages/apps/TV/src/com/android/tv/dvr/ui/list/
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()
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()
/packages/services/BuiltInPrintService/src/com/android/bips/
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()
/packages/apps/ThemePicker/src/com/android/customization/picker/theme/
DThemeFragment.java550 int targetWidth = right - left; in onLayoutChange() local
552 if (targetWidth > 0 && targetHeight > 0) { in onLayoutChange()
557 targetWidth, targetHeight, in onLayoutChange()
620 int targetWidth = right - left; in onLayoutChange() local
622 if (targetWidth > 0 && targetHeight > 0) { in onLayoutChange()
629 wallpaperAsset.decodeBitmap(targetWidth, targetHeight, bitmap -> {}); in onLayoutChange()
DCustomThemeNameFragment.java166 int targetWidth = right - left; in onLayoutChange() local
168 if (targetWidth > 0 && targetHeight > 0) { in onLayoutChange()
171 targetWidth, targetHeight, in onLayoutChange()
/packages/apps/WallpaperPicker2/tests/src/com/android/wallpaper/testing/
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
/packages/apps/ThemePicker/src/com/google/android/apps/wallpaper/asset/
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
/packages/services/BuiltInPrintService/jni/plugins/
Dwprint_image.c309 float targetHeight, targetWidth; in wprint_image_set_output_properties() local
319 targetWidth = image_info->printable_width * 1.0f; in wprint_image_set_output_properties()
324 useHeight = (rw >= targetWidth); in wprint_image_set_output_properties()
326 useHeight = (rw < targetWidth); in wprint_image_set_output_properties()
334 image_info->scaled_height = (int) floorf(targetWidth * sourceHeight / sourceWidth); in wprint_image_set_output_properties()
335 image_info->scaled_width = (int) floorf(targetWidth); in wprint_image_set_output_properties()
/packages/apps/Settings/src/com/android/settings/widget/
DChartSweepView.java187 final float targetWidth = mSweep.getIntrinsicWidth() - mSweepPadding.left in getTargetInset() local
189 return mSweepPadding.left + (targetWidth / 2) + mSweepOffset.x; in getTargetInset()
664 final int targetWidth = mSweep.getIntrinsicWidth() - mSweepPadding.left
666 mMargins.left = -(mSweepPadding.left + (targetWidth / 2));
DChartView.java89 final int targetWidth = (int) (mOptimalWidth + (slack * mOptimalWidthWeight)); in onMeasure() local
90 widthMeasureSpec = MeasureSpec.makeMeasureSpec(targetWidth, MeasureSpec.EXACTLY); in onMeasure()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/widget/
DChartSweepView.java187 final float targetWidth = mSweep.getIntrinsicWidth() - mSweepPadding.left in getTargetInset() local
189 return mSweepPadding.left + (targetWidth / 2) + mSweepOffset.x; in getTargetInset()
664 final int targetWidth = mSweep.getIntrinsicWidth() - mSweepPadding.left
666 mMargins.left = -(mSweepPadding.left + (targetWidth / 2));
DChartView.java89 final int targetWidth = (int) (mOptimalWidth + (slack * mOptimalWidthWeight)); in onMeasure() local
90 widthMeasureSpec = MeasureSpec.makeMeasureSpec(targetWidth, MeasureSpec.EXACTLY); in onMeasure()

12