Searched refs:bitmap (Results 101 - 125 of 388) sorted by relevance

1234567891011>>

/frameworks/support/viewpager/src/androidTest/java/android/support/v4/testutils/
H A DTestUtils.java63 // Create a bitmap
64 Bitmap bitmap = Bitmap.createBitmap(drawableWidth, drawableHeight, Bitmap.Config.ARGB_8888);
65 // Create a canvas that wraps the bitmap
66 Canvas canvas = new Canvas(bitmap);
69 // And ask the drawable to draw itself to the canvas / bitmap
75 bitmap.getPixels(rowPixels, 0, drawableWidth, 0, row, drawableWidth, 1);
95 bitmap.recycle();
/frameworks/base/graphics/java/android/graphics/drawable/
H A DBitmapDrawable.java58 * A Drawable that wraps a bitmap and can be tiled, stretched, or aligned. You can create a
61 * <p>It can be defined in an XML file with the <code>&lt;bitmap></code> element. For more
66 * transformation of raw bitmap graphics, and should be used when drawing to a
112 * instead to specify a bitmap to draw with and ensure the correct density is set.
124 * instead to specify a bitmap to draw with.
133 * Create drawable from a bitmap, not dealing with density.
138 public BitmapDrawable(Bitmap bitmap) { argument
139 init(new BitmapState(bitmap), null);
143 * Create drawable from a bitmap, setting initial target density based on
146 public BitmapDrawable(Resources res, Bitmap bitmap) { argument
241 setBitmap(Bitmap bitmap) argument
573 updateShaderMatrix(@onNull Bitmap bitmap, @NonNull Paint paint, @NonNull Shader shader, boolean needMirroring) argument
998 BitmapState(Bitmap bitmap) argument
[all...]
/frameworks/base/libs/input/
H A DSpriteController.h59 inline SpriteIcon(const SkBitmap& bitmap, float hotSpotX, float hotSpotY) : argument
60 bitmap(bitmap), hotSpotX(hotSpotX), hotSpotY(hotSpotY) { }
62 SkBitmap bitmap; member in struct:android::SpriteIcon
68 if (bitmapCopy.tryAllocPixels(bitmap.info().makeColorType(kN32_SkColorType))) {
69 bitmap.readPixels(bitmapCopy.info(), bitmapCopy.getPixels(), bitmapCopy.rowBytes(),
76 bitmap.reset();
82 return !bitmap.isNull() && !bitmap.empty();
105 /* Sets the bitmap tha
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
H A DMediaNotificationProcessor.java101 Bitmap bitmap = null;
118 bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
119 Canvas canvas = new Canvas(bitmap);
125 Palette.Builder paletteBuilder = Palette.from(bitmap)
126 .setRegion(0, 0, bitmap.getWidth() / 2, bitmap.getHeight())
133 paletteBuilder.setRegion((int) (bitmap.getWidth() * textColorStartWidthFraction), 0,
134 bitmap.getWidth(),
135 bitmap.getHeight());
/frameworks/support/slices/view/src/main/java/androidx/slice/widget/
H A DSliceViewUtil.java164 // XXX better way to convert from icon -> bitmap or crop an icon (?)
180 public static @NonNull Bitmap getCircularBitmap(Bitmap bitmap) { argument
181 Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
182 bitmap.getHeight(), Config.ARGB_8888);
185 final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
188 canvas.drawCircle(bitmap.getWidth() / 2, bitmap.getHeight() / 2,
189 bitmap.getWidth() / 2, paint);
191 canvas.drawBitmap(bitmap, rec
[all...]
/frameworks/base/core/jni/android/graphics/
H A DBitmapFactory.cpp105 virtual bool allocPixelRef(SkBitmap* bitmap) { argument
107 const int bytesPerPixel = SkColorTypeBytesPerPixel(bitmap->colorType());
109 int(bitmap->width() * mScale + 0.5f) *
110 int(bitmap->height() * mScale + 0.5f);
112 ALOGW("bitmap for alloc reuse (%d bytes) can't fit scaled bitmap (%d bytes)",
116 return SkBitmap::HeapAllocator::allocPixelRef(bitmap);
125 RecyclingPixelAllocator(android::Bitmap* bitmap, unsigned int size) argument
126 : mBitmap(bitmap), mSize(size) {
132 virtual bool allocPixelRef(SkBitmap* bitmap) { argument
520 jobject bitmap = NULL; local
[all...]
H A DGraphics.cpp357 void GraphicsJNI::getSkBitmap(JNIEnv* env, jobject bitmap, SkBitmap* outBitmap) { argument
358 bitmap::toBitmap(env, bitmap).getSkBitmap(outBitmap);
362 android::Bitmap& bitmap = android::bitmap::toBitmap(env, jbitmap); local
363 bitmap.ref();
364 return &bitmap;
413 jobject GraphicsJNI::createBitmapRegionDecoder(JNIEnv* env, SkBitmapRegionDecoder* bitmap) argument
415 ALOG_ASSERT(bitmap != NULL);
419 reinterpret_cast<jlong>(bitmap));
435 mapAshmemBitmap(JNIEnv* env, SkBitmap* bitmap, int fd, void* addr, size_t size, bool readOnly) argument
610 allocPixelRef(SkBitmap* bitmap) argument
627 allocPixelRef(SkBitmap* bitmap) argument
717 allocPixelRef(SkBitmap* bitmap) argument
[all...]
H A DGraphicsJNI.h65 static void getSkBitmap(JNIEnv*, jobject bitmap, SkBitmap* outBitmap);
66 static SkPixelRef* refSkPixelRef(JNIEnv*, jobject bitmap);
87 static jobject createBitmapRegionDecoder(JNIEnv* env, SkBitmapRegionDecoder* bitmap);
89 static android::Bitmap* mapAshmemBitmap(JNIEnv* env, SkBitmap* bitmap,
93 * Given a bitmap we natively allocate a memory block to store the contents
94 * of that bitmap. The memory is then attached to the bitmap via an
98 static bool allocatePixels(JNIEnv* env, SkBitmap* bitmap);
100 /** Copy the colors in colors[] to the bitmap, convert to the correct
126 virtual bool allocPixelRef(SkBitmap* bitmap) overrid
[all...]
/frameworks/support/graphics/drawable/animated/src/androidTest/java/androidx/vectordrawable/graphics/drawable/tests/
H A DAnimatedVectorDrawableTest.java155 * Render AVD sequence in an bitmap for several frames with the same content, and make sure
163 final Bitmap bitmap = Bitmap.createBitmap(IMAGE_WIDTH, IMAGE_WIDTH,
165 final Canvas c = new Canvas(bitmap);
178 // First make sure the content is drawn into the bitmap.
180 bitmap.eraseColor(0);
187 int centerColor = bitmap.getPixel(IMAGE_WIDTH / 2 , IMAGE_WIDTH / 2);
189 Bitmap firstFrame = Bitmap.createBitmap(bitmap);
197 bitmap.eraseColor(0);
205 saveVectorDrawableIntoPNG(mResources, bitmap, -1, "correctness_" + i);
207 compareImages(firstFrame, bitmap, "correctness
331 verifyRedOnly(final int pixelX, final int pixelY, final View button, final Bitmap bitmap, final Canvas canvas, final CountDownLatch latch) argument
[all...]
H A DDrawableUtils.java33 public static void saveVectorDrawableIntoPNG(Resources resource, Bitmap bitmap, int resId, argument
62 bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
/frameworks/base/apct-tests/perftests/utils/src/android/perftests/utils/
H A DBitmapUtils.java30 public static void saveBitmapIntoPNG(Context context, Bitmap bitmap, int resId) { argument
46 bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
/frameworks/base/core/jni/
H A Dandroid_view_PointerIcon.h71 SkBitmap bitmap; member in struct:android::PointerIcon
83 bitmap.reset();
95 /* Loads the bitmap associated with a pointer icon.
105 /* Loads the bitmap associated with a pointer icon by style.
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
H A DLockscreenWallpaper.java97 mUpdateMonitor.setHasLockscreenWallpaper(result.bitmap != null);
98 mCache = result.bitmap;
194 mCache = result.bitmap;
195 mUpdateMonitor.setHasLockscreenWallpaper(result.bitmap != null);
206 public final Bitmap bitmap; field in class:LockscreenWallpaper.LoaderResult
208 LoaderResult(boolean success, Bitmap bitmap) { argument
210 this.bitmap = bitmap;
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/src/androidx/media/filterfw/samples/simplecamera/
H A DAvgBrightnessFilterTest.java47 Bitmap bitmap = BitmapFactory.decodeStream(assetMgr.open("0002_000390.jpg"));
48 image.setBitmap(bitmap);
H A DContrastRatioFilterTest.java55 Bitmap bitmap = BitmapFactory.decodeStream(assetMgr.open("0002_000390.jpg"));
56 image.setBitmap(bitmap);
H A DExposureFilterTest.java52 Bitmap bitmap = BitmapFactory.decodeStream(assetMgr.open("0002_000390.jpg"));
53 image.setBitmap(bitmap);
/frameworks/minikin/include/minikin/
H A DSparseBitSet.h51 const uint32_t* bitmap = &mBitmaps[mIndices[ch >> kLogValuesPerPage]]; local
53 return (bitmap[index >> kLogBitsPerEl] & (kElFirst >> (index & kElMask))) != 0;
/frameworks/opt/bitmap/sample/src/com/example/bitmapsample/
H A DBitmapView.java24 import com.android.bitmap.drawable.ExtendedBitmapDrawable;
25 import com.android.bitmap.view.BitmapDrawableImageView;
/frameworks/support/compat/src/main/java/androidx/core/view/
H A DPointerIconCompat.java138 * Creates a custom pointer from the given bitmap and hotspot information.
140 * @param bitmap The bitmap for the icon.
141 * @param hotSpotX The X offset of the pointer icon hotspot in the bitmap.
142 * Must be within the [0, bitmap.getWidth()) range.
143 * @param hotSpotY The Y offset of the pointer icon hotspot in the bitmap.
144 * Must be within the [0, bitmap.getHeight()) range.
145 * @return A pointer icon for this bitmap.
147 * @throws IllegalArgumentException if bitmap is null, or if the x/y hotspot
150 public static PointerIconCompat create(Bitmap bitmap, floa argument
[all...]
/frameworks/support/frameworks/support/samples/Support4Demos/src/main/java/com/example/android/supportv4/graphics/
H A DRoundedBitmapDrawableActivity.java45 // Create a bitmap and set it circular.
46 Bitmap bitmap = BitmapFactory.decodeResource(getResources(), IMAGE_RES);
47 mRoundedBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), bitmap);
/frameworks/support/palette/src/androidTest/java/androidx/palette/graphics/
H A DConsistencyTest.java37 final Bitmap bitmap = TestUtils.loadSampleBitmap();
40 Palette newPalette = Palette.from(bitmap).generate();
/frameworks/support/samples/Support4Demos/src/main/java/com/example/android/supportv4/graphics/
H A DRoundedBitmapDrawableActivity.java45 // Create a bitmap and set it circular.
46 Bitmap bitmap = BitmapFactory.decodeResource(getResources(), IMAGE_RES);
47 mRoundedBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), bitmap);
/frameworks/support/transition/src/main/java/androidx/transition/
H A DTransitionUtils.java43 * Creates a View using the bitmap copy of <code>view</code>. If <code>view</code> is large,
44 * the copy will use a scaled bitmap of the given view.
64 Bitmap bitmap = createViewBitmap(view, matrix, bounds, sceneRoot);
65 if (bitmap != null) {
66 copy.setImageBitmap(bitmap);
77 * coordinates. <code>matrix</code> will be modified during the bitmap creation.
79 * <p>If the bitmap is large, it will be scaled uniformly down to at most 1MB size.</p>
81 * @param view The view to create a bitmap for.
83 * the bitmap will be displayed in. <code>matrix</code> will be modified before
85 * @param bounds The bounds of the bitmap i
[all...]
/frameworks/base/libs/hwui/renderthread/
H A DRenderProxy.cpp159 bool RenderProxy::copyLayerInto(DeferredLayerUpdater* layer, SkBitmap& bitmap) { argument
161 [&]() -> bool { return mContext->copyLayerInto(layer, &bitmap); });
298 SkBitmap* bitmap) {
301 return thread.readback().copySurfaceInto(*surface, Rect(left, top, right, bottom), bitmap);
305 void RenderProxy::prepareToDraw(Bitmap& bitmap) {
312 bitmap.ref();
313 auto task = [renderThread, &bitmap]() {
314 CanvasContext::prepareToDraw(*renderThread, &bitmap);
315 bitmap.unref();
332 sk_sp<Bitmap> RenderProxy::allocateHardwareBitmap(SkBitmap& bitmap) {
[all...]
/frameworks/av/packages/MediaComponents/src/com/android/support/mediarouter/app/
H A DOverlayListView.java86 BitmapDrawable bitmap = object.getBitmapDrawable();
87 if (bitmap != null) {
88 bitmap.draw(canvas);
115 public OverlayObject(BitmapDrawable bitmap, Rect startRect) { argument
116 mBitmap = bitmap;
126 * Returns the bitmap that this object represents.

Completed in 613 milliseconds

1234567891011>>