Home
last modified time | relevance | path

Searched refs:bitmap (Results 1 – 25 of 287) sorted by relevance

12345678910>>...12

/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/
DCachingPipeline.java177 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 …]
DImagePreset.java440 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/
DThumbnailManager.java250 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/TvSettings/Settings/src/com/android/tv/settings/widget/
DBitmapDownloader.java69 public BitmapItem(Bitmap bitmap, boolean scaled) { in BitmapItem() argument
70 mBitmap = bitmap; in BitmapItem()
92 public abstract void onBitmapRetrieved(Bitmap bitmap); in onBitmapRetrieved() argument
119 protected int sizeOf(String key, BitmapItem bitmap) { in BitmapDownloader()
120 return bitmap.mBitmap.getByteCount(); in BitmapDownloader()
133 Bitmap bitmap = null; in loadBitmapBlocking() local
137 bitmap = getBitmapFromMemCache(options); in loadBitmapBlocking()
140 if (bitmap == null) { in loadBitmapBlocking()
144 final Bitmap bitmap = super.doInBackground(params); in loadBitmapBlocking()
145 if (bitmap != null && !hasAccountImageUri) { in loadBitmapBlocking()
[all …]
DDrawableDownloader.java145 public abstract void onBitmapRetrieved(Drawable bitmap); in onBitmapRetrieved() argument
192 protected int sizeOf(String key, BitmapItem bitmap) { in DrawableDownloader()
193 return bitmap.mByteCount; in DrawableDownloader()
225 Drawable bitmap = null; in loadBitmapBlocking() local
229 bitmap = getBitmapFromMemCache(options); in loadBitmapBlocking()
232 if (bitmap == null) { in loadBitmapBlocking()
236 final Drawable bitmap = super.doInBackground(params); in loadBitmapBlocking()
237 if (bitmap != null && !hasAccountImageUri) { in loadBitmapBlocking()
238 addBitmapToMemoryCache(params[0], bitmap, this); in loadBitmapBlocking()
240 return bitmap; in loadBitmapBlocking()
[all …]
DRecycleBitmapPool.java58 public static int getSize(Bitmap bitmap) { in getSize() argument
61 return (Integer) sGetAllocationByteCount.invoke(bitmap); in getSize()
71 return bitmap.getByteCount(); in getSize()
81 public void addRecycledBitmap(Bitmap bitmap) { in addRecycledBitmap() argument
82 if (bitmap.isRecycled()) { in addRecycledBitmap()
85 Bitmap.Config config = bitmap.getConfig(); in addRecycledBitmap()
89 int key = getSize(bitmap); in addRecycledBitmap()
99 list.add(new SoftReference<Bitmap>(bitmap)); in addRecycledBitmap()
101 Log.d(TAG, list.size() + " add bitmap " + bitmap.getWidth() + " " in addRecycledBitmap()
102 + bitmap.getHeight()); in addRecycledBitmap()
[all …]
DBitmapWorkerTask.java119 protected void onPostExecute(Bitmap bitmap) { in onPostExecute() argument
123 imageView.setImageBitmap(bitmap); in onPostExecute()
162 private Bitmap scaleBitmapIfNecessary(BitmapWorkerOptions outputOptions, Bitmap bitmap) { in scaleBitmapIfNecessary() argument
163 if (bitmap == null) { in scaleBitmapIfNecessary()
169 if (bitmap.getHeight() > outputOptions.getHeight()) { in scaleBitmapIfNecessary()
170 heightScale = (float) outputOptions.getHeight() / (float) bitmap.getHeight(); in scaleBitmapIfNecessary()
176 if (bitmap.getWidth() > outputOptions.getWidth()) { in scaleBitmapIfNecessary()
177 widthScale = (float) outputOptions.getWidth() / (float) bitmap.getWidth(); in scaleBitmapIfNecessary()
182 return bitmap; in scaleBitmapIfNecessary()
184 int width = (int) (bitmap.getWidth() * scale); in scaleBitmapIfNecessary()
[all …]
/packages/apps/Launcher3/WallpaperPicker/src/com/android/gallery3d/common/
DBitmapUtils.java117 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/gallerycommon/src/com/android/gallery3d/common/
DBitmapUtils.java117 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/
DBitmapCache.java55 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 …]
DImageLoader.java205 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/
DThumbnail.java59 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/
DImageFilterRS.java50 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/Gallery2/src/com/android/gallery3d/glrenderer/
DUploadedTexture.java124 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/Launcher3/WallpaperPicker/src/com/android/gallery3d/glrenderer/
DUploadedTexture.java124 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/
DBitmapRegionTileSource.java125 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/ContactsCommon/src/com/android/contacts/common/
DContactPhotoManager.java544 public abstract void cacheBitmap(Uri photoUri, Bitmap bitmap, byte[] photoBytes); in cacheBitmap() argument
597 Bitmap bitmap; field in ContactPhotoManagerImpl.BitmapHolder
911 cachedBitmap = holder.bitmap; in loadCachedPhoto()
949 holder.bitmap = null; in loadCachedPhoto()
958 private Drawable getDrawableForBitmap(Resources resources, Bitmap bitmap, Request request) { in getDrawableForBitmap() argument
961 RoundedBitmapDrawableFactory.create(resources, bitmap); in getDrawableForBitmap()
963 drawable.setCornerRadius(bitmap.getHeight() / 2); in getDrawableForBitmap()
966 return new BitmapDrawable(resources, bitmap); in getDrawableForBitmap()
987 holder.bitmap = holder.bitmapRef.get(); in inflateBitmap()
988 if (holder.bitmap != null) { in inflateBitmap()
[all …]
/packages/apps/Gallery/src/com/android/camera/
DImageViewTouchBase.java120 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/ui/
DTileImageViewAdapter.java109 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 …]
DBitmapTileProvider.java37 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/
DImageCacheRequest.java63 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/
DBitmapRegionTileSource.java436 public Bitmap getTile(int level, int x, int y, Bitmap bitmap) { in getTile() argument
445 if (bitmap == null) { in getTile()
446 bitmap = Bitmap.createBitmap(tileSize, tileSize, Bitmap.Config.ARGB_8888); in getTile()
450 mOptions.inBitmap = bitmap; in getTile()
453 bitmap = mDecoder.decodeRegion(mWantRegion, mOptions); in getTile()
455 if (mOptions.inBitmap != bitmap && mOptions.inBitmap != null) { in getTile()
460 if (bitmap == null) { in getTile()
463 return bitmap; in getTile()
475 Bitmap bitmap = mDecoder.decodeRegion(mOverlapRegion, mOptions); in getTileWithoutReusingBitmap() local
477 if (bitmap == null) { in getTileWithoutReusingBitmap()
[all …]
/packages/apps/UnifiedEmail/src/com/android/mail/bitmap/
DContactResolver.java18 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/Launcher2/src/com/android/launcher2/
DUtilities.java110 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/photomanager/
DLetterTileProvider.java30 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 …]

12345678910>>...12