Searched refs:bitmap (Results 26 - 50 of 388) sorted by relevance

1234567891011>>

/frameworks/base/libs/hwui/tests/common/
H A DBitmapAllocationTestUtils.h31 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 std::function<void(SkBitmap& bitmap)> setup) {
50 std::function<void(SkBitmap& bitmap)> setup);
/frameworks/support/frameworks/support/samples/Support7Demos/src/main/java/com/example/android/supportv7/graphics/
H A DImageLoader.java42 void onImageLoaded(Bitmap bitmap); argument
71 protected void onPostExecute(Bitmap bitmap) {
72 imageView.setImageBitmap(bitmap);
74 if (bitmap != null) {
76 CACHE.put(id, bitmap);
79 listener.onImageLoaded(bitmap);
/frameworks/support/samples/Support7Demos/src/main/java/com/example/android/supportv7/graphics/
H A DImageLoader.java42 void onImageLoaded(Bitmap bitmap); argument
71 protected void onPostExecute(Bitmap bitmap) {
72 imageView.setImageBitmap(bitmap);
74 if (bitmap != null) {
76 CACHE.put(id, bitmap);
79 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...]
/frameworks/base/core/jni/android/graphics/
H A DBitmap.cpp51 BitmapWrapper(Bitmap* bitmap) argument
52 : mBitmap(bitmap) { }
68 Bitmap& bitmap() { function in class:android::BitmapWrapper
74 LOG_ALWAYS_FATAL_IF(!valid(), "Error, cannot access an invalid/free'd bitmap here!");
158 return mBitmapWrapper->bitmap().pixels();
169 namespace bitmap { namespace in namespace:android
171 // Assert that bitmap's SkAlphaType is consistent with isPremultiplied.
199 jobject createBitmap(JNIEnv* env, Bitmap* bitmap, argument
206 assert_premultiplied(bitmap->info(), isPremultiplied);
207 BitmapWrapper* bitmapWrapper = new BitmapWrapper(bitmap);
224 toBitmap(JNIEnv* env, jobject bitmap) argument
239 imageInfo(JNIEnv* env, jobject bitmap, AndroidBitmapInfo* info) argument
271 lockPixels(JNIEnv* env, jobject bitmap) argument
288 unlockPixels(JNIEnv* env, jobject bitmap) argument
418 ChooseFromColorProc(const SkBitmap& bitmap) argument
670 SkBitmap bitmap; local
809 auto bitmap = allocator.getStorageObjAndReset(); local
820 auto bitmap = allocator.getStorageObjAndReset(); local
829 auto bitmap = Bitmap_copyAshmemImpl(env, src, dstCT); local
838 auto bitmap = Bitmap_copyAshmemImpl(env, src, dstCT); local
843 Bitmap_destruct(BitmapWrapper* bitmap) argument
1159 SkBitmap bitmap; local
1325 SkBitmap bitmap; local
1356 SkBitmap bitmap; local
1402 SkBitmap bitmap; local
1431 SkBitmap bitmap; local
1439 SkBitmap bitmap; local
1453 SkBitmap bitmap; local
1549 sk_sp<Bitmap> bitmap = Bitmap::createFrom(buffer); local
[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/support/compat/src/androidTest/java/androidx/core/graphics/drawable/
H A DIconCompatTest.java64 private static void verifyClippedCircle(Bitmap bitmap, int fillColor, int size) { argument
65 assertEquals(size, bitmap.getHeight());
66 assertEquals(bitmap.getWidth(), bitmap.getHeight());
67 assertEquals(fillColor, bitmap.getPixel(size / 2, size / 2));
69 assertEquals(Color.TRANSPARENT, bitmap.getPixel(0, 0));
70 assertEquals(Color.TRANSPARENT, bitmap.getPixel(0, size - 1));
71 assertEquals(Color.TRANSPARENT, bitmap.getPixel(size - 1, 0));
75 assertEquals(Color.TRANSPARENT, bitmap.getPixel(size - 1, size - 1));
79 Bitmap bitmap
[all...]
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/
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/core/java/android/app/
H A DSharedElementCallback.java48 private static final String BUNDLE_SNAPSHOT_BITMAP = "sharedElement:snapshot:bitmap";
180 Bitmap bitmap = TransitionUtils.createDrawableBitmap(d, imageView);
181 if (bitmap != null) {
183 if (bitmap.getConfig() != Bitmap.Config.HARDWARE) {
184 bundle.putParcelable(BUNDLE_SNAPSHOT_BITMAP, bitmap);
186 GraphicBuffer graphicBuffer = bitmap.createGraphicBufferHandle();
232 Bitmap bitmap = bundle.getParcelable(BUNDLE_SNAPSHOT_BITMAP);
233 if (buffer == null && bitmap == null) {
236 if (bitmap == null) {
237 bitmap
[all...]
/frameworks/opt/bitmap/src/com/android/bitmap/drawable/
H A DCircularBitmapDrawable.java17 package com.android.bitmap.drawable;
32 import com.android.bitmap.BitmapCache;
105 Bitmap bitmap = placeholder.getBitmap();
107 mRect.set(0, 0, bitmap.getWidth(), bitmap.getHeight());
108 onDrawCircularBitmap(bitmap, canvas, mRect, bounds, alpha);
119 * Call this method with a given bitmap to draw it onto the given canvas, masked by a circular
122 protected void onDrawCircularBitmap(final Bitmap bitmap, final Canvas canvas, argument
124 onDrawCircularBitmap(bitmap, canvas, src, dst, 1f);
128 * Call this method with a given bitmap t
131 onDrawCircularBitmap(final Bitmap bitmap, final Canvas canvas, final Rect src, final Rect dst, final float alpha) argument
[all...]
/frameworks/support/core/ktx/src/main/java/androidx/core/graphics/drawable/
H A DDrawable.kt37 * @param width Width of the desired bitmap. Defaults to [Drawable.getIntrinsicWidth].
38 * @param height Height of the desired bitmap. Defaults to [Drawable.getIntrinsicHeight].
39 * @param config Bitmap config of the desired bitmap. Null attempts to use the native config, if
48 if (config == null || bitmap.config == config) {
52 return bitmap
54 return Bitmap.createScaledBitmap(bitmap, width, height, true)
60 val bitmap = Bitmap.createBitmap(width, height, config ?: Config.ARGB_8888)
62 draw(Canvas(bitmap))
65 return bitmap
/frameworks/opt/bitmap/src/com/android/bitmap/
H A DUnrefedBitmapCache.java17 package com.android.bitmap;
22 import com.android.bitmap.ReusableBitmap.NullReusableBitmap;
23 import com.android.bitmap.util.Trace;
84 ReusableBitmap bitmap;
86 while ((bitmap = super.poll()) == null && mBlocking) {
104 return bitmap;
H A DPooledCache.java17 package com.android.bitmap;
/frameworks/base/libs/hwui/
H A DReadback.h42 * Copies the surface's most recently queued buffer into the provided bitmap.
44 virtual CopyResult copySurfaceInto(Surface& surface, const Rect& srcRect, SkBitmap* bitmap) = 0;
45 virtual CopyResult copyGraphicBufferInto(GraphicBuffer* graphicBuffer, SkBitmap* bitmap) = 0;
H A DTexture.cpp170 // With OpenGL ES 2.0 we need to copy the bitmap in a temporary buffer
206 // intermediate Skia bitmap needs to be ARGB_8888
241 LOG_ALWAYS_FATAL("Unsupported bitmap colorType: %d", colorType);
246 SkBitmap Texture::uploadToN32(const SkBitmap& bitmap, bool hasLinearBlending, argument
249 rgbaBitmap.allocPixels(SkImageInfo::MakeN32(bitmap.width(), bitmap.height(),
250 bitmap.info().alphaType(),
254 if (bitmap.colorType() == kRGBA_F16_SkColorType) {
256 bitmap.readPixels(rgbaBitmap.info().makeColorSpace(SkColorSpace::MakeSRGB()),
260 canvas.drawBitmap(bitmap, 0.
274 upload(Bitmap& bitmap) argument
[all...]
H A DOpenGLReadback.cpp36 SkBitmap* bitmap) {
62 return copyGraphicBufferInto(sourceBuffer.get(), texTransform, srcRect, bitmap);
67 SkBitmap* bitmap) {
89 copyImageInto(sourceImage, texTransform, width, height, srcRect, bitmap);
99 CopyResult OpenGLReadback::copyGraphicBufferInto(GraphicBuffer* graphicBuffer, SkBitmap* bitmap) { argument
104 return copyGraphicBufferInto(graphicBuffer, transform, srcRect, bitmap);
118 SkBitmap* bitmap) {
119 int destWidth = bitmap->width();
120 int destHeight = bitmap->height();
122 ALOGW("Can't copy surface into bitmap,
35 copySurfaceInto(Surface& surface, const Rect& srcRect, SkBitmap* bitmap) argument
65 copyGraphicBufferInto(GraphicBuffer* graphicBuffer, Matrix4& texTransform, const Rect& srcRect, SkBitmap* bitmap) argument
116 copyTextureInto(Caches& caches, RenderState& renderState, Texture& sourceTexture, const Matrix4& texTransform, const Rect& srcRect, SkBitmap* bitmap) argument
242 copyImageInto(EGLImageKHR eglImage, const Matrix4& imgTransform, int imgWidth, int imgHeight, const Rect& srcRect, SkBitmap* bitmap) argument
274 copyLayerInto(renderthread::RenderThread& renderThread, GlLayer& layer, SkBitmap* bitmap) argument
[all...]
/frameworks/support/graphics/drawable/animated/src/androidTest/java/androidx/vectordrawable/graphics/drawable/tests/
H A DPathInterpolatorParameterizedTest.java76 final Bitmap bitmap = Bitmap.createBitmap(IMAGE_WIDTH, IMAGE_WIDTH,
78 final Canvas c = new Canvas(bitmap);
84 bitmap.eraseColor(0);
86 int centerColor = bitmap.getPixel(IMAGE_WIDTH / 2 , IMAGE_WIDTH / 2);
90 saveVectorDrawableIntoPNG(mActivity.getResources(), bitmap, mResId, "start");
101 bitmap.eraseColor(0);
103 int centerColor = bitmap.getPixel(IMAGE_WIDTH / 2 , IMAGE_WIDTH / 2);
124 saveVectorDrawableIntoPNG(mActivity.getResources(), bitmap, mResId, "end");
/frameworks/base/libs/hwui/pipeline/skia/
H A DSkiaOpenGLReadback.cpp38 SkBitmap* bitmap) {
58 switch (bitmap->colorType()) {
70 ALOGW("Can't copy surface into bitmap, RGBA_F16 config is not supported");
86 SkRect skiaDestRect = SkRect::MakeWH(bitmap->width(), bitmap->height());
114 SkSurface::MakeRenderTarget(grContext.get(), SkBudgeted::kYes, bitmap->info());
119 if (skiaSrcRect.width() != bitmap->width() ||
120 skiaSrcRect.height() != bitmap->height()) {
130 if (image->readPixels(bitmap->info(), bitmap
36 copyImageInto(EGLImageKHR eglImage, const Matrix4& imgTransform, int imgWidth, int imgHeight, const Rect& srcRect, SkBitmap* bitmap) argument
[all...]
/frameworks/base/libs/hwui/tests/unit/
H A DSkiaBehaviorTests.cpp31 SkBitmap bitmap; local
33 bitmap.setInfo(info);
34 bitmap.allocPixels(info);
35 return bitmap;
48 SkBitmap bitmap; local
50 ASSERT_TRUE(s->isABitmap(&bitmap, nullptr, xy))
51 << "1x1 bitmap shader must query as bitmap shader";
52 EXPECT_EQ(origBitmap.pixelRef(), bitmap.pixelRef());
56 SkBitmap bitmap local
[all...]
/frameworks/support/palette/src/androidTest/java/androidx/palette/graphics/
H A DBucketTests.java101 final Bitmap bitmap = Bitmap.createBitmap(1000, 1, Bitmap.Config.ARGB_8888);
103 Palette.Builder b = new Palette.Builder(bitmap);
110 final Bitmap bitmap = Bitmap.createBitmap(1, 1000, Bitmap.Config.ARGB_8888);
112 Palette.Builder b = new Palette.Builder(bitmap);
119 final Bitmap bitmap = Bitmap.createBitmap(300, 300, Bitmap.Config.ARGB_8888);
120 Canvas canvas = new Canvas(bitmap);
123 final Palette palette = Palette.from(bitmap).generate();
134 final Bitmap bitmap = Bitmap.createBitmap(300, 300, Bitmap.Config.ARGB_8888);
135 Canvas canvas = new Canvas(bitmap);
138 final Palette palette = Palette.from(bitmap)
[all...]
/frameworks/ex/framesequence/samples/FrameSequenceSamples/src/com/android/framesequence/samples/
H A DFrameSequenceTest.java38 Bitmap bitmap =
40 mBitmaps.add(bitmap);
41 return bitmap;
45 public void releaseBitmap(Bitmap bitmap) { argument
46 if (!mBitmaps.contains(bitmap)) throw new IllegalStateException();
47 mBitmaps.remove(bitmap);
48 bitmap.recycle();
/frameworks/opt/chips/src/com/android/ex/chips/
H A DCircularImageView.java74 Bitmap bitmap = bitmapDrawable.getBitmap();
75 if (bitmap == null) {
79 source.set(0, 0, bitmap.getWidth(), bitmap.getHeight());
83 drawBitmapWithCircleOnCanvas(bitmap, canvas, source, destination);
87 * Given the source bitmap and a canvas, draws the bitmap through a circular
90 * @param bitmap The source bitmap to draw.
92 * @param source The source bound of the bitmap
95 drawBitmapWithCircleOnCanvas(Bitmap bitmap, Canvas canvas, RectF source, RectF dest) argument
[all...]
/frameworks/support/frameworks/support/samples/Support4Demos/src/main/java/com/example/android/supportv4/media/
H A DAlbumArtCache.java85 // requests and bitmap rescales. For production-level apps, we recommend you use
87 Bitmap[] bitmap = mCache.get(artUrl);
88 if (bitmap != null) {
90 listener.onFetched(artUrl, bitmap[BIG_BITMAP_INDEX], bitmap[ICON_BITMAP_INDEX]);
100 Bitmap bitmap = BitmapHelper.fetchAndRescaleBitmap(artUrl,
102 Bitmap icon = BitmapHelper.scaleBitmap(bitmap,
104 bitmaps = new Bitmap[] {bitmap, icon};
109 Log.d(TAG, "doInBackground: putting bitmap in cache. cache size=" + mCache.size());
/frameworks/support/samples/Support4Demos/src/main/java/com/example/android/supportv4/media/
H A DAlbumArtCache.java85 // requests and bitmap rescales. For production-level apps, we recommend you use
87 Bitmap[] bitmap = mCache.get(artUrl);
88 if (bitmap != null) {
90 listener.onFetched(artUrl, bitmap[BIG_BITMAP_INDEX], bitmap[ICON_BITMAP_INDEX]);
100 Bitmap bitmap = BitmapHelper.fetchAndRescaleBitmap(artUrl,
102 Bitmap icon = BitmapHelper.scaleBitmap(bitmap,
104 bitmaps = new Bitmap[] {bitmap, icon};
109 Log.d(TAG, "doInBackground: putting bitmap in cache. cache size=" + mCache.size());
/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

Completed in 652 milliseconds

1234567891011>>