Home
last modified time | relevance | path

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

12345678910>>...15

/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 …]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DBitmapUtils.java116 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/Car/libs/car-apps-common/src/com/android/car/apps/common/
DBitmapDownloader.java64 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 …]
DDrawableDownloader.java141 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 …]
DRecycleBitmapPool.java61 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/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 …]
/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/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DLogoUtilsTest.java37 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 …]
DUriBitmap.java34 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/apps/WallpaperPicker/src/com/android/gallery3d/glrenderer/
DUploadedTexture.java63 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/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/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/Launcher3/src/com/android/launcher3/graphics/
DNinePatchDrawHelper.java44 public void draw(Bitmap bitmap, Canvas canvas, float left, float top, float right) { in draw() argument
45 int height = bitmap.getHeight(); in draw()
51 draw3Patch(bitmap, canvas, left, right); in draw()
60 public void drawVerticallyStretched(Bitmap bitmap, Canvas canvas, float left, float top, in drawVerticallyStretched() argument
62 draw(bitmap, canvas, left, top, right); in drawVerticallyStretched()
65 int height = bitmap.getHeight(); in drawVerticallyStretched()
70 draw3Patch(bitmap, canvas, left, right); in drawVerticallyStretched()
75 private void draw3Patch(Bitmap bitmap, Canvas canvas, float left, float right) { in draw3Patch() argument
76 int width = bitmap.getWidth(); in draw3Patch()
80 drawRegion(bitmap, canvas, 0, halfWidth, left, left + halfWidth); in draw3Patch()
[all …]
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/
DBitmapTransformer.java37 public static Bitmap applyFillTransformation(Bitmap bitmap, Point fillSize) { in applyFillTransformation() argument
43 int horizontalOffset = (bitmap.getWidth() - resultBitmap.getWidth()) / 2; in applyFillTransformation()
44 int verticalOffset = (bitmap.getHeight() - resultBitmap.getHeight()) / 2; in applyFillTransformation()
50 int pixelArraySize = Math.min(resultBitmap.getWidth(), bitmap.getWidth()) in applyFillTransformation()
51 * Math.min(resultBitmap.getHeight(), bitmap.getHeight()); in applyFillTransformation()
55 bitmap.getPixels( in applyFillTransformation()
58 bitmap.getWidth() /* stride */, in applyFillTransformation()
61 Math.min(resultBitmap.getWidth(), bitmap.getWidth()) /* width */, in applyFillTransformation()
62 Math.min(resultBitmap.getHeight(), bitmap.getHeight()) /* height */); in applyFillTransformation()
68 bitmap.getWidth() /* stride */, in applyFillTransformation()
[all …]
/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/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/Dialer/java/com/android/dialer/util/
DDrawableConverter.java53 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/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/WallpaperPicker2/src/com/android/wallpaper/asset/
DStreamableAsset.java280 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options); in doInBackground() local
289 bitmap = Bitmap.createBitmap( in doInBackground()
290 bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), rotateMatrix, false); in doInBackground()
293 return bitmap; in doInBackground()
297 protected void onPostExecute(Bitmap bitmap) { in onPostExecute() argument
298 mReceiver.onBitmapDecoded(bitmap); in onPostExecute()
347 Bitmap bitmap = mBitmapRegionDecoder.decodeRegion(mCropRect, options); in doInBackground() local
354 bitmap = Bitmap.createBitmap( in doInBackground()
355bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), rotateMatrix, false); in doInBackground()
358 return bitmap; in doInBackground()
[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 …]
/packages/apps/Car/libs/car-media-common/src/com/android/car/media/common/source/
DMediaSource.java190 Bitmap bitmap = null; in drawableToBitmap() local
200 bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); in drawableToBitmap()
202 bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), in drawableToBitmap()
206 Canvas canvas = new Canvas(bitmap); in drawableToBitmap()
209 return bitmap; in drawableToBitmap()
212 private Bitmap getRoundCroppedBitmap(Bitmap bitmap) { in getRoundCroppedBitmap() argument
213 Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), in getRoundCroppedBitmap()
219 final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); in getRoundCroppedBitmap()
224 canvas.drawCircle(bitmap.getWidth() / 2, bitmap.getHeight() / 2, in getRoundCroppedBitmap()
225 bitmap.getWidth() / 2f, paint); in getRoundCroppedBitmap()
[all …]
/packages/apps/TV/src/com/android/tv/menu/
DAppLinkCardView.java267 public void onBitmapLoaded(AppLinkCardView cardView, @Nullable Bitmap bitmap) { in createChannelLogoCallback()
272 cardView.updateChannelLogo(bitmap, type); in createChannelLogoCallback() argument
277 private void updateChannelLogo(@Nullable Bitmap bitmap, int type) {
280 if (bitmap != null) {
281 drawable = new BitmapDrawable(getResources(), bitmap);
282 if (bitmap.getWidth() > bitmap.getHeight()) {
284 0, 0, mIconWidth, mIconWidth * bitmap.getHeight() / bitmap.getWidth());
289 mIconHeight * bitmap.getWidth() / bitmap.getHeight(),
296 if (bitmap == null) {
300 mImageView.setImageBitmap(bitmap);
[all …]
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DLogoUtils.java46 Bitmap bitmap = null; in getOrganisationLogo() local
50 bitmap = getBitmapPartiallyResized(logoFile.getPath(), maxWidth, maxHeight); in getOrganisationLogo()
51 if (bitmap == null) { in getOrganisationLogo()
56 if (bitmap != null) { in getOrganisationLogo()
58 resizeBitmap(bitmap, maxWidth, maxHeight)); in getOrganisationLogo()
103 static Bitmap resizeBitmap(Bitmap bitmap, int maxWidth, int maxHeight) { in resizeBitmap() argument
104 int width = bitmap.getWidth(); in resizeBitmap()
105 int height = bitmap.getHeight(); in resizeBitmap()
111 bitmap = Bitmap.createScaledBitmap(bitmap, width, height, false); in resizeBitmap()
113 return bitmap; in resizeBitmap()

12345678910>>...15