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

12345678

/frameworks/base/opengl/java/android/opengl/
H A DGLUtils.java44 * return the internal format as defined by OpenGL ES of the supplied bitmap.
45 * @param bitmap
46 * @return the internal format of the bitmap.
48 public static int getInternalFormat(Bitmap bitmap) { argument
49 if (bitmap == null) {
52 if (bitmap.isRecycled()) {
53 throw new IllegalArgumentException("bitmap is recycled");
55 int result = native_getInternalFormat(bitmap);
63 * Return the type as defined by OpenGL ES of the supplied bitmap, if there
64 * is one. If the bitmap i
70 getType(Bitmap bitmap) argument
106 texImage2D(int target, int level, int internalformat, Bitmap bitmap, int border) argument
132 texImage2D(int target, int level, int internalformat, Bitmap bitmap, int type, int border) argument
154 texImage2D(int target, int level, Bitmap bitmap, int border) argument
189 texSubImage2D(int target, int level, int xoffset, int yoffset, Bitmap bitmap) argument
214 texSubImage2D(int target, int level, int xoffset, int yoffset, Bitmap bitmap, int format, int type) argument
280 native_getInternalFormat(Bitmap bitmap) argument
281 native_getType(Bitmap bitmap) argument
282 native_texImage2D(int target, int level, int internalformat, Bitmap bitmap, int type, int border) argument
284 native_texSubImage2D(int target, int level, int xoffset, int yoffset, Bitmap bitmap, int format, int type) 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 Assert.assertTrue(bitmap != null && !bitmap.isRecycled());
38 mContentBitmap = bitmap;
42 protected void onFreeBitmap(Bitmap bitmap) { argument
H A DUploadedTexture.java124 Bitmap bitmap = sBorderLines.get(key);
125 if (bitmap == null) {
126 bitmap = vertical
129 sBorderLines.put(key.clone(), bitmap);
131 return bitmap;
166 protected abstract void onFreeBitmap(Bitmap bitmap); argument
193 Bitmap bitmap = getBitmap();
194 int format = GLUtils.getInternalFormat(bitmap);
195 int type = GLUtils.getType(bitmap);
196 canvas.texSubImage2D(this, mBorder, mBorder, bitmap, forma
[all...]
/frameworks/base/media/tests/omxjpegdecoder/
H A Djpeg_decoder_bench.cpp53 SkBitmap* bitmap) {
58 // Decode the input stream and then use the bitmap.
59 if (!decoder->decode(stream, bitmap, prefConfig, decodeMode)) {
63 printf("WidthxHeight: %dx%d\n", bitmap->width(), bitmap->height());
70 SkBitmap* bitmap) {
75 // Decode the input stream and then use the bitmap.
76 if (!decoder->decode(stream, bitmap, prefConfig, decodeMode)) {
82 return storeBitmapToFile(bitmap, filename);
89 SkBitmap* bitmap local
52 testDecodeBounds(SkImageDecoder* decoder, SkStream* stream, SkBitmap* bitmap) argument
69 testDecodePixels(SkImageDecoder* decoder, SkStream* stream, SkBitmap* bitmap) argument
[all...]
/frameworks/base/libs/hwui/
H A DTextureCache.cpp106 void TextureCache::operator()(SkBitmap*& bitmap, Texture*& texture) { argument
124 Texture* TextureCache::get(SkBitmap* bitmap) { argument
125 Texture* texture = mCache.get(bitmap);
128 if (bitmap->width() > mMaxTextureSize || bitmap->height() > mMaxTextureSize) {
130 bitmap->width(), bitmap->height(), mMaxTextureSize, mMaxTextureSize);
134 const uint32_t size = bitmap->rowBytes() * bitmap->height();
135 // Don't even try to cache a bitmap tha
164 getTransient(SkBitmap* bitmap) argument
174 remove(SkBitmap* bitmap) argument
178 removeDeferred(SkBitmap* bitmap) argument
212 generateTexture(SkBitmap* bitmap, Texture* texture, bool regenerate) argument
285 uploadLoFiTexture(bool resize, SkBitmap* bitmap, uint32_t width, uint32_t height) argument
[all...]
H A DTextureCache.h62 void operator()(SkBitmap*& bitmap, Texture*& texture);
65 * Returns the texture associated with the specified bitmap. If the texture
68 Texture* get(SkBitmap* bitmap);
70 * Returns the texture associated with the specified bitmap. The generated
73 Texture* getTransient(SkBitmap* bitmap);
75 * Removes the texture associated with the specified bitmap.
78 void remove(SkBitmap* bitmap);
80 * Removes the texture associated with the specified bitmap. This is meant
83 void removeDeferred(SkBitmap* bitmap);
120 * Generates the texture from a bitmap int
[all...]
H A DAssetAtlas.cpp77 AssetAtlas::Entry* AssetAtlas::getEntry(SkBitmap* const bitmap) const {
78 ssize_t index = mEntries.indexOfKey(bitmap);
82 Texture* AssetAtlas::getEntryTexture(SkBitmap* const bitmap) const {
83 ssize_t index = mEntries.indexOfKey(bitmap);
116 SkBitmap* bitmap = (SkBitmap*) map[i++]; local
122 if (!bitmap) continue;
125 x / width, (x + bitmap->width()) / width,
126 y / height, (y + bitmap->height()) / height);
130 texture->blend = !bitmap->isOpaque();
131 texture->width = bitmap
[all...]
H A DAssetAtlas.h41 * texture. Each bitmap is associated with a location, defined in pixels,
49 * bitmap inside the atlas.
53 * The bitmap that generated this atlas entry.
55 SkBitmap* bitmap; member in struct:android::uirenderer::AssetAtlas::Entry
58 * Location of the bitmap inside the atlas, in pixels.
64 * If set, the bitmap is rotated 90 degrees (clockwise)
96 Entry(SkBitmap* bitmap, int x, int y, bool rotated, argument
98 bitmap(bitmap), x(x), y(y), rotated(rotated),
161 * bitmap
[all...]
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/
H A DBitmapUtils.java44 * bitmap.
52 * generates a smaller bitmap, unless minSideLength = UNCONSTRAINED.
117 Bitmap bitmap, float scale, boolean recycle) {
118 int width = Math.round(bitmap.getWidth() * scale);
119 int height = Math.round(bitmap.getHeight() * scale);
120 if (width == bitmap.getWidth()
121 && height == bitmap.getHeight()) return bitmap;
122 Bitmap target = Bitmap.createBitmap(width, height, getConfig(bitmap));
126 canvas.drawBitmap(bitmap,
116 resizeBitmapByScale( Bitmap bitmap, float scale, boolean recycle) argument
131 getConfig(Bitmap bitmap) argument
139 resizeDownBySideLength( Bitmap bitmap, int maxLength, boolean recycle) argument
149 resizeAndCropCenter(Bitmap bitmap, int size, boolean recycle) argument
170 recycleSilently(Bitmap bitmap) argument
238 compressToBytes(Bitmap bitmap) argument
242 compressToBytes(Bitmap bitmap, int quality) argument
[all...]
/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.java15 public Bitmap bitmap; field in class:PhotoBitmapLoaderInterface.BitmapResult
/frameworks/base/graphics/tests/graphicstests/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/core/jni/android/graphics/
H A DBitmap.cpp307 SkBitmap bitmap; local
308 bitmap.setConfig(config, width, height);
310 jbyteArray buff = GraphicsJNI::allocateJavaPixelRef(env, &bitmap, NULL);
317 0, 0, width, height, bitmap, true);
320 return GraphicsJNI::createBitmap(env, new SkBitmap(bitmap), buff,
336 static void Bitmap_destructor(JNIEnv* env, jobject, SkBitmap* bitmap) { argument
339 android::uirenderer::Caches::getInstance().resourceCache.destructor(bitmap);
343 delete bitmap;
346 static jboolean Bitmap_recycle(JNIEnv* env, jobject, SkBitmap* bitmap) { argument
349 return android::uirenderer::Caches::getInstance().resourceCache.recycle(bitmap);
363 SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(bitmapInt); local
383 Bitmap_compress(JNIEnv* env, jobject clazz, SkBitmap* bitmap, int format, int quality, jobject jstream, jbyteArray jstorage) argument
425 Bitmap_erase(JNIEnv* env, jobject, SkBitmap* bitmap, jint color) argument
429 Bitmap_rowBytes(JNIEnv* env, jobject, SkBitmap* bitmap) argument
433 Bitmap_config(JNIEnv* env, jobject, SkBitmap* bitmap) argument
437 Bitmap_getGenerationId(JNIEnv* env, jobject, SkBitmap* bitmap) argument
441 Bitmap_hasAlpha(JNIEnv* env, jobject, SkBitmap* bitmap) argument
445 Bitmap_setHasAlpha(JNIEnv* env, jobject, SkBitmap* bitmap, jboolean hasAlpha) argument
450 Bitmap_hasMipMap(JNIEnv* env, jobject, SkBitmap* bitmap) argument
454 Bitmap_setHasMipMap(JNIEnv* env, jobject, SkBitmap* bitmap, jboolean hasMipMap) argument
485 SkBitmap* bitmap = new SkBitmap; local
528 Bitmap_writeToParcel(JNIEnv* env, jobject, const SkBitmap* bitmap, jboolean isMutable, jint density, jobject parcel) argument
609 Bitmap_getPixel(JNIEnv* env, jobject, const SkBitmap* bitmap, int x, int y, bool isPremultiplied) argument
627 Bitmap_getPixels(JNIEnv* env, jobject, const SkBitmap* bitmap, jintArray pixelArray, int offset, int stride, int x, int y, int width, int height, bool isPremultiplied) argument
654 Bitmap_setPixel(JNIEnv* env, jobject, const SkBitmap* bitmap, int x, int y, SkColor color, bool isPremultiplied) argument
670 Bitmap_setPixels(JNIEnv* env, jobject, const SkBitmap* bitmap, jintArray pixelArray, int offset, int stride, int x, int y, int width, int height, bool isPremultiplied) argument
677 Bitmap_copyPixelsToBuffer(JNIEnv* env, jobject, const SkBitmap* bitmap, jobject jbuffer) argument
690 Bitmap_copyPixelsFromBuffer(JNIEnv* env, jobject, const SkBitmap* bitmap, jobject jbuffer) argument
750 Bitmap_prepareToDraw(JNIEnv* env, jobject, SkBitmap* bitmap) argument
[all...]
H A DNinePatchImpl.cpp40 static bool getColor(const SkBitmap& bitmap, int x, int y, SkColor* c) { argument
41 switch (bitmap.getConfig()) {
43 *c = SkUnPreMultiply::PMColorToColor(*bitmap.getAddr32(x, y));
46 *c = SkPixel16ToPixel32(*bitmap.getAddr16(x, y));
50 SkPixel4444ToPixel32(*bitmap.getAddr16(x, y)));
53 SkColorTable* ctable = bitmap.getColorTable();
55 (*ctable)[*bitmap.getAddr8(x, y)]);
71 const SkBitmap& bitmap, const SkPaint& paint,
80 if (!getColor(bitmap, src.fLeft, src.fTop, &c)) {
91 canvas->drawBitmapRect(bitmap,
70 drawStretchyPatch(SkCanvas* canvas, SkIRect& src, const SkRect& dst, const SkBitmap& bitmap, const SkPaint& paint, SkColor initColor, uint32_t colorHint, bool hasXfer) argument
105 NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, const SkBitmap& bitmap, const android::Res_png_9patch& chunk, const SkPaint* paint, SkRegion** outRegion) argument
[all...]
H A DNinePatch.cpp32 extern void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, const SkBitmap& bitmap,
89 static void draw(JNIEnv* env, SkCanvas* canvas, SkRect& bounds, const SkBitmap* bitmap, argument
95 NinePatch_Draw(canvas, bounds, *bitmap, *chunk, paint, NULL);
112 NinePatch_Draw(canvas, bounds, *bitmap, *chunk, paint, NULL);
119 const SkBitmap* bitmap, Res_png_9patch* chunk, const SkPaint* paint,
123 SkASSERT(bitmap);
130 draw(env, canvas, bounds, bitmap, chunk, paint, destDensity, srcDensity);
134 const SkBitmap* bitmap, Res_png_9patch* chunk, const SkPaint* paint,
138 SkASSERT(bitmap);
144 draw(env, canvas, bounds, bitmap, chun
118 drawF(JNIEnv* env, jobject, SkCanvas* canvas, jobject boundsRectF, const SkBitmap* bitmap, Res_png_9patch* chunk, const SkPaint* paint, jint destDensity, jint srcDensity) argument
133 drawI(JNIEnv* env, jobject, SkCanvas* canvas, jobject boundsRect, const SkBitmap* bitmap, Res_png_9patch* chunk, const SkPaint* paint, jint destDensity, jint srcDensity) argument
147 getTransparentRegion(JNIEnv* env, jobject, const SkBitmap* bitmap, Res_png_9patch* chunk, jobject boundsRect) argument
[all...]
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
H A DFrameImage2D.java51 * Assigns the pixel data of the specified bitmap.
53 * The RGBA pixel data will be extracted from the bitmap and assigned to the frame data. Note,
58 * @param bitmap The bitmap pixels to assign.
60 public void setBitmap(Bitmap bitmap) { argument
61 bitmap = convertToFrameType(bitmap, mBackingStore.getFrameType());
62 validateBitmapSize(bitmap, mBackingStore.getDimensions());
64 backing.setData(bitmap);
116 private static Bitmap convertToFrameType(Bitmap bitmap, FrameTyp argument
136 validateBitmapSize(Bitmap bitmap, int[] dimensions) argument
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DBitmapShader.java20 * Shader used to draw a bitmap as a texture. The bitmap can be repeated or
35 * Call this to create a new shader that will draw with a bitmap.
37 * @param bitmap The bitmap to use inside the shader
38 * @param tileX The tiling mode for x to draw the bitmap in.
39 * @param tileY The tiling mode for y to draw the bitmap in.
41 public BitmapShader(Bitmap bitmap, TileMode tileX, TileMode tileY) { argument
42 mBitmap = bitmap;
45 final int b = bitmap
[all...]
H A DNinePatch.java21 * The NinePatch class permits drawing a bitmap in nine or more sections.
48 * Create a drawable projection from a bitmap to nine patches.
50 * @param bitmap The bitmap describing the patches.
51 * @param chunk The 9-patch data chunk describing how the underlying bitmap
54 public NinePatch(Bitmap bitmap, byte[] chunk) { argument
55 this(bitmap, chunk, null);
59 * Create a drawable projection from a bitmap to nine patches.
61 * @param bitmap The bitmap describin
66 NinePatch(Bitmap bitmap, byte[] chunk, String srcName) argument
239 validateNinePatchChunk(int bitmap, byte[] chunk) argument
245 nativeGetTransparentRegion(int bitmap, int chunk, Rect location) argument
[all...]
/frameworks/base/media/java/android/media/
H A DFaceDetector.java33 * of a face in a bitmap.
127 * face found. The bitmap must be in 565 format (for now).
129 * @param bitmap the {@link android.graphics.Bitmap} graphic to be analyzed
139 public int findFaces(Bitmap bitmap, Face[] faces) argument
144 if (bitmap.getWidth() != mWidth || bitmap.getHeight() != mHeight) {
146 "bitmap size doesn't match initialization");
153 int numFaces = fft_detect(bitmap);
190 native private int fft_detect(Bitmap bitmap); argument
/frameworks/ex/carousel/java/com/android/ex/carousel/
H A DCarouselView.java347 * @param bitmap the bitmap image to show
349 public void setTextureForItem(int n, Bitmap bitmap) { argument
350 mController.setTextureForItem(n, bitmap);
365 * @param bitmap the bitmap to show as the detail
368 Bitmap bitmap) {
369 mController.setDetailTextureForItem(n, offx, offy, loffx, loffy, bitmap);
373 * Sets the bitmap to show on a card when the card draws the very first time.
374 * Generally, this bitmap wil
367 setDetailTextureForItem(int n, float offx, float offy, float loffx, float loffy, Bitmap bitmap) argument
380 setDefaultBitmap(Bitmap bitmap) argument
392 setLoadingBitmap(Bitmap bitmap) argument
415 setBackgroundBitmap(Bitmap bitmap) argument
425 setDetailLoadingBitmap(Bitmap bitmap) argument
436 setDetailLineBitmap(Bitmap bitmap) argument
[all...]
H A DCarouselViewUtilities.java16 * Debug utility to write the given bitmap to a file.
19 * @param bitmap the bitmap to write
23 public static boolean writeBitmapToFile(Context context, Bitmap bitmap, String filename) { argument
31 bitmap.compress(Bitmap.CompressFormat.PNG, 100, os);
/frameworks/support/v4/java/android/support/v4/print/
H A DPrintHelper.java92 public void printBitmap(String jobName, Bitmap bitmap); argument
132 public void printBitmap(String jobName, Bitmap bitmap) { argument
181 public void printBitmap(String jobName, Bitmap bitmap) { argument
182 mPrintHelper.printBitmap(jobName, bitmap);
272 * Prints a bitmap.
275 * @param bitmap The bitmap to print.
277 public void printBitmap(String jobName, Bitmap bitmap) { argument
278 mImpl.printBitmap(jobName, bitmap);
/frameworks/base/services/jni/
H A Dcom_android_server_AssetAtlasService.cpp79 SkBitmap* bitmap = new SkBitmap; local
80 bitmap->setConfig(SkBitmap::kARGB_8888_Config, width, height);
81 bitmap->allocPixels();
82 bitmap->eraseColor(0);
84 SkCanvas* nativeCanvas = SkNEW_ARGS(SkCanvas, (*bitmap));
87 return bitmap;
91 jobject canvas, SkBitmap* bitmap) {
96 delete bitmap;
111 jobject graphicBuffer, SkBitmap* bitmap) {
113 // The goal of this method is to copy the bitmap int
90 com_android_server_AssetAtlasService_releaseCanvas(JNIEnv* env, jobject, jobject canvas, SkBitmap* bitmap) argument
110 com_android_server_AssetAtlasService_upload(JNIEnv* env, jobject, jobject graphicBuffer, SkBitmap* bitmap) argument
[all...]
/frameworks/base/core/jni/
H A Dandroid_view_PointerIcon.h48 SkBitmap bitmap; member in struct:android::PointerIcon
58 bitmap.reset();
68 /* Loads the bitmap associated with a pointer icon.
73 /* Loads the bitmap associated with a pointer icon by style.

Completed in 1264 milliseconds

12345678