/frameworks/support/viewpager/src/androidTest/java/android/support/v4/testutils/ |
H A D | TestUtils.java | 63 // 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 D | BitmapDrawable.java | 58 * 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><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 D | SpriteController.h | 59 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 D | MediaNotificationProcessor.java | 101 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 D | SliceViewUtil.java | 164 // 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 D | BitmapFactory.cpp | 105 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 D | Graphics.cpp | 357 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 D | GraphicsJNI.h | 65 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 D | AnimatedVectorDrawableTest.java | 155 * 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 D | DrawableUtils.java | 33 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 D | BitmapUtils.java | 30 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 D | android_view_PointerIcon.h | 71 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 D | LockscreenWallpaper.java | 97 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 D | AvgBrightnessFilterTest.java | 47 Bitmap bitmap = BitmapFactory.decodeStream(assetMgr.open("0002_000390.jpg")); 48 image.setBitmap(bitmap);
|
H A D | ContrastRatioFilterTest.java | 55 Bitmap bitmap = BitmapFactory.decodeStream(assetMgr.open("0002_000390.jpg")); 56 image.setBitmap(bitmap);
|
H A D | ExposureFilterTest.java | 52 Bitmap bitmap = BitmapFactory.decodeStream(assetMgr.open("0002_000390.jpg")); 53 image.setBitmap(bitmap);
|
/frameworks/minikin/include/minikin/ |
H A D | SparseBitSet.h | 51 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 D | BitmapView.java | 24 import com.android.bitmap.drawable.ExtendedBitmapDrawable; 25 import com.android.bitmap.view.BitmapDrawableImageView;
|
/frameworks/support/compat/src/main/java/androidx/core/view/ |
H A D | PointerIconCompat.java | 138 * 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 D | RoundedBitmapDrawableActivity.java | 45 // 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 D | ConsistencyTest.java | 37 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 D | RoundedBitmapDrawableActivity.java | 45 // 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 D | TransitionUtils.java | 43 * 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 D | RenderProxy.cpp | 159 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 D | OverlayListView.java | 86 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.
|