/frameworks/base/core/tests/coretests/src/android/graphics/ |
D | GraphicsPerformanceTests.java | 77 protected Bitmap mDestBitmap; 89 mDestBitmap = Bitmap.createBitmap(SCREEN_WIDTH, SCREEN_HEIGHT, in setUp() 90 Bitmap.Config.RGB_565); in setUp() 161 private Bitmap mBitmap; 176 public abstract Bitmap createBitmap(); in createBitmap() 201 public Bitmap createBitmap() { in createBitmap() 202 return Bitmap.createBitmap(7, 7, Bitmap.Config.RGB_565); in createBitmap() 219 public Bitmap createBitmap() { in createBitmap() 220 return Bitmap.createBitmap(15, 15, Bitmap.Config.RGB_565); in createBitmap() 237 public Bitmap createBitmap() { in createBitmap() [all …]
|
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() 61 assertTrue("getConfig", bm1.getConfig() == Bitmap.Config.ARGB_8888); in testBasic() 62 assertTrue("getConfig", bm2.getConfig() == Bitmap.Config.RGB_565); in testBasic() 63 assertTrue("getConfig", bm3.getConfig() == Bitmap.Config.ARGB_8888); in testBasic() 68 Bitmap bm1 = Bitmap.createBitmap(100, 200, Bitmap.Config.ARGB_8888); in testMutability() 69 Bitmap bm2 = Bitmap.createBitmap(new int[100 * 200], 100, 200, in testMutability() 70 Bitmap.Config.ARGB_8888); in testMutability() 92 Bitmap bm = Bitmap.createBitmap(colors, 10, 10, in testGetPixelsWithAlpha() [all …]
|
/frameworks/base/libs/hwui/hwui/ |
D | Bitmap.cpp | 49 typedef sk_sp<Bitmap> (*AllocPixelRef)(size_t allocSize, const SkImageInfo& info, size_t rowBytes); 51 static sk_sp<Bitmap> allocateBitmap(SkBitmap* bitmap, AllocPixelRef alloc) { in allocateBitmap() 74 sk_sp<Bitmap> Bitmap::allocateAshmemBitmap(SkBitmap* bitmap) { in allocateAshmemBitmap() 75 return allocateBitmap(bitmap, &Bitmap::allocateAshmemBitmap); in allocateAshmemBitmap() 78 sk_sp<Bitmap> Bitmap::allocateAshmemBitmap(size_t size, const SkImageInfo& info, size_t rowBytes) { in allocateAshmemBitmap() 96 return sk_sp<Bitmap>(new Bitmap(addr, fd, size, info, rowBytes)); in allocateAshmemBitmap() 99 sk_sp<Bitmap> Bitmap::allocateHardwareBitmap(const SkBitmap& bitmap) { in allocateHardwareBitmap() 103 sk_sp<Bitmap> Bitmap::allocateHeapBitmap(SkBitmap* bitmap) { in allocateHeapBitmap() 104 return allocateBitmap(bitmap, &Bitmap::allocateHeapBitmap); in allocateHeapBitmap() 107 sk_sp<Bitmap> Bitmap::allocateHeapBitmap(const SkImageInfo& info) { in allocateHeapBitmap() [all …]
|
D | Bitmap.h | 55 class ANDROID_API Bitmap : public SkPixelRef { 66 static sk_sp<Bitmap> allocateAshmemBitmap(SkBitmap* bitmap); 67 static sk_sp<Bitmap> allocateHardwareBitmap(const SkBitmap& bitmap); 68 static sk_sp<Bitmap> allocateHeapBitmap(SkBitmap* bitmap); 69 static sk_sp<Bitmap> allocateHeapBitmap(const SkImageInfo& info); 74 static sk_sp<Bitmap> createFrom(sp<GraphicBuffer> graphicBuffer, 79 static sk_sp<Bitmap> createFrom(const SkImageInfo& info, size_t rowBytes, int fd, void* addr, 81 static sk_sp<Bitmap> createFrom(const SkImageInfo&, SkPixelRef&); 132 static sk_sp<Bitmap> allocateAshmemBitmap(size_t size, const SkImageInfo& i, size_t rowBytes); 133 static sk_sp<Bitmap> allocateHeapBitmap(size_t size, const SkImageInfo& i, size_t rowBytes); [all …]
|
/frameworks/base/core/tests/coretests/src/android/graphics/drawable/ |
D | IconTest.java | 21 import android.graphics.Bitmap; 48 final Bitmap bm1 = Bitmap.createBitmap(100, 200, Bitmap.Config.ARGB_8888); in testWithBitmap() 49 final Bitmap bm2 = Bitmap.createBitmap(100, 200, Bitmap.Config.RGB_565); in testWithBitmap() 50 final Bitmap bm3 = ((BitmapDrawable) getContext().getDrawable(R.drawable.landscape)) in testWithBitmap() 66 final Bitmap test1 = Bitmap.createBitmap(draw1.getIntrinsicWidth(), in testWithBitmap() 67 draw1.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); in testWithBitmap() 68 final Bitmap test2 = Bitmap.createBitmap(draw2.getIntrinsicWidth(), in testWithBitmap() 69 draw2.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); in testWithBitmap() 70 final Bitmap test3 = Bitmap.createBitmap(draw3.getIntrinsicWidth(), in testWithBitmap() 71 draw3.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); in testWithBitmap() [all …]
|
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() 67 final Bitmap bm_org = bm_test.copy(Config.ARGB_8888, false); 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() 196 Bitmap bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888); in testSetAlpha() 217 boolean equalBitmaps(Bitmap a, Bitmap b) { in equalBitmaps() [all …]
|
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/ |
D | BitmapUtils.java | 19 import android.graphics.Bitmap; 20 import android.graphics.Bitmap.CompressFormat; 115 public static Bitmap resizeBitmapByScale( in resizeBitmapByScale() 116 Bitmap bitmap, float scale, boolean recycle) { in resizeBitmapByScale() 121 Bitmap target = Bitmap.createBitmap(width, height, getConfig(bitmap)); in resizeBitmapByScale() 130 private static Bitmap.Config getConfig(Bitmap bitmap) { in getConfig() 131 Bitmap.Config config = bitmap.getConfig(); in getConfig() 133 config = Bitmap.Config.ARGB_8888; in getConfig() 138 public static Bitmap resizeDownBySideLength( in resizeDownBySideLength() 139 Bitmap bitmap, int maxLength, boolean recycle) { in resizeDownBySideLength() [all …]
|
/frameworks/base/media/java/android/media/ |
D | MediaMetadataRetriever.java | 26 import android.graphics.Bitmap; 261 public Bitmap getFrameAtTime(long timeUs, @Option int option) { in getFrameAtTime() 305 public Bitmap getScaledFrameAtTime( in getScaledFrameAtTime() 345 public Bitmap getFrameAtTime(long timeUs) { in getFrameAtTime() 367 public Bitmap getFrameAtTime() { in getFrameAtTime() 371 private native Bitmap _getFrameAtTime(long timeUs, int option, int width, int height); in _getFrameAtTime() 374 private Bitmap.Config inPreferredConfig = Bitmap.Config.ARGB_8888; 375 private Bitmap.Config outActualConfig = Bitmap.Config.ARGB_8888; 393 public void setPreferredConfig(@NonNull Bitmap.Config config) { in setPreferredConfig() 405 public @NonNull Bitmap.Config getPreferredConfig() { in getPreferredConfig() [all …]
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
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() 122 result = bitmap.copy(Bitmap.Config.ARGB_8888, false); in convertToFrameType() 136 private void validateBitmapSize(Bitmap bitmap, int[] dimensions) { in validateBitmapSize() [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | BitmapFactory.java | 104 public Bitmap inBitmap; 146 public Bitmap.Config inPreferredConfig = Bitmap.Config.ARGB_8888; 390 public Bitmap.Config outConfig; 440 if (opts.inBitmap.getConfig() == Bitmap.Config.HARDWARE) { in validate() 450 if (opts.inMutable && opts.inPreferredConfig == Bitmap.Config.HARDWARE) { in validate() 510 public static Bitmap decodeFile(String pathName, Options opts) { in decodeFile() 512 Bitmap bm = null; in decodeFile() 541 public static Bitmap decodeFile(String pathName) { in decodeFile() 555 public static Bitmap decodeResourceStream(@Nullable Resources res, @Nullable TypedValue value, in decodeResourceStream() 595 public static Bitmap decodeResource(Resources res, int id, Options opts) { in decodeResource() [all …]
|
D | Bitmap.java | 48 public final class Bitmap implements Parcelable { class 130 Bitmap(long nativeBitmap, int width, int height, int density, in Bitmap() method in Bitmap 138 Bitmap(long nativeBitmap, int width, int height, int density, in Bitmap() method in Bitmap 161 Bitmap.class.getClassLoader(), nativeGetNativeFinalizer(), allocationByteCount); in Bitmap() 164 Bitmap.class.getClassLoader(), nativeGetNativeFinalizer(), allocationByteCount); in Bitmap() 683 public Bitmap copy(Config config, boolean isMutable) { in copy() 689 Bitmap b = nativeCopy(mNativePtr, config.nativeInt, isMutable); in copy() 705 public Bitmap createAshmemBitmap() { in createAshmemBitmap() 708 Bitmap b = nativeCopyAshmem(mNativePtr); in createAshmemBitmap() 724 public Bitmap createAshmemBitmap(Config config) { in createAshmemBitmap() [all …]
|
/frameworks/rs/tests/java_api/SSHealingBrush/src/rs/example/android/com/healingbrush/ |
D | Healing.java | 19 import android.graphics.Bitmap; 40 Bitmap mUndoBitmap; 49 private static Bitmap buildMask(Rect rec, float[] xy) { in buildMask() 50 Bitmap bitmap = Bitmap.createBitmap(rec.width(), rec.height(), Bitmap.Config.ALPHA_8); in buildMask() 76 public void heal(ScriptC_healing healing, RenderScript rs, Bitmap image, Bitmap output) { in heal() 84 Bitmap mask_bitmap = buildMask(mRoiBounds, mPointsXY); in heal() 85 Bitmap dest_bitmap = createMutableBitmap(image, mRoiBounds.left, mRoiBounds.top, in heal() 88 Bitmap src_bitmap = createMutableBitmap(image, mCutOffsetX, mCutOffsetY, in heal() 100 mUndoBitmap = Bitmap.createBitmap(mRoiBounds.width(), mRoiBounds.height(), in heal() 101 Bitmap.Config.ARGB_8888); in heal() [all …]
|
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/ |
D | GlifPatternDrawableTest.java | 22 import android.graphics.Bitmap; 50 final Bitmap bitmap = Bitmap.createBitmap(1366, 768, Bitmap.Config.ARGB_8888); in testDraw() 67 final Bitmap bitmap = Bitmap.createBitmap(1366, 768, Bitmap.Config.ARGB_8888); in testDrawTwice() 90 Bitmap mockBitmapCache = Bitmap.createBitmap(1366, 768, Bitmap.Config.ALPHA_8); in testScaleToCanvasSquare() 106 Bitmap mockBitmapCache = Bitmap.createBitmap(1366, 768, Bitmap.Config.ALPHA_8); in testScaleToCanvasTall() 123 Bitmap mockBitmapCache = Bitmap.createBitmap(1366, 768, Bitmap.Config.ALPHA_8); in testScaleToCanvasWide() 140 Bitmap mockBitmapCache = Bitmap.createBitmap(2049, 1152, Bitmap.Config.ALPHA_8); in testScaleToCanvasMaxSize()
|
/frameworks/base/packages/SystemUI/src/com/android/keyguard/clock/ |
D | ClockInfo.java | 18 import android.graphics.Bitmap; 30 private final Supplier<Bitmap> mThumbnail; 31 private final Supplier<Bitmap> mPreview; 34 Supplier<Bitmap> thumbnail, Supplier<Bitmap> preview) { in ClockInfo() 66 Bitmap getThumbnail() { in getThumbnail() 73 Bitmap getPreview() { in getPreview() 85 private Supplier<Bitmap> mThumbnail; 86 private Supplier<Bitmap> mPreview; 107 public Builder setThumbnail(Supplier<Bitmap> thumbnail) { in setThumbnail() 112 public Builder setPreview(Supplier<Bitmap> preview) { in setPreview()
|
/frameworks/rs/tests/java_api/Refocus/src/com/android/rs/test/ |
D | RGBZ.java | 21 import android.graphics.Bitmap; 41 private Bitmap bitmap; 42 private Bitmap preview; 43 private Bitmap depthBitmap; 85 public RGBZ(Bitmap image, DepthImage depthImage) { in RGBZ() 96 Bitmap image = BitmapFactory.decodeStream(contentResolver.openInputStream(uriImage)); in createFromBitmapDepthmap() 107 Bitmap image = BitmapFactory.decodeStream(contentResolver.openInputStream(uriImage)); in createFromPFMDepthmap() 127 public Bitmap getBitmap() { in getBitmap() 183 public Bitmap setAlphaChannel(Bitmap bitmap, Bitmap depthBitmap) { in setAlphaChannel() 187 Bitmap result = bitmap.copy(Bitmap.Config.ARGB_8888, true); in setAlphaChannel() [all …]
|
/frameworks/base/packages/WallpaperCropper/src/com/android/photos/ |
D | BitmapRegionTileSource.java | 22 import android.graphics.Bitmap; 23 import android.graphics.Bitmap.Config; 49 Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options); in decodeRegion() 89 public Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options) { in decodeRegion() 95 Bitmap mBuffer; 98 private DumbBitmapRegionDecoder(Bitmap b) { in DumbBitmapRegionDecoder() 102 Bitmap b = BitmapFactory.decodeFile(pathName); in newInstance() 109 Bitmap b = BitmapFactory.decodeStream(is); in newInstance() 121 public Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options) { in decodeRegion() 128 Bitmap newBitmap = Bitmap.createBitmap( in decodeRegion() [all …]
|
/frameworks/rs/tests/java_api/HealingBrush/src/rs/example/android/com/healingbrush/ |
D | Healing.java | 19 import android.graphics.Bitmap; 40 Bitmap mUndoBitmap; 49 private static Bitmap buildMask(Rect rec, float[] xy) { in buildMask() 50 Bitmap bitmap = Bitmap.createBitmap(rec.width(), rec.height(), Bitmap.Config.ALPHA_8); in buildMask() 76 public void heal(ScriptC_healing healing, RenderScript rs, Bitmap image, Bitmap output) { in heal() 83 Bitmap maskBitmap = buildMask(mRoiBounds, mPointsXY); in heal() 90 Bitmap destBitmap = createMutableBitmap(image, mRoiBounds.left, mRoiBounds.top, in heal() 95 Bitmap src = createMutableBitmap(image, mCutOffsetX, mCutOffsetY, in heal() 133 mUndoBitmap = Bitmap.createBitmap(mRoiBounds.width(), mRoiBounds.height(), in heal() 134 Bitmap.Config.ARGB_8888); in heal() [all …]
|
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/ |
D | UploadedTexture.java | 19 import android.graphics.Bitmap; 20 import android.graphics.Bitmap.Config; 47 private static HashMap<BorderKey, Bitmap> sBorderLines = 48 new HashMap<BorderKey, Bitmap>(); 62 protected Bitmap mBitmap; 118 private static Bitmap getBorderLine( in getBorderLine() 124 Bitmap bitmap = sBorderLines.get(key); in getBorderLine() 127 ? Bitmap.createBitmap(1, length, config) in getBorderLine() 128 : Bitmap.createBitmap(length, 1, config); in getBorderLine() 134 private Bitmap getBitmap() { in getBitmap() [all …]
|
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()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/glwallpaper/ |
D | ImageProcessHelper.java | 19 import android.graphics.Bitmap; 69 void start(Bitmap bitmap) { in start() 77 private static class ThresholdComputeTask extends AsyncTask<Bitmap, Void, Float> { 86 protected Float doInBackground(Bitmap... bitmaps) { in doInBackground() 87 Bitmap bitmap = bitmaps[0]; in doInBackground() 103 public float compute(Bitmap bitmap) { in compute() 104 Bitmap grayscale = toGrayscale(bitmap); in compute() 115 private Bitmap toGrayscale(Bitmap bitmap) { in toGrayscale() 119 Bitmap grayscale = Bitmap.createBitmap(width, height, bitmap.getConfig()); in toGrayscale() 129 private int[] getHistogram(Bitmap grayscale) { in getHistogram() [all …]
|
/frameworks/base/tests/UiBench/src/com/android/test/uibench/leanback/ |
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()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/ |
D | MediaArtworkProcessorTest.kt | 21 import android.graphics.Bitmap 63 val artwork = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ARGB_8888) in testProcessArtwork() 70 assertThat(background.config).isEqualTo(Bitmap.Config.ARGB_8888) in testProcessArtwork() 76 val artwork = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ARGB_8888) in testCache() 89 val artwork = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ALPHA_8) in testConfig() 94 assertThat(background.config).isEqualTo(Bitmap.Config.ARGB_8888) in testConfig() 100 val artwork = Bitmap.createBitmap(WIDTH, HEIGHT, Bitmap.Config.ARGB_8888) in testRecycledArtwork()
|
/frameworks/base/tests/CanvasCompare/src/com/android/test/hwuicompare/ |
D | CompareActivity.java | 25 import android.graphics.Bitmap; 39 protected Bitmap mSoftwareBitmap; 40 protected Bitmap mHardwareBitmap; 67 mSoftwareBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in onCreateCommon() 68 mHardwareBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in onCreateCommon() 83 mSoftwareBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in loadBitmaps() 84 mHardwareBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in loadBitmaps() 101 .getDeclaredMethod("copyInto", Bitmap.class); in loadBitmaps()
|
/frameworks/rs/tests/java_api/HelloComputeNDK/src/com/example/android/rs/hellocomputendk/ |
D | HelloComputeNDK.java | 22 import android.graphics.Bitmap; 26 private Bitmap mBitmapIn; 27 private Bitmap mBitmapOut; 33 native void nativeMono(String cacheDir, int X, int Y, Bitmap in, Bitmap out); in nativeMono() 41 mBitmapOut = Bitmap.createBitmap(mBitmapIn.getWidth(), mBitmapIn.getHeight(), in onCreate() 56 private Bitmap loadBitmap(int resource) { in loadBitmap() 58 options.inPreferredConfig = Bitmap.Config.ARGB_8888; in loadBitmap()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | MediaArtworkProcessor.kt | 20 import android.graphics.Bitmap 45 private var mArtworkCache: Bitmap? = null 47 fun processArtwork(context: Context, artwork: Bitmap): Bitmap? { in processArtwork() 55 var inBitmap: Bitmap? = null in processArtwork() 60 inBitmap = Bitmap.createScaledBitmap(artwork, rect.width(), rect.height(), in processArtwork() 64 if (inBitmap.config != Bitmap.Config.ARGB_8888) { in processArtwork() 66 inBitmap = oldIn.copy(Bitmap.Config.ARGB_8888, false /* isMutable */) in processArtwork() 69 val outBitmap = Bitmap.createBitmap(inBitmap.width, inBitmap.height, in processArtwork() 70 Bitmap.Config.ARGB_8888) in processArtwork()
|