Home
last modified time | relevance | path

Searched refs:Bitmap (Results 1 – 25 of 629) sorted by relevance

12345678910>>...26

/frameworks/base/core/tests/coretests/src/android/graphics/
DGraphicsPerformanceTests.java77 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 …]
DBitmapTest.java33 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/
DBitmap.cpp45 bool Bitmap::computeAllocationSize(size_t rowBytes, int height, size_t* size) { in computeAllocationSize()
51 typedef sk_sp<Bitmap> (*AllocPixelRef)(size_t allocSize, const SkImageInfo& info, size_t rowBytes);
53 static sk_sp<Bitmap> allocateBitmap(SkBitmap* bitmap, AllocPixelRef alloc) { in allocateBitmap()
65 if (!Bitmap::computeAllocationSize(rowBytes, bitmap->height(), &size)) { in allocateBitmap()
76 sk_sp<Bitmap> Bitmap::allocateAshmemBitmap(SkBitmap* bitmap) { in allocateAshmemBitmap()
77 return allocateBitmap(bitmap, &Bitmap::allocateAshmemBitmap); in allocateAshmemBitmap()
80 sk_sp<Bitmap> Bitmap::allocateAshmemBitmap(size_t size, const SkImageInfo& info, size_t rowBytes) { in allocateAshmemBitmap()
99 return sk_sp<Bitmap>(new Bitmap(addr, fd, size, info, rowBytes)); in allocateAshmemBitmap()
101 return Bitmap::allocateHeapBitmap(size, info, rowBytes); in allocateAshmemBitmap()
105 sk_sp<Bitmap> Bitmap::allocateHardwareBitmap(const SkBitmap& bitmap) { in allocateHardwareBitmap()
[all …]
DBitmap.h59 class Bitmap : public SkPixelRef {
70 static sk_sp<Bitmap> allocateAshmemBitmap(SkBitmap* bitmap);
71 static sk_sp<Bitmap> allocateHardwareBitmap(const SkBitmap& bitmap);
72 static sk_sp<Bitmap> allocateHeapBitmap(SkBitmap* bitmap);
73 static sk_sp<Bitmap> allocateHeapBitmap(const SkImageInfo& info);
74 static sk_sp<Bitmap> allocateHeapBitmap(size_t size, const SkImageInfo& i, size_t rowBytes);
80 static sk_sp<Bitmap> createFrom(AHardwareBuffer* hardwareBuffer,
84 static sk_sp<Bitmap> createFrom(AHardwareBuffer* hardwareBuffer,
90 static sk_sp<Bitmap> createFrom(const SkImageInfo& info, size_t rowBytes, int fd, void* addr,
92 static sk_sp<Bitmap> createFrom(const SkImageInfo&, SkPixelRef&);
[all …]
/frameworks/base/core/tests/coretests/src/android/graphics/drawable/
DIconTest.java21 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 …]
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/
DBitmapUtils.java19 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/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DFrameImage2D.java19 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/
DBitmapFactory.java105 public Bitmap inBitmap;
147 public Bitmap.Config inPreferredConfig = Bitmap.Config.ARGB_8888;
391 public Bitmap.Config outConfig;
441 if (opts.inBitmap.getConfig() == Bitmap.Config.HARDWARE) { in validate()
451 if (opts.inMutable && opts.inPreferredConfig == Bitmap.Config.HARDWARE) { in validate()
511 public static Bitmap decodeFile(String pathName, Options opts) { in decodeFile()
513 Bitmap bm = null; in decodeFile()
542 public static Bitmap decodeFile(String pathName) { in decodeFile()
556 public static Bitmap decodeResourceStream(@Nullable Resources res, @Nullable TypedValue value, in decodeResourceStream()
596 public static Bitmap decodeResource(Resources res, int id, Options opts) { in decodeResource()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/keyguard/clock/
DClockInfo.java18 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/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/
DGlifPatternDrawableTest.java22 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/rs/tests/java_api/SSHealingBrush/src/rs/example/android/com/healingbrush/
DHealing.java19 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/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/
DBitmapRenderer.java19 import android.graphics.Bitmap;
20 import android.graphics.Bitmap.Config;
35 static Bitmap createSoftwareBitmap(int width, int height, BitmapRenderer renderer) { in createSoftwareBitmap()
37 Bitmap result = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in createSoftwareBitmap()
43 static Bitmap createHardwareBitmap(int width, int height, BitmapRenderer renderer) { in createHardwareBitmap()
52 return Bitmap.createBitmap(picture); in createHardwareBitmap()
59 static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height) { in createBitmap()
65 return Bitmap.createBitmap(source, x, y, width, height); in createBitmap()
/frameworks/rs/tests/java_api/Refocus/src/com/android/rs/test/
DRGBZ.java21 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/libs/hwui/apex/include/android/graphics/
Dbitmap.h86 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
/frameworks/rs/tests/java_api/HealingBrush/src/rs/example/android/com/healingbrush/
DHealing.java19 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/opengl/java/android/opengl/
DGLUtils.java19 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()
264 private static native int native_getInternalFormat(Bitmap bitmap); in native_getInternalFormat()
265 private static native int native_getType(Bitmap bitmap); in native_getType()
[all …]
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/
DBitmapTexture.java19 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()
DUploadedTexture.java19 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 …]
/frameworks/base/packages/WallpaperCropper/src/com/android/photos/
DBitmapRegionTileSource.java22 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/base/tests/UiBench/src/com/android/test/uibench/leanback/
DBitmapLoader.java19 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/
DMediaArtworkProcessorTest.kt21 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/
DCompareActivity.java25 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/base/media/java/android/media/
DMediaMetadataRetriever.java30 import android.graphics.Bitmap;
568 public @Nullable Bitmap getFrameAtTime(long timeUs, @Option int option) { in getFrameAtTime()
614 public @Nullable Bitmap getFrameAtTime( in getFrameAtTime()
656 public @Nullable Bitmap getScaledFrameAtTime(long timeUs, @Option int option, in getScaledFrameAtTime()
701 public @Nullable Bitmap getScaledFrameAtTime(long timeUs, @Option int option, in getScaledFrameAtTime()
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;
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/
DRotationAnimationUtilsTest.java19 import static android.graphics.Bitmap.Config.ARGB_8888;
23 import android.graphics.Bitmap;
53 Bitmap swBitmap = createBitmap(0); in blackLuma()
61 Bitmap swBitmap = createBitmap(1); in whiteLuma()
69 Bitmap swBitmap = createBitmap(1, BITMAP_WIDTH + 1, BITMAP_HEIGHT + 1); in unevenBitmapDimens()
77 Bitmap swBitmap = createBitmap(1); in whiteImageBlackBorderLuma()
86 Bitmap swBitmap = createBitmap(0); in blackImageWhiteBorderLuma()
135 private Bitmap createBitmap(float luma) { in createBitmap()
139 private Bitmap createBitmap(float luma, int width, int height) { in createBitmap()
140 Bitmap bitmap = Bitmap.createBitmap(width, height, ARGB_8888); in createBitmap()
[all …]
/frameworks/rs/tests/java_api/HelloComputeNDK/src/com/example/android/rs/hellocomputendk/
DHelloComputeNDK.java22 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()

12345678910>>...26