/aosp12/frameworks/base/opengl/java/android/opengl/ |
H A D | GLUtils.java | 41 if (bitmap == null) { in getInternalFormat() 44 if (bitmap.isRecycled()) { in getInternalFormat() 63 if (bitmap == null) { in getType() 66 if (bitmap.isRecycled()) { in getType() 100 if (bitmap == null) { in texImage2D() 103 if (bitmap.isRecycled()) { in texImage2D() 126 if (bitmap == null) { in texImage2D() 148 if (bitmap == null) { in texImage2D() 182 Bitmap bitmap) { in texSubImage2D() argument 183 if (bitmap == null) { in texSubImage2D() [all …]
|
/aosp12/art/runtime/gc/accounting/ |
H A D | heap_bitmap-inl.h | 31 bitmap->VisitMarkedRange(bitmap->HeapBegin(), bitmap->HeapLimit(), visitor); in Visit() 34 bitmap->VisitMarkedRange(bitmap->HeapBegin(), bitmap->HeapLimit(), visitor); in Visit() 40 if (LIKELY(bitmap != nullptr)) { in Test() 41 return bitmap->Test(obj); in Test() 54 if (LIKELY(bitmap != nullptr)) { in Clear() 55 bitmap->Clear(obj); in Clear() 69 if (LIKELY(bitmap != nullptr)) { in Set() 70 return bitmap->Set(obj); in Set() 86 if (LIKELY(bitmap != nullptr)) { in AtomicTestAndSet() 102 return bitmap; in GetContinuousSpaceBitmap() [all …]
|
H A D | heap_bitmap.cc | 27 DCHECK(bitmap != nullptr); in AddContinuousSpaceBitmap() 30 CHECK(bitmap->HeapBegin() >= cur_bitmap->HeapLimit() || in AddContinuousSpaceBitmap() 31 bitmap->HeapLimit() <= cur_bitmap->HeapBegin()) in AddContinuousSpaceBitmap() 32 << "Bitmap " << bitmap->Dump() << " overlaps with existing bitmap " in AddContinuousSpaceBitmap() 35 continuous_space_bitmaps_.push_back(bitmap); in AddContinuousSpaceBitmap() 39 DCHECK(bitmap != nullptr); in RemoveContinuousSpaceBitmap() 45 void HeapBitmap::AddLargeObjectBitmap(LargeObjectBitmap* bitmap) { in AddLargeObjectBitmap() argument 46 DCHECK(bitmap != nullptr); in AddLargeObjectBitmap() 47 large_object_bitmaps_.push_back(bitmap); in AddLargeObjectBitmap() 50 void HeapBitmap::RemoveLargeObjectBitmap(LargeObjectBitmap* bitmap) { in RemoveLargeObjectBitmap() argument [all …]
|
/aosp12/frameworks/base/libs/hwui/jni/ |
H A D | Bitmap.cpp | 68 Bitmap& bitmap() { in bitmap() function in android::BitmapWrapper 174 namespace bitmap { namespace 242 SkASSERT(bitmap); in getNativeBitmap() 252 SkASSERT(bitmap); in getBitmapInfo() 315 SkBitmap bitmap; in Bitmap_creator() local 403 return bitmap; in Bitmap_copyAshmemImpl() 425 delete bitmap; in Bitmap_destruct() 892 SkBitmap bitmap; in Bitmap_writeToParcel() local 1015 SkBitmap bitmap; in Bitmap_getPixel() local 1029 SkBitmap bitmap; in Bitmap_getColor() local [all …]
|
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/pipeline/ |
H A D | CachingPipeline.java | 226 bitmap = mEnvironment.getBitmapCopy(bitmap, BitmapCache.HIGHRES); in renderHighres() 227 bitmap = preset.applyGeometry(bitmap, mEnvironment); in renderHighres() 251 bitmap = mEnvironment.getBitmapCopy(bitmap, BitmapCache.GEOMETRY); in renderGeometry() 252 bitmap = preset.applyGeometry(bitmap, mEnvironment); in renderGeometry() 273 bitmap = mEnvironment.getBitmapCopy(bitmap, BitmapCache.FILTERS); in renderFilters() 274 bitmap = preset.apply(bitmap, mEnvironment); in renderFilters() 407 bitmap = preset.applyGeometry(bitmap, mEnvironment); in renderFinalImage() 408 bitmap = preset.apply(bitmap, mEnvironment); in renderFinalImage() 409 return bitmap; in renderFinalImage() 449 bitmap.getWidth() != mWidth || bitmap.getHeight() != mHeight) { in prepareRenderscriptAllocations() [all …]
|
/aosp12/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/common/ |
H A D | BitmapUtils.java | 119 if (width == bitmap.getWidth() in resizeBitmapByScale() 120 && height == bitmap.getHeight()) return bitmap; in resizeBitmapByScale() 126 if (recycle) bitmap.recycle(); in resizeBitmapByScale() 140 int srcWidth = bitmap.getWidth(); in resizeDownBySideLength() 149 int w = bitmap.getWidth(); in resizeAndCropCenter() 150 int h = bitmap.getHeight(); in resizeAndCropCenter() 165 if (recycle) bitmap.recycle(); in resizeAndCropCenter() 170 if (bitmap == null) return; in recycleSilently() 172 bitmap.recycle(); in recycleSilently() 186 return bitmap; in rotateBitmap() [all …]
|
/aosp12/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
H A D | BitmapUtils.java | 119 if (width == bitmap.getWidth() in resizeBitmapByScale() 120 && height == bitmap.getHeight()) return bitmap; in resizeBitmapByScale() 126 if (recycle) bitmap.recycle(); in resizeBitmapByScale() 140 int srcWidth = bitmap.getWidth(); in resizeDownBySideLength() 149 int w = bitmap.getWidth(); in resizeAndCropCenter() 150 int h = bitmap.getHeight(); in resizeAndCropCenter() 165 if (recycle) bitmap.recycle(); in resizeAndCropCenter() 170 if (bitmap == null) return; in recycleSilently() 172 bitmap.recycle(); in recycleSilently() 186 return bitmap; in rotateBitmap() [all …]
|
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/cache/ |
H A D | BitmapCache.java | 55 Bitmap bitmap; field in BitmapCache.BitmapTracking 64 if (tracking.bitmap == bitmap) { in track() 69 tracking.bitmap = bitmap; in track() 78 if (tracking.bitmap == bitmap) { in untrack() 126 cache(bitmap); in cache() 130 if (bitmap == null) { in cache() 138 untrack(bitmap); in cache() 144 Long key = calcKey(bitmap.getWidth(), bitmap.getHeight()); in cache() 189 if (bitmap == null in getBitmap() 203 return bitmap; in getBitmap() [all …]
|
/aosp12/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/tests/src/androidx/media/filterfw/samples/simplecamera/ |
H A D | FaceSquareFilterTest.java | 63 image.setBitmap(bitmap); in testFaceSquareFilter() 80 bitmap.getPixels(pixels, 0, bitmap.getWidth(), 0, 0, bitmap.getWidth(), in testFaceSquareFilter() 81 bitmap.getHeight()); in testFaceSquareFilter() 94 } else if (top > bitmap.getHeight()) { in testFaceSquareFilter() 95 top = bitmap.getHeight(); in testFaceSquareFilter() 100 left = bitmap.getWidth(); in testFaceSquareFilter() 102 if (bottom > bitmap.getHeight()) { in testFaceSquareFilter() 103 bottom = bitmap.getHeight(); in testFaceSquareFilter() 107 if (right > bitmap.getWidth()) { in testFaceSquareFilter() 108 right = bitmap.getWidth(); in testFaceSquareFilter() [all …]
|
/aosp12/frameworks/base/libs/hwui/ |
H A D | Readback.cpp | 172 SK_RECT_ARGS(SkRect::MakeWH(bitmap->width(), bitmap->height()))); in copySurfaceInto() 174 SkRect::MakeWH(bitmap->width(), bitmap->height()), in copySurfaceInto() 176 if (srcRect.width() != bitmap->width() || srcRect.height() != bitmap->height()) { in copySurfaceInto() 192 if (!tmpSurface->readPixels(*bitmap, 0, 0)) { in copySurfaceInto() 199 !tmpBitmap.readPixels(bitmap->info(), bitmap->getPixels(), bitmap->rowBytes(), 0, 0)) { in copySurfaceInto() 205 bitmap->notifyPixelsChanged(); in copySurfaceInto() 269 const SkRect dstRect = SkRect::MakeIWH(bitmap->width(), bitmap->height()); in copyLayerInto() 311 SkRect skiaDestRect = SkRect::MakeWH(bitmap->width(), bitmap->height()); in copyImageInto() 335 SkBitmap* bitmap) { in copyLayerInto() argument 372 !tmpBitmap.readPixels(bitmap->info(), bitmap->getPixels(), in copyLayerInto() [all …]
|
/aosp12/packages/apps/WallpaperPicker/src/com/android/gallery3d/glrenderer/ |
H A D | UploadedTexture.java | 63 Bitmap bitmap = sBorderLines.get(key); in getBorderLine() local 64 if (bitmap == null) { in getBorderLine() 65 bitmap = vertical in getBorderLine() 68 sBorderLines.put(key, bitmap); in getBorderLine() 70 return bitmap; in getBorderLine() 129 Bitmap bitmap = getBitmap(); in updateContent() local 131 int type = GLUtils.getType(bitmap); in updateContent() 139 Bitmap bitmap = getBitmap(); in uploadToCanvas() local 140 if (bitmap != null) { in uploadToCanvas() 142 int bWidth = bitmap.getWidth(); in uploadToCanvas() [all …]
|
/aosp12/packages/apps/LegacyCamera/src/com/android/camera/ |
H A D | Thumbnail.java | 90 bitmap.getWidth(), bitmap.getHeight(), m, true); in rotateImage() 93 if (rotated != bitmap) bitmap.recycle(); in rotateImage() 99 return bitmap; in rotateImage() 129 Bitmap bitmap = null; in loadFrom() local 160 Bitmap bitmap = null; in getLastThumbnail() 265 Bitmap bitmap = null; in createVideoThumbnail() local 285 if (bitmap == null) return null; in createVideoThumbnail() 288 int width = bitmap.getWidth(); in createVideoThumbnail() 294 bitmap = Bitmap.createScaledBitmap(bitmap, w, h, true); in createVideoThumbnail() 296 return bitmap; in createVideoThumbnail() [all …]
|
/aosp12/frameworks/base/libs/hwui/apex/ |
H A D | android_bitmap.cpp | 33 if (bitmap) { in ABitmap_acquireBitmapFromJava() 34 bitmap->ref(); in ABitmap_acquireBitmapFromJava() 40 void ABitmap_acquireRef(ABitmap* bitmap) { in ABitmap_acquireRef() argument 41 SkSafeRef(TypeCast::toBitmap(bitmap)); in ABitmap_acquireRef() 44 void ABitmap_releaseRef(ABitmap* bitmap) { in ABitmap_releaseRef() argument 132 return getInfo(bitmap->info(), bitmap->rowBytes(), bitmap->isHardware()); in ABitmap_getInfo() 150 if (bitmap->isHardware()) { in ABitmap_getPixels() 153 return bitmap->pixels(); in ABitmap_getPixels() 166 if (!bitmap->isImmutable()) { in ABitmap_notifyPixelsChanged() 167 bitmap->notifyPixelsChanged(); in ABitmap_notifyPixelsChanged() [all …]
|
/aosp12/frameworks/opt/setupwizard/library/recyclerview/test/instrumentation/src/com/android/setupwizardlib/test/ |
H A D | DividerItemDecorationTest.java | 80 assertBitmapEquals(expectedBitmap, bitmap); in testShouldDrawDividerBelowWithEitherCondition() 82 bitmap.recycle(); in testShouldDrawDividerBelowWithEitherCondition() 85 assertBitmapEquals(expectedBitmap, bitmap); in testShouldDrawDividerBelowWithEitherCondition() 87 bitmap.recycle(); in testShouldDrawDividerBelowWithEitherCondition() 93 assertBitmapEquals(expectedBitmap, bitmap); in testShouldDrawDividerBelowWithEitherCondition() 95 bitmap.recycle(); in testShouldDrawDividerBelowWithEitherCondition() 124 bitmap.recycle(); in testShouldDrawDividerBelowWithBothCondition() 132 bitmap.recycle(); in testShouldDrawDividerBelowWithBothCondition() 138 bitmap.recycle(); in testShouldDrawDividerBelowWithBothCondition() 149 Canvas canvas = new Canvas(bitmap); in drawDecoration() [all …]
|
/aosp12/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/ |
H A D | LogoUtilsTest.java | 37 Bitmap bitmap = createSampleBitmap(20, 30); in testPartiallyResizedBitmap() local 38 File tempFile = writeBitmapToTempFile(bitmap); in testPartiallyResizedBitmap() 51 Bitmap bitmap = createSampleBitmap(8, 32); in testPartiallyResizedElongatedBitmap() local 65 Bitmap bitmap = createSampleBitmap(16, 32); in testResizeBitmapKeepRatio() local 74 Bitmap bitmap = createSampleBitmap(16, 32); in testResizeBitmapNoScalingNeeded() local 84 Bitmap bitmap = createSampleBitmap(15, 15); in testResizeBitmapNoIntegerRatio() local 92 Bitmap bitmap = createSampleBitmap(7, 5); in testSaveGetOrganisationLogo() local 120 Canvas canvas = new Canvas(bitmap); in createSampleBitmap() 124 return bitmap; in createSampleBitmap() 141 Canvas canvas = new Canvas(bitmap); in bitmapFromDrawable() [all …]
|
H A D | UriBitmap.java | 34 private UriBitmap(Bitmap bitmap, Uri uri, File tempFile) { in UriBitmap() argument 35 mBitmap = bitmap; in UriBitmap() 52 Bitmap bitmap = generateSampleBitmap(); in createSimpleInstance() local 54 Uri uri = bitmapToUri(bitmap, tempFile); in createSimpleInstance() 55 return new UriBitmap(bitmap, uri, tempFile); in createSimpleInstance() 59 Bitmap bitmap = Bitmap.createBitmap(15, 15, Bitmap.Config.ARGB_8888); in generateSampleBitmap() local 60 for (int x = 0; x < bitmap.getWidth(); x++) { in generateSampleBitmap() 61 for (int y = 0; y < bitmap.getHeight(); y++) { in generateSampleBitmap() 62 bitmap.setPixel(x, y, Color.rgb(x, y, x + y)); in generateSampleBitmap() 65 return bitmap; in generateSampleBitmap() [all …]
|
/aosp12/frameworks/base/core/java/com/android/internal/graphics/palette/ |
H A D | Palette.java | 74 return new Builder(bitmap, quantizer); in from() 201 if (bitmap == null || bitmap.isRecycled()) { in Builder() 205 mBitmap = bitmap; in Builder() 337 bitmap.getWidth()); in generate() 339 bitmap.getHeight()); in generate() 348 if (bitmap != mBitmap) { in generate() 349 bitmap.recycle(); in generate() 434 int bitmapArea = bitmap.getWidth() * bitmap.getHeight(); 439 int maxDimension = Math.max(bitmap.getWidth(), bitmap.getHeight()); 447 return bitmap; [all …]
|
/aosp12/frameworks/base/native/graphics/jni/ |
H A D | bitmap.cpp | 39 android::graphics::Bitmap bitmap(env, jbitmap); in AndroidBitmap_getDataSpace() local 40 if (!bitmap.isValid()) { in AndroidBitmap_getDataSpace() 44 return bitmap.getDataSpace(); in AndroidBitmap_getDataSpace() 52 android::graphics::Bitmap bitmap(env, jbitmap); in AndroidBitmap_lockPixels() local 53 void* addr = bitmap.isValid() ? bitmap.getPixels() : nullptr; in AndroidBitmap_lockPixels() 59 ABitmap_acquireRef(bitmap.get()); in AndroidBitmap_lockPixels() 74 if (!bitmap.isValid()) { in AndroidBitmap_unlockPixels() 78 bitmap.notifyPixelsChanged(); in AndroidBitmap_unlockPixels() 79 ABitmap_releaseRef(bitmap.get()); in AndroidBitmap_unlockPixels() 90 if (!bitmap.isValid()) { in AndroidBitmap_getHardwareBuffer() [all …]
|
/aosp12/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/ |
H A D | BitmapTransformer.java | 37 public static Bitmap applyFillTransformation(Bitmap bitmap, Point fillSize) { in applyFillTransformation() argument 43 int horizontalOffset = (bitmap.getWidth() - resultBitmap.getWidth()) / 2; in applyFillTransformation() 44 int verticalOffset = (bitmap.getHeight() - resultBitmap.getHeight()) / 2; in applyFillTransformation() 50 int pixelArraySize = Math.min(resultBitmap.getWidth(), bitmap.getWidth()) in applyFillTransformation() 51 * Math.min(resultBitmap.getHeight(), bitmap.getHeight()); in applyFillTransformation() 55 bitmap.getPixels( in applyFillTransformation() 58 bitmap.getWidth() /* stride */, in applyFillTransformation() 61 Math.min(resultBitmap.getWidth(), bitmap.getWidth()) /* width */, in applyFillTransformation() 62 Math.min(resultBitmap.getHeight(), bitmap.getHeight()) /* height */); in applyFillTransformation() 68 bitmap.getWidth() /* stride */, in applyFillTransformation() [all …]
|
/aosp12/frameworks/opt/photoviewer/src/com/android/ex/photo/loaders/ |
H A D | PhotoBitmapLoader.java | 58 if (result.bitmap != null) { in loadInBackground() 59 result.bitmap.setDensity(DisplayMetrics.DENSITY_MEDIUM); in loadInBackground() 77 Bitmap bitmap = result != null ? result.bitmap : null; in deliverResult() local 81 if (bitmap != null) { in deliverResult() 82 onReleaseResources(bitmap); in deliverResult() 87 mBitmap = bitmap; in deliverResult() 113 result.bitmap = mBitmap; in onStartLoading() 142 onReleaseResources(result.bitmap); in onCanceled() 168 protected void onReleaseResources(Bitmap bitmap) { in onReleaseResources() argument 169 if (bitmap != null && !bitmap.isRecycled()) { in onReleaseResources() [all …]
|
/aosp12/frameworks/base/libs/input/ |
H A D | SpriteIcon.h | 30 inline SpriteIcon(const graphics::Bitmap& bitmap, int32_t style, float hotSpotX, float hotSpotY) in SpriteIcon() 31 : bitmap(bitmap), style(style), hotSpotX(hotSpotX), hotSpotY(hotSpotY) {} in SpriteIcon() 33 graphics::Bitmap bitmap; member 39 return SpriteIcon(bitmap.copy(ANDROID_BITMAP_FORMAT_RGBA_8888), style, hotSpotX, hotSpotY); in copy() 43 bitmap.reset(); in reset() 49 inline bool isValid() const { return bitmap.isValid() && !bitmap.isEmpty(); } in isValid() 51 inline int32_t width() const { return bitmap.getInfo().width; } in width() 52 inline int32_t height() const { return bitmap.getInfo().height; } in height()
|
/aosp12/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/ |
H A D | UploadedTexture.java | 124 Bitmap bitmap = sBorderLines.get(key); in getBorderLine() local 125 if (bitmap == null) { in getBorderLine() 126 bitmap = vertical in getBorderLine() 129 sBorderLines.put(key.clone(), bitmap); in getBorderLine() local 131 return bitmap; in getBorderLine() 193 Bitmap bitmap = getBitmap(); in updateContent() local 195 int type = GLUtils.getType(bitmap); in updateContent() 212 Bitmap bitmap = getBitmap(); in uploadToCanvas() local 213 if (bitmap != null) { in uploadToCanvas() 215 int bWidth = bitmap.getWidth(); in uploadToCanvas() [all …]
|
/aosp12/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
H A D | UploadedTexture.java | 124 Bitmap bitmap = sBorderLines.get(key); in getBorderLine() local 125 if (bitmap == null) { in getBorderLine() 126 bitmap = vertical in getBorderLine() 129 sBorderLines.put(key.clone(), bitmap); in getBorderLine() local 131 return bitmap; in getBorderLine() 193 Bitmap bitmap = getBitmap(); in updateContent() local 195 int type = GLUtils.getType(bitmap); in updateContent() 212 Bitmap bitmap = getBitmap(); in uploadToCanvas() local 213 if (bitmap != null) { in uploadToCanvas() 215 int bWidth = bitmap.getWidth(); in uploadToCanvas() [all …]
|
/aosp12/frameworks/base/libs/hwui/tests/unit/ |
H A D | ABitmapTests.cpp | 29 sk_sp<Bitmap> bitmap(TestUtils::createBitmap(1, 1)); in TEST() local 30 ABitmap* abmp = android::TypeCast::toABitmap(bitmap.get()); in TEST() 33 uint32_t genID = bitmap->getGenerationID(); in TEST() 35 ASSERT_TRUE(bitmap->getGenerationID() != genID); in TEST() 38 ASSERT_FALSE(bitmap->isImmutable()); in TEST() 39 bitmap->setImmutable(); in TEST() 40 ASSERT_TRUE(bitmap->isImmutable()); in TEST() 43 genID = bitmap->getGenerationID(); in TEST() 45 ASSERT_TRUE(bitmap->getGenerationID() == genID); in TEST()
|
/aosp12/packages/apps/Dialer/java/com/android/dialer/util/ |
H A D | DrawableConverter.java | 53 Bitmap bitmap; in drawableToBitmap() local 55 bitmap = ((BitmapDrawable) drawable).getBitmap(); in drawableToBitmap() 58 bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in drawableToBitmap() 61 bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); in drawableToBitmap() 63 bitmap = in drawableToBitmap() 73 bitmap.getWidth(), in drawableToBitmap() 74 bitmap.getHeight()); in drawableToBitmap() 76 Canvas canvas = new Canvas(bitmap); in drawableToBitmap() 80 return bitmap; in drawableToBitmap() 86 Bitmap bitmap = drawableToBitmap(photo); in getRoundedDrawable() local [all …]
|