/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/ |
D | CachingPipeline.java | 177 public void setOriginal(Bitmap bitmap) { in setOriginal() argument 178 mOriginalBitmap = bitmap; in setOriginal() 179 Log.v(LOGTAG,"setOriginal, size " + bitmap.getWidth() + " x " + bitmap.getHeight()); in setOriginal() 222 Bitmap bitmap = MasterImage.getImage().getOriginalBitmapHighres(); in renderHighres() local 223 if (bitmap == null) { in renderHighres() 226 bitmap = mEnvironment.getBitmapCopy(bitmap, BitmapCache.HIGHRES); in renderHighres() 227 bitmap = preset.applyGeometry(bitmap, mEnvironment); in renderHighres() 230 Bitmap bmp = preset.apply(bitmap, mEnvironment); in renderHighres() 247 Bitmap bitmap = MasterImage.getImage().getOriginalBitmapHighres(); in renderGeometry() local 248 if (bitmap == null) { in renderGeometry() [all …]
|
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/ |
D | BitmapDownloader.java | 64 public BitmapItem(Bitmap bitmap, boolean scaled) { in BitmapItem() argument 65 mBitmap = bitmap; in BitmapItem() 87 public abstract void onBitmapRetrieved(Bitmap bitmap); in onBitmapRetrieved() argument 114 protected int sizeOf(String key, BitmapItem bitmap) { in BitmapDownloader() 115 return bitmap.mBitmap.getByteCount(); in BitmapDownloader() 127 Bitmap bitmap = null; in loadBitmapBlocking() local 131 bitmap = getBitmapFromMemCache(options); in loadBitmapBlocking() 134 if (bitmap == null) { in loadBitmapBlocking() 138 final Bitmap bitmap = super.doInBackground(params); in loadBitmapBlocking() 139 if (bitmap != null && !hasAccountImageUri) { in loadBitmapBlocking() [all …]
|
D | DrawableDownloader.java | 141 public abstract void onBitmapRetrieved(Drawable bitmap); in onBitmapRetrieved() argument 188 protected int sizeOf(String key, BitmapItem bitmap) { in DrawableDownloader() 189 return bitmap.mByteCount; in DrawableDownloader() 220 Drawable bitmap = null; in loadBitmapBlocking() local 224 bitmap = getBitmapFromMemCache(options); in loadBitmapBlocking() 227 if (bitmap == null) { in loadBitmapBlocking() 231 final Drawable bitmap = super.doInBackground(params); in loadBitmapBlocking() 232 if (bitmap != null && !hasAccountImageUri) { in loadBitmapBlocking() 233 addBitmapToMemoryCache(params[0], bitmap, this); in loadBitmapBlocking() 235 return bitmap; in loadBitmapBlocking() [all …]
|
D | RecycleBitmapPool.java | 61 public static int getSize(Bitmap bitmap) { in getSize() argument 64 return (Integer) sGetAllocationByteCount.invoke(bitmap); in getSize() 74 return bitmap.getByteCount(); in getSize() 84 public void addRecycledBitmap(Bitmap bitmap) { in addRecycledBitmap() argument 85 if (bitmap.isRecycled()) { in addRecycledBitmap() 88 Bitmap.Config config = bitmap.getConfig(); in addRecycledBitmap() 92 int key = getSize(bitmap); in addRecycledBitmap() 102 list.add(new SoftReference<Bitmap>(bitmap)); in addRecycledBitmap() 104 Log.d(TAG, list.size() + " add bitmap " + bitmap.getWidth() + " " in addRecycledBitmap() 105 + bitmap.getHeight()); in addRecycledBitmap() [all …]
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | BitmapUtils.java | 116 Bitmap bitmap, float scale, boolean recycle) { in resizeBitmapByScale() argument 117 int width = Math.round(bitmap.getWidth() * scale); in resizeBitmapByScale() 118 int height = Math.round(bitmap.getHeight() * scale); in resizeBitmapByScale() 119 if (width == bitmap.getWidth() in resizeBitmapByScale() 120 && height == bitmap.getHeight()) return bitmap; in resizeBitmapByScale() 121 Bitmap target = Bitmap.createBitmap(width, height, getConfig(bitmap)); in resizeBitmapByScale() 125 canvas.drawBitmap(bitmap, 0, 0, paint); in resizeBitmapByScale() 126 if (recycle) bitmap.recycle(); in resizeBitmapByScale() 130 private static Bitmap.Config getConfig(Bitmap bitmap) { in getConfig() argument 131 Bitmap.Config config = bitmap.getConfig(); in getConfig() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/cache/ |
D | BitmapCache.java | 55 Bitmap bitmap; field in BitmapCache.BitmapTracking 61 private void track(Bitmap bitmap, int type) { in track() argument 64 if (tracking.bitmap == bitmap) { in track() 69 tracking.bitmap = bitmap; in track() 75 private void untrack(Bitmap bitmap) { in untrack() argument 78 if (tracking.bitmap == bitmap) { in untrack() 125 Bitmap bitmap = buffer.getBitmap(); in cache() local 126 cache(bitmap); in cache() 129 public synchronized boolean cache(Bitmap bitmap) { in cache() argument 130 if (bitmap == null) { in cache() [all …]
|
/packages/apps/LegacyCamera/src/com/android/camera/ |
D | Thumbnail.java | 59 public Thumbnail(Uri uri, Bitmap bitmap, int orientation) { in Thumbnail() argument 61 mBitmap = rotateImage(bitmap, orientation); in Thumbnail() 81 private static Bitmap rotateImage(Bitmap bitmap, int orientation) { in rotateImage() argument 85 m.setRotate(orientation, bitmap.getWidth() * 0.5f, in rotateImage() 86 bitmap.getHeight() * 0.5f); in rotateImage() 89 Bitmap rotated = Bitmap.createBitmap(bitmap, 0, 0, in rotateImage() 90 bitmap.getWidth(), bitmap.getHeight(), m, true); in rotateImage() 93 if (rotated != bitmap) bitmap.recycle(); in rotateImage() 99 return bitmap; in rotateImage() 129 Bitmap bitmap = null; in loadFrom() local [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/ |
D | LogoUtilsTest.java | 37 Bitmap bitmap = createSampleBitmap(20, 30); in testPartiallyResizedBitmap() local 38 File tempFile = writeBitmapToTempFile(bitmap); in testPartiallyResizedBitmap() 51 Bitmap bitmap = createSampleBitmap(8, 32); in testPartiallyResizedElongatedBitmap() local 52 File tempFile = writeBitmapToTempFile(bitmap); in testPartiallyResizedElongatedBitmap() 65 Bitmap bitmap = createSampleBitmap(16, 32); in testResizeBitmapKeepRatio() local 66 Bitmap newBitmap = LogoUtils.resizeBitmap(bitmap, 8, 8); in testResizeBitmapKeepRatio() 74 Bitmap bitmap = createSampleBitmap(16, 32); in testResizeBitmapNoScalingNeeded() local 75 Bitmap newBitmap = LogoUtils.resizeBitmap(bitmap, 20, 40); in testResizeBitmapNoScalingNeeded() 84 Bitmap bitmap = createSampleBitmap(15, 15); in testResizeBitmapNoIntegerRatio() local 85 Bitmap newBitmap = LogoUtils.resizeBitmap(bitmap, 10, 10); in testResizeBitmapNoIntegerRatio() [all …]
|
D | UriBitmap.java | 34 private UriBitmap(Bitmap bitmap, Uri uri, File tempFile) { in UriBitmap() argument 35 mBitmap = bitmap; in UriBitmap() 52 Bitmap bitmap = generateSampleBitmap(); in createSimpleInstance() local 54 Uri uri = bitmapToUri(bitmap, tempFile); in createSimpleInstance() 55 return new UriBitmap(bitmap, uri, tempFile); in createSimpleInstance() 59 Bitmap bitmap = Bitmap.createBitmap(15, 15, Bitmap.Config.ARGB_8888); in generateSampleBitmap() local 60 for (int x = 0; x < bitmap.getWidth(); x++) { in generateSampleBitmap() 61 for (int y = 0; y < bitmap.getHeight(); y++) { in generateSampleBitmap() 62 bitmap.setPixel(x, y, Color.rgb(x, y, x + y)); in generateSampleBitmap() 65 return bitmap; in generateSampleBitmap() [all …]
|
/packages/services/Car/tests/InstrumentClusterRendererSample/src/com/android/car/cluster/sample/ |
D | BitmapUtils.java | 84 public static Bitmap squareCropBitmap(Bitmap bitmap) { in squareCropBitmap() argument 85 if (bitmap.getWidth() == bitmap.getHeight()) { in squareCropBitmap() 86 return bitmap; in squareCropBitmap() 89 int size = Math.min(bitmap.getWidth(), bitmap.getHeight()); in squareCropBitmap() 95 int x = size < bitmap.getWidth() ? (bitmap.getWidth() - size ) / 2 : 0; in squareCropBitmap() 96 int y = size < bitmap.getHeight() ? (bitmap.getHeight() - size ) / 2 : 0; in squareCropBitmap() 100 canvas.drawBitmap(bitmap, srcRect, dstRect, null); in squareCropBitmap() 104 public static Bitmap circleCropBitmap(Bitmap bitmap) { 105 bitmap = squareCropBitmap(bitmap); 106 Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/ |
D | ImageFilterRS.java | 50 protected void update(Bitmap bitmap) { in update() argument 51 getOutPixelsAllocation().copyTo(bitmap); in update() 111 public Bitmap apply(Bitmap bitmap, float scaleFactor, int quality) { in apply() argument 112 if (bitmap == null || bitmap.getWidth() == 0 || bitmap.getHeight() == 0) { in apply() 113 return bitmap; in apply() 127 if (pipeline.prepareRenderscriptAllocations(bitmap) in apply() 137 update(bitmap); in apply() 151 return bitmap; in apply() 154 protected static Allocation convertBitmap(RenderScript RS, Bitmap bitmap) { in convertBitmap() argument 155 return Allocation.createFromBitmap(RS, bitmap, in convertBitmap() [all …]
|
/packages/apps/WallpaperPicker/src/com/android/gallery3d/glrenderer/ |
D | UploadedTexture.java | 63 Bitmap bitmap = sBorderLines.get(key); in getBorderLine() local 64 if (bitmap == null) { in getBorderLine() 65 bitmap = vertical in getBorderLine() 68 sBorderLines.put(key, bitmap); in getBorderLine() 70 return bitmap; in getBorderLine() 105 protected abstract void onFreeBitmap(Bitmap bitmap); in onFreeBitmap() argument 129 Bitmap bitmap = getBitmap(); in updateContent() local 130 int format = GLUtils.getInternalFormat(bitmap); in updateContent() 131 int type = GLUtils.getType(bitmap); in updateContent() 132 canvas.texSubImage2D(this, 0, 0, bitmap, format, type); in updateContent() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
D | UploadedTexture.java | 124 Bitmap bitmap = sBorderLines.get(key); in getBorderLine() local 125 if (bitmap == null) { in getBorderLine() 126 bitmap = vertical in getBorderLine() 129 sBorderLines.put(key.clone(), bitmap); in getBorderLine() local 131 return bitmap; in getBorderLine() 166 protected abstract void onFreeBitmap(Bitmap bitmap); in onFreeBitmap() argument 193 Bitmap bitmap = getBitmap(); in updateContent() local 194 int format = GLUtils.getInternalFormat(bitmap); in updateContent() 195 int type = GLUtils.getType(bitmap); in updateContent() 196 canvas.texSubImage2D(this, mBorder, mBorder, bitmap, format, type); in updateContent() [all …]
|
/packages/apps/Gallery2/src/com/android/photos/ |
D | BitmapRegionTileSource.java | 125 public Bitmap getTile(int level, int x, int y, Bitmap bitmap) { in getTile() argument 134 if (bitmap == null) { in getTile() 135 bitmap = Bitmap.createBitmap(tileSize, tileSize, Bitmap.Config.ARGB_8888); in getTile() 139 mOptions.inBitmap = bitmap; in getTile() 142 bitmap = mDecoder.decodeRegion(mWantRegion, mOptions); in getTile() 144 if (mOptions.inBitmap != bitmap && mOptions.inBitmap != null) { in getTile() 149 if (bitmap == null) { in getTile() 152 return bitmap; in getTile() 164 Bitmap bitmap = mDecoder.decodeRegion(mOverlapRegion, mOptions); in getTileWithoutReusingBitmap() local 166 if (bitmap == null) { in getTileWithoutReusingBitmap() [all …]
|
/packages/apps/Gallery/src/com/android/camera/ |
D | ImageViewTouchBase.java | 120 public void setImageBitmap(Bitmap bitmap) { in setImageBitmap() argument 121 setImageBitmap(bitmap, 0); in setImageBitmap() 124 private void setImageBitmap(Bitmap bitmap, int rotation) { in setImageBitmap() argument 125 super.setImageBitmap(bitmap); in setImageBitmap() 132 mBitmapDisplayed.setBitmap(bitmap); in setImageBitmap() 135 if (old != null && old != bitmap && mRecycler != null) { in setImageBitmap() 148 public void setImageBitmapResetBase(final Bitmap bitmap, in setImageBitmapResetBase() argument 150 setImageRotateBitmapResetBase(new RotateBitmap(bitmap), resetSupp); in setImageBitmapResetBase() 153 public void setImageRotateBitmapResetBase(final RotateBitmap bitmap, in setImageRotateBitmapResetBase() argument 160 setImageRotateBitmapResetBase(bitmap, resetSupp); in setImageRotateBitmapResetBase() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | ImageCacheRequest.java | 63 Bitmap bitmap; in run() local 65 bitmap = DecodeUtils.decodeUsingPool(jc, in run() 68 bitmap = DecodeUtils.decodeUsingPool(jc, in run() 71 if (bitmap == null && !jc.isCancelled()) { in run() 74 return bitmap; in run() 79 Bitmap bitmap = onDecodeOriginal(jc, mType); in run() local 82 if (bitmap == null) { in run() 88 bitmap = BitmapUtils.resizeAndCropCenter(bitmap, mTargetSize, true); in run() 90 bitmap = BitmapUtils.resizeDownBySideLength(bitmap, mTargetSize, true); in run() 94 byte[] array = BitmapUtils.compressToBytes(bitmap); in run() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
D | TileImageViewAdapter.java | 109 Bitmap bitmap = GalleryBitmapPool.getInstance().get(tileSize, tileSize); in getTile() local 110 if (bitmap != null) { in getTile() 111 if (needClear) bitmap.eraseColor(0); in getTile() 113 bitmap = Bitmap.createBitmap(tileSize, tileSize, Config.ARGB_8888); in getTile() 120 options.inBitmap = bitmap; in getTile() 125 bitmap = regionDecoder.decodeRegion(wantRegion, options); in getTile() 128 if (options.inBitmap != bitmap && options.inBitmap != null) { in getTile() 134 if (bitmap == null) { in getTile() 137 return bitmap; in getTile() 159 Bitmap bitmap = null; in getTileWithoutReusingBitmap() local [all …]
|
D | BitmapTileProvider.java | 37 public BitmapTileProvider(Bitmap bitmap, int maxBackupSize) { in BitmapTileProvider() argument 38 mImageWidth = bitmap.getWidth(); in BitmapTileProvider() 39 mImageHeight = bitmap.getHeight(); in BitmapTileProvider() 41 list.add(bitmap); in BitmapTileProvider() 42 while (bitmap.getWidth() > maxBackupSize in BitmapTileProvider() 43 || bitmap.getHeight() > maxBackupSize) { in BitmapTileProvider() 44 bitmap = BitmapUtils.resizeBitmapByScale(bitmap, 0.5f, false); in BitmapTileProvider() 45 list.add(bitmap); in BitmapTileProvider() 96 for (Bitmap bitmap : mMipmaps) { in recycle() 97 BitmapUtils.recycleSilently(bitmap); in recycle()
|
/packages/apps/Dialer/java/com/android/dialer/util/ |
D | DrawableConverter.java | 53 Bitmap bitmap; in drawableToBitmap() local 55 bitmap = ((BitmapDrawable) drawable).getBitmap(); in drawableToBitmap() 58 bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in drawableToBitmap() 61 bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); in drawableToBitmap() 63 bitmap = in drawableToBitmap() 73 bitmap.getWidth(), in drawableToBitmap() 74 bitmap.getHeight()); in drawableToBitmap() 76 Canvas canvas = new Canvas(bitmap); in drawableToBitmap() 80 return bitmap; in drawableToBitmap() 86 Bitmap bitmap = drawableToBitmap(photo); in getRoundedDrawable() local [all …]
|
/packages/apps/TV/src/com/android/tv/menu/ |
D | AppLinkCardView.java | 252 public void onBitmapLoaded(AppLinkCardView cardView, @Nullable Bitmap bitmap) { in createChannelLogoCallback() 257 cardView.updateChannelLogo(bitmap, type); in createChannelLogoCallback() argument 262 private void updateChannelLogo(@Nullable Bitmap bitmap, int type) { 265 if (bitmap != null) { 266 drawable = new BitmapDrawable(getResources(), bitmap); 267 if (bitmap.getWidth() > bitmap.getHeight()) { 269 mIconWidth * bitmap.getHeight() / bitmap.getWidth()); 272 mIconHeight * bitmap.getWidth() / bitmap.getHeight(), 279 if (bitmap == null) { 283 mImageView.setImageBitmap(bitmap); [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/ |
D | LetterTileProvider.java | 30 import com.android.mail.bitmap.ColorPicker; 89 final Bitmap bitmap = getBitmap(dimensions, false /* getDefault */); in getLetterTile() local 90 if (bitmap == null) { in getLetterTile() 97 c.setBitmap(bitmap); in getLetterTile() 113 return bitmap; in getLetterTile() 140 Bitmap bitmap = cache[pos]; in getBitmap() local 143 if (bitmap == null || bitmap.getWidth() != d.width || bitmap.getHeight() != d.height) { in getBitmap() 146 bitmap = BitmapUtil.centerCrop(mDefaultBitmap, d.width, d.height); in getBitmap() 148 bitmap = Bitmap.createBitmap(d.width, d.height, Bitmap.Config.ARGB_8888); in getBitmap() 150 cache[pos] = bitmap; in getBitmap() [all …]
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
D | Utilities.java | 110 Bitmap bitmap = bitmapDrawable.getBitmap(); in createIconBitmap() local 111 if (bitmap.getDensity() == Bitmap.DENSITY_NONE) { in createIconBitmap() 138 final Bitmap bitmap = Bitmap.createBitmap(textureWidth, textureHeight, in createIconBitmap() local 141 canvas.setBitmap(bitmap); in createIconBitmap() 163 return bitmap; in createIconBitmap() 202 static Bitmap resampleIconBitmap(Bitmap bitmap, Context context) { in resampleIconBitmap() argument 208 if (bitmap.getWidth() == sIconWidth && bitmap.getHeight() == sIconHeight) { in resampleIconBitmap() 209 return bitmap; in resampleIconBitmap() 212 return createIconBitmap(new BitmapDrawable(resources, bitmap), context); in resampleIconBitmap() 217 static Bitmap drawDisabledBitmap(Bitmap bitmap, Context context) { in drawDisabledBitmap() argument [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/bitmap/ |
D | ContactResolver.java | 18 package com.android.mail.bitmap; 25 import com.android.bitmap.BitmapCache; 26 import com.android.bitmap.DecodeTask; 27 import com.android.bitmap.RequestKey; 28 import com.android.bitmap.ReusableBitmap; 32 import com.android.mail.bitmap.ContactRequest.ContactRequestHolder; 258 final ReusableBitmap bitmap = values[0].bitmap; in onProgressUpdate() local 261 if (bitmap == null && mCache != null) { in onProgressUpdate() 266 request.destination.onDecodeComplete(request.contactRequest, bitmap); in onProgressUpdate() 282 public final ReusableBitmap bitmap; field in ContactResolver.Result [all …]
|
/packages/apps/Contacts/src/com/android/contacts/ |
D | ContactPhotoManager.java | 559 public abstract void cacheBitmap(Uri photoUri, Bitmap bitmap, byte[] photoBytes); in cacheBitmap() argument 623 Bitmap bitmap; field in ContactPhotoManagerImpl.BitmapHolder 950 cachedBitmap = holder.bitmap; in loadCachedPhoto() 988 holder.bitmap = null; in loadCachedPhoto() 997 private Drawable getDrawableForBitmap(Resources resources, Bitmap bitmap, Request request) { in getDrawableForBitmap() argument 1000 RoundedBitmapDrawableFactory.create(resources, bitmap); in getDrawableForBitmap() 1002 drawable.setCornerRadius(bitmap.getHeight() / 2); in getDrawableForBitmap() 1005 return new BitmapDrawable(resources, bitmap); in getDrawableForBitmap() 1026 holder.bitmap = holder.bitmapRef.get(); in inflateBitmap() 1027 if (holder.bitmap != null) { in inflateBitmap() [all …]
|
/packages/apps/TV/src/com/android/tv/util/ |
D | BitmapUtils.java | 138 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options); in decodeSampledBitmapFromUriString() local 139 if (bitmap == null) { in decodeSampledBitmapFromUriString() 142 return new ScaledBitmapInfo(uriString, bitmap, options.inSampleSize); in decodeSampledBitmapFromUriString() 212 public final Bitmap bitmap; field in BitmapUtils.ScaledBitmapInfo 228 public ScaledBitmapInfo(@NonNull String id, @NonNull Bitmap bitmap, int inSampleSize) { in ScaledBitmapInfo() argument 230 this.bitmap = bitmap; in ScaledBitmapInfo() 247 Rect size = calculateNewSize(this.bitmap, reqWidth, reqHeight); in needToReload() 248 boolean reload = (size.right >= bitmap.getWidth() * 2 in needToReload() 249 || size.bottom >= bitmap.getHeight() * 2); in needToReload() 261 return needToReload(other.bitmap.getWidth(), other.bitmap.getHeight()); in needToReload() [all …]
|