| /frameworks/base/core/java/com/android/internal/util/ |
| ImageUtils.java | 19 import android.graphics.Bitmap; 20 import android.graphics.Bitmap.Config; 41 // Size of the smaller bitmap we're actually going to scan. 45 private Bitmap mTempCompactBitmap; 51 * Checks whether a bitmap is grayscale. Grayscale here means "very close to a perfect 54 * Instead of scanning every pixel in the bitmap, we first resize the bitmap to no more than 58 public boolean isGrayscale(Bitmap bitmap) { 59 int height = bitmap.getHeight() [all...] |
| /frameworks/base/core/jni/android/graphics/ |
| BitmapRegionDecoder.cpp | 158 // Recycle a bitmap if possible. 159 android::Bitmap* recycledBitmap = nullptr; 162 recycledBitmap = &bitmap::toBitmap(env, javaBitmap); 164 ALOGW("Warning: Reusing an immutable bitmap as an image decoder target."); 166 recycledBytes = bitmap::getBitmapAllocationByteCount(env, javaBitmap); 178 // We are required to match the color type of the recycled bitmap. 189 SkBitmap bitmap; local 190 if (!brd->decodeRegion(&bitmap, allocator, subset, sampleSize, 197 env->SetIntField(options, gOptions_widthFieldID, bitmap.width()); 198 env->SetIntField(options, gOptions_heightFieldID, bitmap.height()) [all...] |
| Shader.cpp | 70 // Only pass a valid SkBitmap object to the constructor if the Bitmap exists. Otherwise, 72 image = android::bitmap::toBitmap(env, jbitmap).makeImage(&colorFilter); 76 SkBitmap bitmap; local 77 image = SkMakeImageFromRasterBitmap(bitmap, kNever_SkCopyPixelsMode); 299 { "nativeCreate", "(JLandroid/graphics/Bitmap;II)J", (void*)BitmapShader_constructor },
|
| /frameworks/base/core/jni/ |
| 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.
|
| android_view_TextureView.cpp | 162 SkBitmap bitmap; local 163 bitmap.setInfo(convertPixelFormat(buffer), bytesCount); 166 bitmap.setPixels(buffer.bits); 168 bitmap.setPixels(NULL); 172 nativeCanvas->setBitmap(bitmap);
|
| /frameworks/base/core/tests/coretests/src/android/graphics/ |
| PathOffsetTest.java | 20 import android.graphics.Bitmap.Config; 76 Bitmap actualBitmap = drawAndGetBitmap(actual); 77 Bitmap expectedBitmap = drawAndGetBitmap(expected); 81 private static Bitmap drawAndGetBitmap(Path path) { 82 Bitmap bitmap = Bitmap.createBitmap(WIDTH, HEIGHT, Config.ARGB_8888); local 83 bitmap.eraseColor(Color.BLACK); 86 Canvas canvas = new Canvas(bitmap); 88 return bitmap; [all...] |
| /frameworks/base/libs/hwui/ |
| SkiaShader.cpp | 23 #include "hwui/Bitmap.h" 202 SkBitmap bitmap; local 204 if (!shader.isABitmap(&bitmap, nullptr, xy)) { 209 Bitmap* hwuiBitmap = static_cast<Bitmap*>(bitmap.pixelRef()); 277 // The shader is not a gradient. Check for a bitmap shader. 289 "failed storing bitmap shader data");
|
| /frameworks/base/libs/hwui/tests/unit/ |
| VectorDrawableTests.cpp | 391 SkBitmap bitmap; local 392 bitmap.allocN32Pixels(5, 5, false); 393 SkCanvas canvas(bitmap);
|
| /frameworks/base/media/tests/CameraBrowser/src/com/android/camerabrowser/ |
| ObjectBrowser.java | 23 import android.graphics.Bitmap; 96 Bitmap bitmap = BitmapFactory.decodeByteArray(thumbnail, 0, thumbnail.length); local 97 if (bitmap != null) { 99 thumbView.setImageBitmap(bitmap);
|
| /frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/ |
| ImageListViewScrollActivity.java | 19 import android.graphics.Bitmap; 57 private static Bitmap[] mBitmapCache = new Bitmap[IMG_RES_ID.length]; 73 class BitmapWorkerTask extends AsyncTask<Integer, Void, Bitmap> { 87 protected Bitmap doInBackground(Integer... params) { 92 // Once complete, see if ImageView is still around and set bitmap. 94 protected void onPostExecute(Bitmap bitmap) { 95 if (bitmap != null) { 99 imageView.setImageBitmap(bitmap); 147 Bitmap bitmap = mBitmapCache[(cacheIdx)]; local [all...] |
| /frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
| RenderDrawable.java | 28 import android.graphics.Bitmap; 152 // create an Android bitmap around the BufferedImage 153 Bitmap bitmap = Bitmap_Delegate.createBitmap(image, local 156 // create a Canvas around the Android bitmap 157 Canvas canvas = new Canvas(bitmap);
|
| /frameworks/opt/bitmap/src/com/android/bitmap/ |
| ReusableBitmap.java | 17 package com.android.bitmap; 19 import android.graphics.Bitmap; 22 * A simple bitmap wrapper. Currently supports reference counting and logical width/height 23 * (which may differ from a bitmap's reported width/height due to bitmap reuse). 27 public final Bitmap bmp; 35 public ReusableBitmap(final Bitmap bitmap) { 36 this(bitmap, true /* reusable */); 39 public ReusableBitmap(final Bitmap bitmap, final boolean reusable) [all...] |
| /frameworks/opt/bitmap/src/com/android/bitmap/util/ |
| InputStreamBuffer.java | 17 package com.android.bitmap.util;
|
| /frameworks/opt/bitmap/src/com/android/bitmap/view/ |
| BitmapDrawableImageView.java | 17 package com.android.bitmap.view; 20 import android.graphics.Bitmap; 27 import com.android.bitmap.drawable.BasicBitmapDrawable; 127 public void setImageBitmap(final Bitmap bm) {
|
| /frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/ |
| GlifPatternDrawableTest.java | 22 import android.graphics.Bitmap; 53 final Bitmap bitmap = Bitmap.createBitmap(1366, 768, Bitmap.Config.ARGB_8888); local 54 final Canvas canvas = new Canvas(bitmap); 60 assertSameColor("Top left pixel should be #e61a1a", 0xffe61a1a, bitmap.getPixel(0, 0)); 61 assertSameColor("Center pixel should be #d90d0d", 0xffd90d0d, bitmap.getPixel(683, 384)); 63 bitmap.getPixel(1365, 767)); 71 final Bitmap bitmap = Bitmap.createBitmap(1366, 768, Bitmap.Config.ARGB_8888) local [all...] |
| /frameworks/rs/tests/java_api/HealingBrush/src/rs/example/android/com/healingbrush/ |
| MediaStoreSaver.java | 21 import android.graphics.Bitmap; 35 public static final String save(Bitmap bitmap, 51 Bitmap.CompressFormat format = Bitmap.CompressFormat.PNG; 54 format = Bitmap.CompressFormat.JPEG; 59 bitmap.compress(format, 100, fOut);
|
| /frameworks/rs/tests/java_api/SSHealingBrush/src/rs/example/android/com/healingbrush/ |
| MediaStoreSaver.java | 21 import android.graphics.Bitmap; 35 public static final String save(Bitmap bitmap, 51 Bitmap.CompressFormat format = Bitmap.CompressFormat.PNG; 54 format = Bitmap.CompressFormat.JPEG; 59 bitmap.compress(format, 100, fOut);
|
| /frameworks/support/graphics/drawable/animated/src/androidTest/java/androidx/vectordrawable/graphics/drawable/tests/ |
| DrawableUtils.java | 20 import android.graphics.Bitmap; 33 public static void saveVectorDrawableIntoPNG(Resources resource, Bitmap bitmap, int resId, 62 bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
|
| /frameworks/support/leanback/src/main/java/androidx/leanback/media/ |
| MediaControllerGlue.java | 20 import android.graphics.Bitmap; 169 Bitmap bitmap = mMediaController.getMetadata().getDescription().getIconBitmap(); local 170 return bitmap == null ? null : new BitmapDrawable(getContext().getResources(), bitmap);
|
| /frameworks/support/palette/src/androidTest/java/androidx/palette/graphics/ |
| BucketTests.java | 23 import android.graphics.Bitmap; 41 final Bitmap sample = TestUtils.loadSampleBitmap(); 70 final Bitmap sample = TestUtils.loadSampleBitmap(); 80 final Bitmap sample = TestUtils.loadSampleBitmap(); 90 final Bitmap sample = TestUtils.loadSampleBitmap(); 101 final Bitmap bitmap = Bitmap.createBitmap(1000, 1, Bitmap.Config.ARGB_8888); local 103 Palette.Builder b = new Palette.Builder(bitmap); 110 final Bitmap bitmap = Bitmap.createBitmap(1, 1000, Bitmap.Config.ARGB_8888); local 119 final Bitmap bitmap = Bitmap.createBitmap(300, 300, Bitmap.Config.ARGB_8888); local 134 final Bitmap bitmap = Bitmap.createBitmap(300, 300, Bitmap.Config.ARGB_8888); local 151 final Bitmap bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888); local [all...] |
| ConsistencyTest.java | 21 import android.graphics.Bitmap; 37 final Bitmap bitmap = TestUtils.loadSampleBitmap(); local 40 Palette newPalette = Palette.from(bitmap).generate();
|
| /packages/apps/Camera2/src/com/android/camera/data/ |
| FilmstripItemUtils.java | 19 import android.graphics.Bitmap; 58 * Decodes the dimension of a bitmap. 60 * @param is An input stream with the data of the bitmap. 72 Log.e(TAG, "Bitmap dimension decoding failed"); 90 public static Bitmap loadImageThumbnailFromStream(InputStream stream, int imageWidth, 103 // Generate Bitmap of maximum size that fits into widthBound x heightBound. 117 // Bitmap requests: 130 Bitmap b = BitmapFactory.decodeStream(stream, null, opts); 137 // If Bitmap maximum edge > MAXIMUM_TEXTURE_SIZE, which can happen for panoramas, 142 b = Bitmap.createScaledBitmap(b, b.getWidth() * GL11.GL_MAX_TEXTURE_SIZE / maxEdge 163 Bitmap bitmap = null; local [all...] |
| /packages/apps/Camera2/src/com/android/camera/one/v2/imagesaver/ |
| JpegImageBackendImageSaver.java | 19 import android.graphics.Bitmap; 125 // Bitmap 128 final Bitmap bitmap = BitmapFactory.decodeByteArray(payload.data, 0, local 133 // NOT applied to the bitmap directly. 135 mSession.updateCaptureIndicatorThumbnail(bitmap, rotation); 154 /** Factor to downsample full-size JPEG image for use in thumbnail bitmap. */
|
| YuvImageBackendImageSaver.java | 19 import android.graphics.Bitmap; 136 // Load bitmap into CameraAppUI 139 final Bitmap bitmap = Bitmap.createBitmap(payload.data, local 141 task.result.height, Bitmap.Config.ARGB_8888); 142 mSession.updateCaptureIndicatorThumbnail(bitmap, mImageRotation.getDegrees()); 145 final Bitmap bitmapIntermediate = Bitmap.createBitmap(payload.data, 147 task.result.height, Bitmap.Config.ARGB_8888) [all...] |
| /packages/apps/Camera2/src/com/android/camera/session/ |
| PlaceholderManager.java | 22 import android.graphics.Bitmap; 85 public Placeholder insertPlaceholder(String title, Bitmap placeholder, long timestamp) { 107 Bitmap bitmap = BitmapFactory.decodeByteArray(placeholder, 0, placeholder.length, options); local 108 return insertPlaceholder(title, bitmap, timestamp); 148 * @param placeholder the placeholder bitmap 150 public void replacePlaceholder(Placeholder session, Bitmap placeholder) { 158 * @param placeholder the session for which to retrieve bitmap placeholder 160 public Optional<Bitmap> getPlaceholder(Placeholder placeholder) { 168 * @param placeholder the session for which to remove the bitmap placeholder [all...] |