/aosp14/frameworks/base/core/tests/coretests/src/android/graphics/ |
H A D | GraphicsPerformanceTests.java | 202 return Bitmap.createBitmap(7, 7, Bitmap.Config.RGB_565); in createBitmap() 220 return Bitmap.createBitmap(15, 15, Bitmap.Config.RGB_565); in createBitmap() 238 return Bitmap.createBitmap(31, 31, Bitmap.Config.RGB_565); in createBitmap() 256 return Bitmap.createBitmap(63, 63, Bitmap.Config.RGB_565); in createBitmap() 274 return Bitmap.createBitmap(127, 127, Bitmap.Config.RGB_565); in createBitmap() 292 return Bitmap.createBitmap(319, 239, Bitmap.Config.RGB_565); in createBitmap() 310 return Bitmap.createBitmap(319, 479, Bitmap.Config.RGB_565); in createBitmap() 328 return Bitmap.createBitmap(8, 8, Bitmap.Config.RGB_565); in createBitmap() 346 return Bitmap.createBitmap(16, 16, Bitmap.Config.RGB_565); in createBitmap() 364 return Bitmap.createBitmap(32, 32, Bitmap.Config.RGB_565); in createBitmap() [all …]
|
H A D | BitmapTest.java | 33 Bitmap bm1 = Bitmap.createBitmap(100, 200, Bitmap.Config.ARGB_8888); in testBasic() 34 Bitmap bm2 = Bitmap.createBitmap(100, 200, Bitmap.Config.RGB_565); in testBasic() 35 Bitmap bm3 = Bitmap.createBitmap(100, 200, Bitmap.Config.ARGB_4444); in testBasic() 68 Bitmap bm1 = Bitmap.createBitmap(100, 200, Bitmap.Config.ARGB_8888); in testMutability() 118 Bitmap bm = Bitmap.createBitmap(colors, 10, 10, Bitmap.Config.RGB_565); in testGetPixelsWithoutAlpha() 276 Bitmap bm1 = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); in testCopyWithDirectByteBuffer() 303 Bitmap bm2 = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); in testCopyWithDirectByteBuffer() 314 Bitmap bm1 = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); in testCopyWithDirectShortBuffer() 342 Bitmap bm2 = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); in testCopyWithDirectShortBuffer() 353 Bitmap bm1 = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); in testCopyWithDirectIntBuffer() [all …]
|
/aosp14/frameworks/base/libs/hwui/hwui/ |
H A D | Bitmap.cpp | 117 sk_sp<Bitmap> Bitmap::allocateAshmemBitmap(SkBitmap* bitmap) { in allocateAshmemBitmap() 140 return sk_sp<Bitmap>(new Bitmap(addr, fd, size, info, rowBytes)); in allocateAshmemBitmap() 146 sk_sp<Bitmap> Bitmap::allocateHardwareBitmap(const SkBitmap& bitmap) { in allocateHardwareBitmap() 158 sk_sp<Bitmap> Bitmap::allocateHeapBitmap(SkBitmap* bitmap) { in allocateHeapBitmap() 162 sk_sp<Bitmap> Bitmap::allocateHeapBitmap(const SkImageInfo& info) { in allocateHeapBitmap() 176 return sk_sp<Bitmap>(new Bitmap(addr, size, info, rowBytes)); in allocateHeapBitmap() 180 return sk_sp<Bitmap>(new Bitmap(pixelRef, info)); in createFrom() 208 return sk_sp<Bitmap>(new Bitmap(hardwareBuffer, info, rowBytes, palette)); in createFrom() 232 sk_sp<Bitmap> bitmap(new Bitmap(addr, fd, size, info, rowBytes)); in createFrom() 270 Bitmap::Bitmap(SkPixelRef& pixelRef, const SkImageInfo& info) in Bitmap() function in android::Bitmap [all …]
|
H A D | Bitmap.h | 64 class Bitmap : public SkPixelRef { 75 static sk_sp<Bitmap> allocateAshmemBitmap(SkBitmap* bitmap); 76 static sk_sp<Bitmap> allocateHardwareBitmap(const SkBitmap& bitmap); 77 static sk_sp<Bitmap> allocateHeapBitmap(SkBitmap* bitmap); 78 static sk_sp<Bitmap> allocateHeapBitmap(const SkImageInfo& info); 85 static sk_sp<Bitmap> createFrom(AHardwareBuffer* hardwareBuffer, 89 static sk_sp<Bitmap> createFrom(AHardwareBuffer* hardwareBuffer, 97 static sk_sp<Bitmap> createFrom(const SkImageInfo&, SkPixelRef&); 182 Bitmap(SkPixelRef& pixelRef, const SkImageInfo& info); 185 Bitmap(AHardwareBuffer* buffer, const SkImageInfo& info, size_t rowBytes, [all …]
|
/aosp14/frameworks/base/core/tests/coretests/src/android/graphics/drawable/ |
H A D | IconTest.java | 49 final Bitmap bm1 = Bitmap.createBitmap(100, 200, Bitmap.Config.ARGB_8888); in testWithBitmap() 50 final Bitmap bm2 = Bitmap.createBitmap(100, 200, Bitmap.Config.RGB_565); in testWithBitmap() 116 final Bitmap bm = Bitmap.createBitmap(4321, 78, Bitmap.Config.ARGB_8888); in testScaleDownIfNecessary() 129 final Bitmap bm1 = Bitmap.createBitmap(150, 150, Bitmap.Config.ARGB_8888); in testWithAdaptiveBitmap() 138 final Bitmap test1 = Bitmap.createBitmap( in testWithAdaptiveBitmap() 208 final Bitmap referenceBitmap = Bitmap.createBitmap( in testWithStatSysAdbResource() 223 final Bitmap test1 = Bitmap.createBitmap( in testWithStatSysAdbResource() 395 final Bitmap bm = Bitmap.createBitmap(bmpWidth, bmpHeight, Bitmap.Config.ARGB_8888); in testScaleDownMaxSizeWithBitmap() 412 final Bitmap bm = Bitmap.createBitmap(bmpWidth, bmpHeight, Bitmap.Config.ARGB_8888); in testScaleDownMaxSizeWithAdaptiveBitmap() 486 boolean equalBitmaps(Bitmap a, Bitmap b) { in equalBitmaps() [all …]
|
H A D | AdaptiveIconDrawableTest.java | 20 import android.graphics.Bitmap; 21 import android.graphics.Bitmap.Config; 66 final Bitmap bm_test = Bitmap.createBitmap(150, 150, Bitmap.Config.ARGB_8888); in testDraw_withoutBounds() 95 final Bitmap bm_org = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in testDraw_withBounds() 101 final Bitmap bm_test = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in testDraw_withBounds() 110 bm_org.compress(Bitmap.CompressFormat.PNG, 100, in testDraw_withBounds() 112 bm_test.compress(Bitmap.CompressFormat.PNG, 100, in testDraw_withBounds() 190 Bitmap bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888); in testSetAlpha() 211 boolean equalBitmaps(Bitmap a, Bitmap b) { in equalBitmaps() 215 boolean equalBitmaps(Bitmap a, Bitmap b, Region region) { in equalBitmaps() [all …]
|
/aosp14/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/ |
H A D | BitmapUtils.java | 19 import android.graphics.Bitmap; 20 import android.graphics.Bitmap.CompressFormat; 115 public static Bitmap resizeBitmapByScale( in resizeBitmapByScale() 121 Bitmap target = Bitmap.createBitmap(width, height, getConfig(bitmap)); in resizeBitmapByScale() 130 private static Bitmap.Config getConfig(Bitmap bitmap) { in getConfig() 133 config = Bitmap.Config.ARGB_8888; in getConfig() 138 public static Bitmap resizeDownBySideLength( in resizeDownBySideLength() 148 public static Bitmap resizeAndCropCenter(Bitmap bitmap, int size, boolean recycle) { in resizeAndCropCenter() 157 Bitmap target = Bitmap.createBitmap(size, size, getConfig(bitmap)); in resizeAndCropCenter() 178 public static Bitmap rotateBitmap(Bitmap source, int rotation, boolean recycle) { in rotateBitmap() [all …]
|
/aosp14/frameworks/base/tests/Internal/src/android/app/ |
H A D | WallpaperColorsTest.java | 19 import android.graphics.Bitmap; 55 Bitmap image = Bitmap.createBitmap(30, 30, Bitmap.Config.ARGB_8888); in whiteSurfaceColorHintsTest() 80 Bitmap xsmall_image = Bitmap.createBitmap(1, 5, Bitmap.Config.ARGB_8888); in xSmallWhiteSurfaceColorHintsTest() 98 Bitmap image = Bitmap.createBitmap(30, 30, Bitmap.Config.ARGB_8888); in blackSurfaceColorHintsTest() 115 Bitmap image = Bitmap.createBitmap(30, 30, Bitmap.Config.ARGB_8888); in bitmapHintsTest() 144 Bitmap image = Bitmap.createBitmap(300, 300, Bitmap.Config.ARGB_8888); in wallpaperRecycleBitmapTest() 156 Bitmap image = Bitmap.createBitmap(300, 300, Bitmap.Config.ARGB_8888); in testParcelUnparcel()
|
/aosp14/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
H A D | FrameImage2D.java | 19 import android.graphics.Bitmap; 60 public void setBitmap(Bitmap bitmap) { in setBitmap() 73 public Bitmap toBitmap() { in toBitmap() 74 Bitmap result = (Bitmap)mBackingStore.lockData(MODE_READ, BackingStore.ACCESS_BITMAP); in toBitmap() 116 private static Bitmap convertToFrameType(Bitmap bitmap, FrameType type) { in convertToFrameType() 117 Bitmap.Config config = bitmap.getConfig(); in convertToFrameType() 118 Bitmap result = bitmap; in convertToFrameType() 121 if (config != Bitmap.Config.ARGB_8888) { in convertToFrameType() 170 Bitmap.Config config = Bitmap.Config.ARGB_8888; in cpuImageCopy() 171 Bitmap dstBitmap = Bitmap.createBitmap(dstImage.getWidth(), dstImage.getHeight(), config); in cpuImageCopy() [all …]
|
/aosp14/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/ |
H A D | RotationAnimationUtilsTest.java | 19 import static android.graphics.Bitmap.Config.ARGB_8888; 23 import android.graphics.Bitmap; 43 Bitmap swBitmap = createBitmap(0); in blackLuma() 52 Bitmap swBitmap = createBitmap(1); in whiteLuma() 68 Bitmap swBitmap = createBitmap(1); in whiteImageBlackBorderLuma() 77 Bitmap swBitmap = createBitmap(0); in blackImageWhiteBorderLuma() 84 private Bitmap createBitmap(float luma) { in createBitmap() 88 private Bitmap createBitmap(float luma, int width, int height) { in createBitmap() 89 Bitmap bitmap = Bitmap.createBitmap(width, height, ARGB_8888); in createBitmap() 99 Bitmap hwBitmap = swBitmap.copy(Bitmap.Config.HARDWARE, false); in swBitmapToHardwareBuffer() [all …]
|
/aosp14/frameworks/base/graphics/java/android/graphics/ |
H A D | BitmapFactory.java | 105 public Bitmap inBitmap; 147 public Bitmap.Config inPreferredConfig = Bitmap.Config.ARGB_8888; 397 public Bitmap.Config outConfig; 525 Bitmap bm = null; in decodeFile() 554 public static Bitmap decodeFile(String pathName) { in decodeFile() 610 Bitmap bm = null; in decodeResource() 646 public static Bitmap decodeResource(Resources res, int id) { in decodeResource() 674 Bitmap bm; in decodeByteArray() 769 Bitmap bm = null; in decodeStream() 818 public static Bitmap decodeStream(InputStream is) { in decodeStream() [all …]
|
H A D | Bitmap.java | 51 public final class Bitmap implements Parcelable { class 716 public Bitmap createAshmemBitmap() { in createAshmemBitmap() 734 public Bitmap asShared() { in asShared() 820 public static Bitmap createScaledBitmap(@NonNull Bitmap src, int dstWidth, int dstHeight, in createScaledBitmap() 840 public static Bitmap createBitmap(@NonNull Bitmap src) { in createBitmap() 861 public static Bitmap createBitmap(@NonNull Bitmap source, int x, int y, int width, int height) { in createBitmap() 897 public static Bitmap createBitmap(@NonNull Bitmap source, int x, int y, int width, int height, in createBitmap() 926 Bitmap bitmap; in createBitmap() 1017 private static Bitmap transformGainmap(Bitmap source, Matrix m, int neww, int newh, Paint paint, in transformGainmap() 1408 Bitmap bitmap = Bitmap.createBitmap(width, height, config); in createBitmap() [all …]
|
/aosp14/frameworks/base/libs/hwui/apex/include/android/graphics/ |
H A D | bitmap.h | 86 class Bitmap { 88 Bitmap() : mBitmap(nullptr) {} in Bitmap() function 89 Bitmap(JNIEnv* env, jobject bitmapObj) : in Bitmap() function 91 Bitmap(const Bitmap& src) : mBitmap(src.mBitmap) { ABitmap_acquireRef(src.mBitmap); } in Bitmap() function 92 ~Bitmap() { ABitmap_releaseRef(mBitmap); } in ~Bitmap() 95 Bitmap& operator=(const Bitmap& other) { 105 Bitmap& operator=(Bitmap&& other) { 114 Bitmap copy(AndroidBitmapFormat dstFormat) const { in copy() 115 return Bitmap(ABitmap_copy(mBitmap, dstFormat)); in copy() 138 Bitmap(ABitmap* bitmap) : mBitmap(bitmap) {} in Bitmap() function
|
/aosp14/frameworks/base/packages/WallpaperCropper/src/com/android/photos/ |
H A D | BitmapRegionTileSource.java | 22 import android.graphics.Bitmap; 23 import android.graphics.Bitmap.Config; 95 Bitmap mBuffer; 128 Bitmap newBitmap = Bitmap.createBitmap( in decodeRegion() 131 Bitmap.Config.ARGB_8888); in decodeRegion() 160 private Bitmap mPreview; 207 public Bitmap getPreviewBitmap() { in getPreviewBitmap() 436 public Bitmap getTile(int level, int x, int y, Bitmap bitmap) { in getTile() 446 bitmap = Bitmap.createBitmap(tileSize, tileSize, Bitmap.Config.ARGB_8888); in getTile() 485 Bitmap result = Bitmap.createBitmap(tileSize, tileSize, Config.ARGB_8888); in getTileWithoutReusingBitmap() [all …]
|
/aosp14/frameworks/base/services/companion/java/com/android/server/companion/datatransfer/contextsync/ |
H A D | BitmapUtils.java | 19 import android.graphics.Bitmap; 35 final Bitmap bitmap = ((BitmapDrawable) drawable).getBitmap(); in renderDrawableToByteArray() 39 final Bitmap scaledBitmap = Bitmap.createScaledBitmap(bitmap, in renderDrawableToByteArray() 47 final Bitmap bitmap = Bitmap.createBitmap(APP_ICON_BITMAP_DIMENSION, in renderDrawableToByteArray() 49 Bitmap.Config.ARGB_8888); in renderDrawableToByteArray() 60 private static byte[] renderBitmapToByteArray(Bitmap bitmap) { in renderBitmapToByteArray() 62 bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos); in renderBitmapToByteArray()
|
/aosp14/frameworks/base/opengl/java/android/opengl/ |
H A D | GLUtils.java | 19 import android.graphics.Bitmap; 40 public static int getInternalFormat(Bitmap bitmap) { in getInternalFormat() 62 public static int getType(Bitmap bitmap) { in getType() 99 Bitmap bitmap, int border) { in texImage2D() 125 Bitmap bitmap, int type, int border) { in texImage2D() 146 public static void texImage2D(int target, int level, Bitmap bitmap, in texImage2D() 182 Bitmap bitmap) { in texSubImage2D() 207 Bitmap bitmap, int format, int type) { in texSubImage2D() 265 private static native int native_getType(Bitmap bitmap); in native_getType() 267 Bitmap bitmap, int type, int border); in native_texImage2D() [all …]
|
/aosp14/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/ |
H A D | UploadedTexture.java | 19 import android.graphics.Bitmap; 20 import android.graphics.Bitmap.Config; 48 new HashMap<BorderKey, Bitmap>(); 62 protected Bitmap mBitmap; 118 private static Bitmap getBorderLine( in getBorderLine() 124 Bitmap bitmap = sBorderLines.get(key); in getBorderLine() 134 private Bitmap getBitmap() { in getBitmap() 164 protected abstract Bitmap onGetBitmap(); in onGetBitmap() 166 protected abstract void onFreeBitmap(Bitmap bitmap); in onFreeBitmap() 193 Bitmap bitmap = getBitmap(); in updateContent() [all …]
|
H A D | BitmapTexture.java | 19 import android.graphics.Bitmap; 29 protected Bitmap mContentBitmap; 31 public BitmapTexture(Bitmap bitmap) { in BitmapTexture() 35 public BitmapTexture(Bitmap bitmap, boolean hasBorder) { in BitmapTexture() 42 protected void onFreeBitmap(Bitmap bitmap) { in onFreeBitmap() 47 protected Bitmap onGetBitmap() { in onGetBitmap() 51 public Bitmap getBitmap() { in getBitmap()
|
/aosp14/frameworks/base/tests/UiBench/src/com/android/test/uibench/leanback/ |
H A D | BitmapLoader.java | 19 import android.graphics.Bitmap; 50 static LruCache<Long, Bitmap> sLruCache; 60 static LruCache<Long, Bitmap> getLruCache(Context context) { in getLruCache() 66 sLruCache = new LruCache<Long, Bitmap>(maxBytes) { in getLruCache() 68 protected int sizeOf(Long key, Bitmap value) { in getLruCache() 76 static class BitmapAsyncTask extends AsyncTask<Void, Void, Bitmap> { 92 protected Bitmap doInBackground(Void... voids) { in doInBackground() 94 Bitmap bitmap = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.ARGB_8888); in doInBackground() 111 protected void onPostExecute(Bitmap bitmap) { in onPostExecute() 122 Bitmap bitmap = getLruCache(context).get(id); in loadBitmap()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/ |
H A D | MediaArtworkProcessorTest.kt | 21 import android.graphics.Bitmap 63 val artwork = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ARGB_8888) 70 assertThat(background.config).isEqualTo(Bitmap.Config.ARGB_8888) 76 val artwork = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ARGB_8888) 89 val artwork = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ALPHA_8) 94 assertThat(background.config).isEqualTo(Bitmap.Config.ARGB_8888) 100 val artwork = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ARGB_8888)
|
/aosp14/frameworks/base/media/java/android/media/ |
H A D | MediaMetadataRetriever.java | 30 import android.graphics.Bitmap; 614 public @Nullable Bitmap getFrameAtTime( in getFrameAtTime() 744 public @Nullable Bitmap getFrameAtTime(long timeUs) { in getFrameAtTime() 766 public @Nullable Bitmap getFrameAtTime() { in getFrameAtTime() 771 private native Bitmap _getFrameAtTime( in _getFrameAtTime() 775 private Bitmap.Config inPreferredConfig = Bitmap.Config.ARGB_8888; 776 private Bitmap.Config outActualConfig = Bitmap.Config.ARGB_8888; 815 public @NonNull Bitmap.Config getActualConfig() { in getActualConfig() 898 public @NonNull List<Bitmap> getFramesAtIndex( in getFramesAtIndex() 944 private native @NonNull List<Bitmap> _getFrameAtIndex( in _getFrameAtIndex() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
H A D | MediaArtworkProcessor.kt | 20 import android.graphics.Bitmap 44 private var mArtworkCache: Bitmap? = null 46 fun processArtwork(context: Context, artwork: Bitmap): Bitmap? { 54 var inBitmap: Bitmap? = null 60 inBitmap = Bitmap.createScaledBitmap(artwork, rect.width(), rect.height(), 64 if (inBitmap.config != Bitmap.Config.ARGB_8888) { 66 inBitmap = oldIn.copy(Bitmap.Config.ARGB_8888, false /* isMutable */) 69 val outBitmap = Bitmap.createBitmap(inBitmap?.width ?: 0, inBitmap?.height ?: 0, 70 Bitmap.Config.ARGB_8888)
|
/aosp14/frameworks/base/libs/hwui/apex/ |
H A D | TypeCast.h | 26 class Bitmap; variable 32 static inline Bitmap& toBitmapRef(const ABitmap* bitmap) { in toBitmapRef() 33 return const_cast<Bitmap&>(reinterpret_cast<const Bitmap&>(*bitmap)); in toBitmapRef() 36 static inline Bitmap* toBitmap(ABitmap* bitmap) { in toBitmap() 37 return reinterpret_cast<Bitmap*>(bitmap); in toBitmap() 40 static inline ABitmap* toABitmap(Bitmap* bitmap) { in toABitmap()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/logging/ |
H A D | NotificationMemoryViewWalkerTest.kt | 4 import android.graphics.Bitmap 53 val icon = Icon.createWithBitmap(Bitmap.createBitmap(20, 20, Bitmap.Config.ARGB_8888)) 54 val publicIcon = Icon.createWithBitmap(Bitmap.createBitmap(40, 40, Bitmap.Config.ARGB_8888)) 125 val bigPicture = Bitmap.createBitmap(300, 300, Bitmap.Config.ARGB_8888) 126 val icon = Icon.createWithBitmap(Bitmap.createBitmap(20, 20, Bitmap.Config.ARGB_8888)) 127 val largeIcon = Icon.createWithBitmap(Bitmap.createBitmap(60, 60, Bitmap.Config.ARGB_8888)) 185 val icon = Icon.createWithBitmap(Bitmap.createBitmap(20, 20, Bitmap.Config.ARGB_8888)) 186 val bitmap = Bitmap.createBitmap(300, 300, Bitmap.Config.ARGB_8888)
|
H A D | NotificationMemoryMeterTest.kt | 24 import android.graphics.Bitmap 82 val icon = Icon.createWithBitmap(Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888)) 145 Icon.createWithBitmap(Bitmap.createBitmap(600, 400, Bitmap.Config.ARGB_8888)) 147 Icon.createWithAdaptiveBitmap(Bitmap.createBitmap(386, 432, Bitmap.Config.ARGB_8888)) 174 Icon.createWithBitmap(Bitmap.createBitmap(386, 432, Bitmap.Config.ARGB_8888)) 200 Icon.createWithBitmap(Bitmap.createBitmap(386, 432, Bitmap.Config.ARGB_8888)) 204 Icon.createWithBitmap(Bitmap.createBitmap(348, 382, Bitmap.Config.ARGB_8888)) 237 val carIcon = Bitmap.createBitmap(432, 322, Bitmap.Config.ARGB_8888) 258 val wearBackground = Bitmap.createBitmap(443, 433, Bitmap.Config.ARGB_8888) 278 Icon.createWithBitmap(Bitmap.createBitmap(250, 250, Bitmap.Config.ARGB_8888)) [all …]
|