/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 …]
|
D | ImagePreset.java | 440 Bitmap bitmap = original; in apply() local 441 bitmap = applyFilters(bitmap, -1, -1, environment); in apply() 442 return applyBorder(bitmap, environment); in apply() 470 public Bitmap applyGeometry(Bitmap bitmap, FilterEnvironment environment) { in applyGeometry() argument 475 getGeometryFilters(), bitmap); in applyGeometry() 476 if (bmp != bitmap) { in applyGeometry() 477 environment.cache(bitmap); in applyGeometry() 481 return bitmap; in applyGeometry() 484 public Bitmap applyBorder(Bitmap bitmap, FilterEnvironment environment) { in applyBorder() argument 489 bitmap = environment.applyRepresentation(border, bitmap); in applyBorder() [all …]
|
/packages/apps/Mms/src/com/android/mms/util/ |
D | ThumbnailManager.java | 250 Bitmap bitmap = null; in run() local 252 bitmap = getBitmap(mIsVideo); in run() 258 final Bitmap resultBitmap = bitmap; in run() 265 Bitmap bitmap = resultBitmap == null ? in run() 275 ImageLoaded imageLoaded = new ImageLoaded(bitmap, mIsVideo); in run() 331 Bitmap bitmap = requestDecode(data.mData, in getBitmap() local 333 if (bitmap == null) { in getBitmap() 336 return bitmap; in getBitmap() 338 Bitmap bitmap; in getBitmap() local 340 bitmap = getVideoBitmap(); in getBitmap() [all …]
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | BitmapUtils.java | 117 Bitmap bitmap, float scale, boolean recycle) { in resizeBitmapByScale() argument 118 int width = Math.round(bitmap.getWidth() * scale); in resizeBitmapByScale() 119 int height = Math.round(bitmap.getHeight() * scale); in resizeBitmapByScale() 120 if (width == bitmap.getWidth() in resizeBitmapByScale() 121 && height == bitmap.getHeight()) return bitmap; in resizeBitmapByScale() 122 Bitmap target = Bitmap.createBitmap(width, height, getConfig(bitmap)); in resizeBitmapByScale() 126 canvas.drawBitmap(bitmap, 0, 0, paint); in resizeBitmapByScale() 127 if (recycle) bitmap.recycle(); in resizeBitmapByScale() 131 private static Bitmap.Config getConfig(Bitmap bitmap) { in getConfig() argument 132 Bitmap.Config config = bitmap.getConfig(); in getConfig() [all …]
|
/packages/apps/Launcher3/WallpaperPicker/src/com/android/gallery3d/common/ |
D | BitmapUtils.java | 117 Bitmap bitmap, float scale, boolean recycle) { in resizeBitmapByScale() argument 118 int width = Math.round(bitmap.getWidth() * scale); in resizeBitmapByScale() 119 int height = Math.round(bitmap.getHeight() * scale); in resizeBitmapByScale() 120 if (width == bitmap.getWidth() in resizeBitmapByScale() 121 && height == bitmap.getHeight()) return bitmap; in resizeBitmapByScale() 122 Bitmap target = Bitmap.createBitmap(width, height, getConfig(bitmap)); in resizeBitmapByScale() 126 canvas.drawBitmap(bitmap, 0, 0, paint); in resizeBitmapByScale() 127 if (recycle) bitmap.recycle(); in resizeBitmapByScale() 131 private static Bitmap.Config getConfig(Bitmap bitmap) { in getConfig() argument 132 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 …]
|
D | ImageLoader.java | 205 public static Bitmap orientBitmap(Bitmap bitmap, int ori) { in orientBitmap() argument 207 int w = bitmap.getWidth(); in orientBitmap() 208 int h = bitmap.getHeight(); in orientBitmap() 243 return bitmap; in orientBitmap() 245 return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), in orientBitmap() 246 bitmap.getHeight(), matrix, true); in orientBitmap() 279 Bitmap bitmap = decoder.decodeRegion(imageBounds, options); in loadRegionBitmap() local 280 if (bitmap != reuse) { in loadRegionBitmap() 283 return bitmap; in loadRegionBitmap() 471 Bitmap bitmap = loadBitmapWithBackouts(context, sourceUri, sampleSize); in loadOrientedBitmapWithBackouts() local [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/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 …]
|
D | ImageFilterKMeans.java | 52 native protected void nativeApplyFilter(Bitmap bitmap, int width, int height, in nativeApplyFilter() argument 57 public Bitmap apply(Bitmap bitmap, float scaleFactor, int quality) { in apply() argument 59 return bitmap; in apply() 61 int w = bitmap.getWidth(); in apply() 62 int h = bitmap.getHeight(); in apply() 64 Bitmap large_bm_ds = bitmap; in apply() 65 Bitmap small_bm_ds = bitmap; in apply() 75 large_bm_ds = Bitmap.createScaledBitmap(bitmap, lw, lh, true); in apply() 91 nativeApplyFilter(bitmap, w, h, large_bm_ds, lw, lh, small_bm_ds, sw, sh, p, mSeed); in apply() 93 return bitmap; in apply()
|
/packages/apps/Launcher3/WallpaperPicker/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/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/UnifiedEmail/src/com/android/mail/photomanager/ |
D | LetterTileProvider.java | 107 final Bitmap bitmap = getLetterTile(mDims, displayName, address); in applyDefaultImage() local 109 if (bitmap == null) { in applyDefaultImage() 113 dividedImageView.addDivisionImage(bitmap, address); in applyDefaultImage() 122 final Bitmap bitmap = getBitmap(dimensions, false /* getDefault */); in getLetterTile() local 123 if (bitmap == null) { in getLetterTile() 130 c.setBitmap(bitmap); in getLetterTile() 145 return bitmap; in getLetterTile() 172 Bitmap bitmap = cache[pos]; in getBitmap() local 175 if (bitmap == null || bitmap.getWidth() != d.width || bitmap.getHeight() != d.height) { in getBitmap() 178 bitmap = BitmapUtil.centerCrop(mDefaultBitmap, d.width, d.height); in getBitmap() [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/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/Launcher3/WallpaperPicker/src/com/android/photos/ |
D | BitmapRegionTileSource.java | 439 public Bitmap getTile(int level, int x, int y, Bitmap bitmap) { in getTile() argument 448 if (bitmap == null) { in getTile() 449 bitmap = Bitmap.createBitmap(tileSize, tileSize, Bitmap.Config.ARGB_8888); in getTile() 453 mOptions.inBitmap = bitmap; in getTile() 456 bitmap = mDecoder.decodeRegion(mWantRegion, mOptions); in getTile() 458 if (mOptions.inBitmap != bitmap && mOptions.inBitmap != null) { in getTile() 463 if (bitmap == null) { in getTile() 466 return bitmap; in getTile() 478 Bitmap bitmap = mDecoder.decodeRegion(mOverlapRegion, mOptions); in getTileWithoutReusingBitmap() local 480 if (bitmap == null) { in getTileWithoutReusingBitmap() [all …]
|
/packages/apps/VideoEditor/src/com/android/videoeditor/ |
D | ProjectPickerAdapter.java | 166 public void drawBottomOverlay(Bitmap bitmap, String title, String duration) { in drawBottomOverlay() argument 168 final Canvas canvas = new Canvas(bitmap); in drawBottomOverlay() 172 final int left = 0, top = bitmap.getHeight() - mOverlayHeight, in drawBottomOverlay() 173 right = bitmap.getWidth(), bottom = bitmap.getHeight(); in drawBottomOverlay() 181 final int availableTitleWidth = bitmap.getWidth() - (int) paint.measureText(duration); in drawBottomOverlay() 185 bitmap.getHeight() - mOverlayHeight + mOverlayVerticalInset, in drawBottomOverlay() 190 bitmap.getWidth() - paint.measureText(duration) - mOverlayHorizontalInset, in drawBottomOverlay() 191 bitmap.getHeight() - mOverlayHeight + mOverlayVerticalInset, in drawBottomOverlay() 211 final Bitmap bitmap = Bitmap.createBitmap(mItemWidth, mItemHeight, in renderNewProjectThumbnail() local 213 final Canvas canvas = new Canvas(bitmap); in renderNewProjectThumbnail() [all …]
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/ |
D | ContactPhotoManager.java | 435 public abstract void cacheBitmap(Uri photoUri, Bitmap bitmap, byte[] photoBytes); in cacheBitmap() argument 488 Bitmap bitmap; field in ContactPhotoManagerImpl.BitmapHolder 766 cachedBitmap = holder.bitmap; in loadCachedPhoto() 803 holder.bitmap = null; in loadCachedPhoto() 825 holder.bitmap = holder.bitmapRef.get(); in inflateBitmap() 826 if (holder.bitmap != null) { in inflateBitmap() 833 Bitmap bitmap = BitmapUtil.decodeBitmapFromBytes(bytes, sampleSize); in inflateBitmap() local 837 Bitmap original = bitmap; in inflateBitmap() 838 bitmap = bitmap.copy(bitmap.getConfig(), true); in inflateBitmap() 840 Canvas canvas = new Canvas(bitmap); in inflateBitmap() [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/providers/MediaProvider/src/com/android/providers/media/ |
D | MediaThumbRequest.java | 172 Bitmap bitmap = null; 176 bitmap = ThumbnailUtils.createVideoThumbnail(mPath, 179 bitmap = ThumbnailUtils.createImageThumbnail(mPath, 182 if (bitmap == null) { 187 Uri uri = updateDatabase(bitmap); 190 bitmap.compress(Bitmap.CompressFormat.JPEG, 85, thumbOut); 195 bitmap = ThumbnailUtils.extractThumbnail(bitmap, 200 if (bitmap != null) { 202 bitmap.compress(Bitmap.CompressFormat.JPEG, 75, miniOutStream); 203 bitmap.recycle();
|
/packages/apps/Mms/src/com/android/mms/ui/ |
D | BasicSlideEditorView.java | 98 public void setImage(String name, Bitmap bitmap) { in setImage() argument 100 if (null == bitmap) { in setImage() 101 bitmap = BitmapFactory.decodeResource(getResources(), in setImage() 104 mImageView.setImageBitmap(bitmap); in setImage() 133 Bitmap bitmap = VideoAttachmentView.createVideoThumbnail(mContext, video); in setVideo() local 134 if (null == bitmap) { in setVideo() 135 bitmap = BitmapFactory.decodeResource(getResources(), in setVideo() 138 mImageView.setImageBitmap(bitmap); in setVideo() 144 public void setVideoThumbnail(String name, Bitmap bitmap) { in setVideoThumbnail() argument 145 mImageView.setImageBitmap(bitmap); in setVideoThumbnail()
|
/packages/apps/Nfc/src/com/android/nfc/ |
D | SendUi.java | 580 Bitmap bitmap = SurfaceControl.screenshot((int) dims[0], (int) dims[1]); in createScreenshot() local 582 if (bitmap == null) { in createScreenshot() 594 c.drawBitmap(bitmap, 0, 0, null); in createScreenshot() 596 bitmap = ss; in createScreenshot() 605 int newWidth = bitmap.getWidth(); in createScreenshot() 606 int newHeight = bitmap.getHeight(); in createScreenshot() 609 if (bitmap.getWidth() < bitmap.getHeight()) { in createScreenshot() 611 newHeight = bitmap.getHeight() - statusBarHeight - navBarHeight; in createScreenshot() 616 newHeight = bitmap.getHeight() - statusBarHeight - navBarHeightLandscape; in createScreenshot() 618 newHeight = bitmap.getHeight() - statusBarHeight; in createScreenshot() [all …]
|