Searched refs:bitmap (Results 1 - 25 of 388) sorted by relevance

1234567891011>>

/frameworks/base/opengl/java/android/opengl/
H A DGLUtils.java36 * return the internal format as defined by OpenGL ES of the supplied bitmap.
37 * @param bitmap
38 * @return the internal format of the bitmap.
40 public static int getInternalFormat(Bitmap bitmap) { argument
41 if (bitmap == null) {
44 if (bitmap.isRecycled()) {
45 throw new IllegalArgumentException("bitmap is recycled");
47 int result = native_getInternalFormat(bitmap);
55 * Return the type as defined by OpenGL ES of the supplied bitmap, if there
56 * is one. If the bitmap i
62 getType(Bitmap bitmap) argument
98 texImage2D(int target, int level, int internalformat, Bitmap bitmap, int border) argument
124 texImage2D(int target, int level, int internalformat, Bitmap bitmap, int type, int border) argument
146 texImage2D(int target, int level, Bitmap bitmap, int border) argument
181 texSubImage2D(int target, int level, int xoffset, int yoffset, Bitmap bitmap) argument
206 texSubImage2D(int target, int level, int xoffset, int yoffset, Bitmap bitmap, int format, int type) argument
264 native_getInternalFormat(Bitmap bitmap) argument
265 native_getType(Bitmap bitmap) argument
266 native_texImage2D(int target, int level, int internalformat, Bitmap bitmap, int type, int border) argument
268 native_texSubImage2D(int target, int level, int xoffset, int yoffset, Bitmap bitmap, int format, int type) argument
[all...]
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/util/
H A DBitmapSerializeUtils.java24 * use case of having the same bitmap on both ends and just
38 * Reads a bitmap pixels from a file descriptor.
40 * @param bitmap A bitmap whose pixels to populate.
43 public static void readBitmapPixels(Bitmap bitmap, ParcelFileDescriptor source) { argument
44 nativeReadBitmapPixels(bitmap, source.getFd());
48 * Writes a bitmap pixels to a file descriptor.
50 * @param bitmap The bitmap.
53 public static void writeBitmapPixels(Bitmap bitmap, ParcelFileDescripto argument
57 nativeReadBitmapPixels(Bitmap bitmap, int fd) argument
59 nativeWriteBitmapPixels(Bitmap bitmap, int fd) argument
[all...]
/frameworks/opt/bitmap/src/com/android/bitmap/
H A DPoolable.java17 package com.android.bitmap;
H A DBitmapCache.java17 package com.android.bitmap;
H A DDecodeAggregator.java17 package com.android.bitmap;
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/
H A DBitmapTexture.java31 public BitmapTexture(Bitmap bitmap) { argument
32 this(bitmap, false);
35 public BitmapTexture(Bitmap bitmap, boolean hasBorder) { argument
37 Utils.assertTrue(bitmap != null && !bitmap.isRecycled());
38 mContentBitmap = bitmap;
42 protected void onFreeBitmap(Bitmap bitmap) { argument
/frameworks/support/compat/src/main/java/androidx/core/graphics/
H A DBitmapCompat.java27 public static boolean hasMipMap(@NonNull Bitmap bitmap) { argument
29 return bitmap.hasMipMap();
34 public static void setHasMipMap(@NonNull Bitmap bitmap, boolean hasMipMap) { argument
36 bitmap.setHasMipMap(hasMipMap);
41 * Returns the size of the allocated memory used to store this bitmap's pixels in a backwards
44 * @param bitmap the bitmap in which to return its allocation size
47 public static int getAllocationByteCount(@NonNull Bitmap bitmap) { argument
49 return bitmap.getAllocationByteCount();
51 return bitmap
[all...]
/frameworks/base/libs/hwui/
H A DTextureCache.cpp93 bool TextureCache::canMakeTextureFromBitmap(Bitmap* bitmap) { argument
94 if (bitmap->width() > mMaxTextureSize || bitmap->height() > mMaxTextureSize) {
95 ALOGW("Bitmap too large to be uploaded into a texture (%dx%d, max=%dx%d)", bitmap->width(),
96 bitmap->height(), mMaxTextureSize, mMaxTextureSize);
102 Texture* TextureCache::createTexture(Bitmap* bitmap) { argument
104 texture->bitmapSize = bitmap->rowBytes() * bitmap->height();
105 texture->generation = bitmap->getGenerationID();
106 texture->upload(*bitmap);
112 getCachedTexture(Bitmap* bitmap) argument
166 prefetchAndMarkInUse(void* ownerToken, Bitmap* bitmap) argument
174 prefetch(Bitmap* bitmap) argument
178 get(Bitmap* bitmap) argument
[all...]
H A DOpenGLReadback.h33 SkBitmap* bitmap) override;
35 SkBitmap* bitmap) override;
43 SkBitmap* bitmap) = 0;
47 const Rect& srcRect, SkBitmap* bitmap);
55 * Copies the layer's contents into the provided bitmap.
58 SkBitmap* bitmap);
63 SkBitmap* bitmap) override;
H A DTextureCache.h78 * acquired for the bitmap, false otherwise. If a Texture was acquired it is
81 bool prefetchAndMarkInUse(void* ownerToken, Bitmap* bitmap);
85 * acquired for the bitmap, false otherwise. Does not mark the Texture
88 bool prefetch(Bitmap* bitmap);
91 * Returns the texture associated with the specified bitmap from within the cache.
94 Texture* get(Bitmap* bitmap);
123 bool canMakeTextureFromBitmap(Bitmap* bitmap);
125 Texture* getCachedTexture(Bitmap* bitmap);
126 Texture* createTexture(Bitmap* bitmap);
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/graphics/drawable/
H A DDrawableTest.kt38 val bitmap = drawable.toBitmap()
39 assertEquals(10, bitmap.width)
40 assertEquals(10, bitmap.height)
41 assertEquals(Config.ARGB_8888, bitmap.config)
42 assertEquals(Color.RED, bitmap.getPixel(5, 5))
51 val bitmap = drawable.toBitmap(config = Config.ARGB_8888)
52 assertEquals(10, bitmap.width)
53 assertEquals(10, bitmap.height)
54 assertEquals(Config.ARGB_8888, bitmap.config)
55 assertEquals(Color.RED, bitmap
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DBitmapShader.java22 * Shader used to draw a bitmap as a texture. The bitmap can be repeated or
37 * Call this to create a new shader that will draw with a bitmap.
39 * @param bitmap The bitmap to use inside the shader
40 * @param tileX The tiling mode for x to draw the bitmap in.
41 * @param tileY The tiling mode for y to draw the bitmap in.
43 public BitmapShader(@NonNull Bitmap bitmap, @NonNull TileMode tileX, @NonNull TileMode tileY) { argument
44 this(bitmap, tileX.nativeInt, tileY.nativeInt);
47 private BitmapShader(Bitmap bitmap, in argument
74 nativeCreate(long nativeMatrix, Bitmap bitmap, int shaderTileModeX, int shaderTileModeY) argument
[all...]
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/
H A DBitmapUtils.java43 * bitmap.
51 * generates a smaller bitmap, unless minSideLength = UNCONSTRAINED.
116 Bitmap bitmap, float scale, boolean recycle) {
117 int width = Math.round(bitmap.getWidth() * scale);
118 int height = Math.round(bitmap.getHeight() * scale);
119 if (width == bitmap.getWidth()
120 && height == bitmap.getHeight()) return bitmap;
121 Bitmap target = Bitmap.createBitmap(width, height, getConfig(bitmap));
125 canvas.drawBitmap(bitmap,
115 resizeBitmapByScale( Bitmap bitmap, float scale, boolean recycle) argument
130 getConfig(Bitmap bitmap) argument
138 resizeDownBySideLength( Bitmap bitmap, int maxLength, boolean recycle) argument
148 resizeAndCropCenter(Bitmap bitmap, int size, boolean recycle) argument
169 recycleSilently(Bitmap bitmap) argument
237 compressToBytes(Bitmap bitmap) argument
241 compressToBytes(Bitmap bitmap, int quality) argument
[all...]
/frameworks/opt/bitmap/src/com/android/bitmap/drawable/
H A DParallaxable.java17 package com.android.bitmap.drawable;
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/src/androidx/media/filterfw/samples/simplecamera/
H A DFaceSquareFilterTest.java62 Bitmap bitmap = BitmapFactory.decodeStream(assetMgr.open("XZZ019.jpg"));
63 image.setBitmap(bitmap);
79 int[] pixels = new int[bitmap.getByteCount()];
80 bitmap.getPixels(pixels, 0, bitmap.getWidth(), 0, 0, bitmap.getWidth(),
81 bitmap.getHeight());
87 int top = (faceRect.top+HEIGHT_OFFSET)*bitmap.getHeight()/FACE_X_RANGE;
88 int bottom = (faceRect.bottom+HEIGHT_OFFSET)*bitmap.getHeight()/FACE_X_RANGE;
89 int left = (faceRect.left+WIDTH_OFFSET)*bitmap
[all...]
/frameworks/opt/photoviewer/src/com/android/ex/photo/loaders/
H A DPhotoBitmapLoader.java32 * Loader for the bitmap of a photo.
58 if (result.bitmap != null) {
59 result.bitmap.setDensity(DisplayMetrics.DENSITY_MEDIUM);
77 Bitmap bitmap = result != null ? result.bitmap : null;
81 if (bitmap != null) {
82 onReleaseResources(bitmap);
87 mBitmap = bitmap;
98 if (oldBitmap != null && oldBitmap != bitmap && !oldBitmap.isRecycled()) {
113 result.bitmap
168 onReleaseResources(Bitmap bitmap) argument
[all...]
H A DPhotoBitmapLoaderInterface.java19 public Bitmap bitmap; field in class:PhotoBitmapLoaderInterface.BitmapResult
25 * the underlying bitmap is null).
36 // Don't create a new drawable if there's no bitmap. PhotoViewFragment regards
39 if (bitmap == null) {
43 return new BitmapDrawable(resources, bitmap);
/frameworks/base/core/jni/android/graphics/
H A DBitmap.h20 #include <android/bitmap.h>
28 namespace bitmap { namespace in namespace:android
36 jobject createBitmap(JNIEnv* env, Bitmap* bitmap,
43 Bitmap& toBitmap(JNIEnv* env, jobject bitmap);
47 void imageInfo(JNIEnv* env, jobject bitmap, AndroidBitmapInfo* info);
48 // Returns a pointer to the pixels or nullptr if the bitmap is not valid
49 void* lockPixels(JNIEnv* env, jobject bitmap);
50 // Returns true if unlocked, false if the bitmap is no longer valid (destroyed)
51 bool unlockPixels(JNIEnv* env, jobject bitmap);
53 /** Reinitialize a bitmap
[all...]
/frameworks/base/core/tests/coretests/src/android/graphics/
H A DBitmapFactoryTest.java41 Bitmap bitmap = BitmapFactory.decodeFileDescriptor(fd);
42 assertNotNull("BitmapFactory returned null", bitmap);
43 assertEquals("Bitmap width", 1, bitmap.getWidth());
44 assertEquals("Bitmap height", 1, bitmap.getHeight());
/frameworks/base/native/graphics/jni/
H A Dbitmap.cpp17 #include <android/bitmap.h>
27 android::bitmap::imageInfo(env, jbitmap, info);
37 void* addr = android::bitmap::lockPixels(env, jbitmap);
53 bool unlocked = android::bitmap::unlockPixels(env, jbitmap);
/frameworks/opt/setupwizard/library/recyclerview/test/instrumentation/src/com/android/setupwizardlib/test/
H A DDividerItemDecorationTest.java71 Bitmap bitmap = drawDecoration(decoration, true, true);
73 // Draw the expected result on a bitmap
82 assertBitmapEquals(expectedBitmap, bitmap);
84 bitmap.recycle();
85 bitmap = drawDecoration(decoration, false, true);
87 assertBitmapEquals(expectedBitmap, bitmap);
89 bitmap.recycle();
90 bitmap = drawDecoration(decoration, true, false);
95 assertBitmapEquals(expectedBitmap, bitmap);
97 bitmap
[all...]
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/graphics/
H A DBitmapTest.kt27 val bitmap = createBitmap(7, 9)
28 assertEquals(7, bitmap.width)
29 assertEquals(9, bitmap.height)
30 assertEquals(Bitmap.Config.ARGB_8888, bitmap.config)
34 val bitmap = createBitmap(7, 9, config = Bitmap.Config.RGB_565)
35 assertEquals(Bitmap.Config.RGB_565, bitmap.config)
41 val bitmap = createBitmap(7, 9, colorSpace = colorSpace)
42 assertEquals(colorSpace, bitmap.colorSpace)
/frameworks/support/leanback/src/main/java/androidx/leanback/widget/
H A DPlaybackSeekDataProvider.java33 * Client of thumbnail bitmap being loaded. PlaybackSeekDataProvider must invoke this method
36 * @param bitmap Result of bitmap.
39 public void onThumbnailLoaded(Bitmap bitmap, int index) { argument
54 * Called to get thumbnail bitmap. This method is called on UI thread. When provider finds
55 * cache bitmap, it may invoke {@link ResultCallback#onThumbnailLoaded(Bitmap, int)}
/frameworks/base/libs/hwui/pipeline/skia/
H A DSkiaVulkanReadback.h30 SkBitmap* bitmap) override {
36 SkBitmap* bitmap) override {
/frameworks/support/palette/ktx/src/androidTest/java/androidx/palette/graphics/
H A DPaletteTest.kt30 val bitmap = Bitmap.createBitmap(10, 10, ARGB_8888)
32 assertNotNull(bitmap.buildPalette())
36 val bitmap = Bitmap.createBitmap(10, 10, ARGB_8888).apply {
39 val palette = Palette.from(bitmap).generate()

Completed in 859 milliseconds

1234567891011>>