Searched refs:bitmap (Results 1 - 25 of 363) 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/support/compat/java/android/support/v4/graphics/
H A DBitmapCompat.java27 public boolean hasMipMap(Bitmap bitmap) { argument
31 public void setHasMipMap(Bitmap bitmap, boolean hasMipMap) { argument
34 public int getAllocationByteCount(Bitmap bitmap) { argument
35 return bitmap.getByteCount();
42 public boolean hasMipMap(Bitmap bitmap){ argument
43 return bitmap.hasMipMap();
47 public void setHasMipMap(Bitmap bitmap, boolean hasMipMap) { argument
48 bitmap.setHasMipMap(hasMipMap);
55 public int getAllocationByteCount(Bitmap bitmap) { argument
56 return bitmap
74 hasMipMap(Bitmap bitmap) argument
78 setHasMipMap(Bitmap bitmap, boolean hasMipMap) argument
89 getAllocationByteCount(Bitmap bitmap) argument
[all...]
/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/base/libs/hwui/
H A DTextureCache.cpp93 bool TextureCache::canMakeTextureFromBitmap(Bitmap* bitmap) { argument
94 if (bitmap->width() > mMaxTextureSize || bitmap->height() > mMaxTextureSize) {
96 bitmap->width(), 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;
42 int imgWidth, int imgHeight, const Rect& srcRect, SkBitmap* bitmap) = 0;
45 const Rect& srcRect, SkBitmap* bitmap);
53 * Copies the layer's contents into the provided bitmap.
56 SkBitmap* bitmap);
60 int imgWidth, int imgHeight, const Rect& srcRect, 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/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/support/compat/tests/java/android/support/v4/graphics/drawable/
H A DIconCompatTest.java48 private void verifyClippedCircle(Bitmap bitmap, int fillColor, int size) { argument
49 assertEquals(size, bitmap.getHeight());
50 assertEquals(bitmap.getWidth(), bitmap.getHeight());
51 assertEquals(fillColor, bitmap.getPixel(size / 2, size / 2));
53 assertEquals(Color.TRANSPARENT, bitmap.getPixel(0, 0));
54 assertEquals(Color.TRANSPARENT, bitmap.getPixel(0, size - 1));
55 assertEquals(Color.TRANSPARENT, bitmap.getPixel(size - 1, 0));
56 assertEquals(Color.TRANSPARENT, bitmap.getPixel(size - 1, size - 1));
69 Bitmap 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/base/libs/hwui/tests/common/
H A DBitmapAllocationTestUtils.h31 SkColorType colorType, std::function<void(SkBitmap& bitmap)> setup) {
32 sk_sp<Bitmap> bitmap = TestUtils::createBitmap(width, height, colorType); local
34 bitmap->getSkBitmap(&skBitmap);
36 return bitmap;
40 SkColorType colorType, std::function<void(SkBitmap& bitmap)> setup) {
50 std::function<void(SkBitmap& bitmap)> setup);
/frameworks/support/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/graphics/
H A DImageLoader.java41 void onImageLoaded(Bitmap bitmap); argument
70 protected void onPostExecute(Bitmap bitmap) {
71 imageView.setImageBitmap(bitmap);
73 if (bitmap != null) {
75 CACHE.put(id, bitmap);
78 listener.onImageLoaded(bitmap);
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/graphics/
H A DImageLoader.java41 void onImageLoaded(Bitmap bitmap); argument
70 protected void onPostExecute(Bitmap bitmap) {
71 imageView.setImageBitmap(bitmap);
73 if (bitmap != null) {
75 CACHE.put(id, bitmap);
78 listener.onImageLoaded(bitmap);
/frameworks/base/tests/UiBench/src/com/android/test/uibench/leanback/
H A DBitmapLoader.java30 * The sample bitmap is generated in worker threads in AsyncTask.THREAD_POOL_EXECUTOR.
93 // generate a sample bitmap: white background and text showing id
94 Bitmap bitmap = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.ARGB_8888);
95 Canvas canvas = new Canvas(bitmap);
99 bitmap.prepareToDraw();
100 return bitmap;
111 protected void onPostExecute(Bitmap bitmap) { argument
114 sLruCache.put(mId, bitmap);
115 mImageView.setImageBitmap(bitmap);
122 Bitmap bitmap
[all...]

Completed in 669 milliseconds

1234567891011>>