/frameworks/base/libs/hwui/hwui/ |
D | Bitmap.cpp | 45 bool Bitmap::computeAllocationSize(size_t rowBytes, int height, size_t* size) { in computeAllocationSize() argument 47 !__builtin_mul_overflow(rowBytes, (size_t)height, size) && in computeAllocationSize() 51 typedef sk_sp<Bitmap> (*AllocPixelRef)(size_t allocSize, const SkImageInfo& info, size_t rowBytes); 64 const size_t rowBytes = bitmap->rowBytes(); in allocateBitmap() local 65 if (!Bitmap::computeAllocationSize(rowBytes, bitmap->height(), &size)) { in allocateBitmap() 69 auto wrapper = alloc(size, info, rowBytes); in allocateBitmap() 80 sk_sp<Bitmap> Bitmap::allocateAshmemBitmap(size_t size, const SkImageInfo& info, size_t rowBytes) { in allocateAshmemBitmap() argument 99 return sk_sp<Bitmap>(new Bitmap(addr, fd, size, info, rowBytes)); in allocateAshmemBitmap() 101 return Bitmap::allocateHeapBitmap(size, info, rowBytes); in allocateAshmemBitmap() 130 sk_sp<Bitmap> Bitmap::allocateHeapBitmap(size_t size, const SkImageInfo& info, size_t rowBytes) { in allocateHeapBitmap() argument [all …]
|
D | Bitmap.h | 74 static sk_sp<Bitmap> allocateHeapBitmap(size_t size, const SkImageInfo& i, size_t rowBytes); 90 static sk_sp<Bitmap> createFrom(const SkImageInfo& info, size_t rowBytes, int fd, void* addr, 94 int rowBytesAsPixels() const { return rowBytes() >> mInfo.shiftPerPixel(); } in rowBytesAsPixels() 96 void reconfigure(const SkImageInfo& info, size_t rowBytes); 136 static BitmapPalette computePalette(const SkImageInfo& info, const void* addr, size_t rowBytes); 139 return computePalette(bitmap.info(), bitmap.getPixels(), bitmap.rowBytes()); in computePalette() 144 mPalette = computePalette(info(), pixels(), rowBytes()); in palette() 152 static bool computeAllocationSize(size_t rowBytes, int height, size_t* size); 169 static sk_sp<Bitmap> allocateAshmemBitmap(size_t size, const SkImageInfo& i, size_t rowBytes); 171 Bitmap(void* address, size_t allocSize, const SkImageInfo& info, size_t rowBytes); [all …]
|
D | ImageDecoder.cpp | 91 size_t rowBytes = info.minRowBytes(); in setTargetSize() local 92 if (rowBytes == 0) { in setTargetSize() 98 if (!Bitmap::computeAllocationSize(rowBytes, height, &pixelMemorySize)) { in setTargetSize() 336 size_t rowBytes) { in handleRestorePrevious() argument 354 srcRow += rowBytes; in handleRestorePrevious() 355 dstRow += mRestoreFrame->rowBytes(); in handleRestorePrevious() 368 srcRow += mRestoreFrame->rowBytes(); in handleRestorePrevious() 369 dstRow += rowBytes; in handleRestorePrevious() 379 SkCodec::Result ImageDecoder::decode(void* pixels, size_t rowBytes) { in decode() argument 391 if (!handleRestorePrevious(outputInfo, pixels, rowBytes)) { in decode() [all …]
|
D | ImageDecoder.h | 64 SkCodec::Result decode(void* pixels, size_t rowBytes); 124 bool handleRestorePrevious(const SkImageInfo&, void* pixels, size_t rowBytes);
|
/frameworks/base/libs/hwui/apex/ |
D | android_bitmap.cpp | 117 dstBitmap->rowBytes(), 0, 0)) { in ABitmap_copy() 124 static AndroidBitmapInfo getInfo(const SkImageInfo& imageInfo, uint32_t rowBytes, bool isHardware) { in getInfo() argument 128 info.stride = rowBytes; in getInfo() 136 return getInfo(bitmap->info(), bitmap->rowBytes(), bitmap->isHardware()); in ABitmap_getInfo() 146 uint32_t rowBytes = 0; in ABitmap_getInfoFromJava() local 148 SkImageInfo imageInfo = GraphicsJNI::getBitmapInfo(env, bitmapObj, &rowBytes, &isHardware); in ABitmap_getInfoFromJava() 149 return getInfo(imageInfo, rowBytes, isHardware); in ABitmap_getInfoFromJava()
|
D | android_canvas.cpp | 44 size_t rowBytes = buffer->stride * imageInfo.bytesPerPixel(); in convert() local 48 sk_sp<SkSurface> surface = SkSurface::MakeRasterDirect(imageInfo, buffer->bits, rowBytes); in convert() 51 outBitmap->setInfo(imageInfo, rowBytes); in convert()
|
/frameworks/base/libs/hwui/jni/ |
D | Bitmap.cpp | 58 mRowBytes = mBitmap->rowBytes(); in freePixels() 118 size_t rowBytes() const { in rowBytes() function in android::BitmapWrapper 120 return mBitmap->rowBytes(); in rowBytes() 257 *outRowBytes = localBitmap->rowBytes(); in getBitmapInfo() 513 return static_cast<jint>(bitmap->rowBytes()); in Bitmap_rowBytes() 771 static bool validateImageInfo(const SkImageInfo& info, int32_t rowBytes) { in validateImageInfo() argument 773 return SkBitmap().setInfo(info, rowBytes); in validateImageInfo() 802 const int32_t rowBytes = p.readInt32(); in Bitmap_createFromParcel() local 817 if (!validateImageInfo(imageInfo, rowBytes)) { in Bitmap_createFromParcel() 821 if (!Bitmap::computeAllocationSize(rowBytes, height, &allocationSize)) { in Bitmap_createFromParcel() [all …]
|
D | Graphics.cpp | 647 const size_t rowBytes = maxInfo.minRowBytes(); in allocPixelRef() local 648 const size_t bytesNeeded = maxInfo.computeByteSize(rowBytes); in allocPixelRef() 659 rowBytes); in allocPixelRef() 664 bitmap->setInfo(bitmap->info(), rowBytes); in allocPixelRef() 694 const size_t dstRowBytes = mRecycledBitmap->rowBytes(); in copyIfNecessary()
|
D | BitmapFactory.cpp | 134 const size_t size = info.computeByteSize(bitmap->rowBytes()); in allocPixelRef() 146 mBitmap->reconfigure(info, bitmap->rowBytes()); in allocPixelRef() 383 decodingBitmap.rowBytes(), &codecOptions); in doDecode()
|
D | ImageDecoder.cpp | 335 SkCodec::Result result = decoder->decode(bm.getPixels(), bm.rowBytes()); in ImageDecoder_nDecodeBitmap()
|
/frameworks/base/libs/hwui/ |
D | Readback.cpp | 224 !tmpBitmap.readPixels(bitmap->info(), bitmap->getPixels(), bitmap->rowBytes(), 0, 0)) { in copySurfaceInto() 385 bitmap->rowBytes(), 0, 0)) { in copyLayerInto()
|
/frameworks/rs/toolkit/test/ |
D | AllTests.kt | 78 require(bitmap.rowBytes == bitmap.width * 4) { in <lambda>() 81 require(bitmap.byteCount == bitmap.rowBytes * bitmap.height) in <lambda>()
|
/frameworks/base/tools/aapt2/compile/ |
D | Png.cpp | 149 const uint32_t rowBytes = png_get_rowbytes(readPtr, infoPtr); in readPng() local 152 outInfo->rows[i] = new png_byte[rowBytes]; in readPng()
|
/frameworks/base/core/jni/ |
D | android_hardware_camera2_DngCreator.cpp | 635 uint8_t* rowBytes = row.editArray(); in writeToStream() local 642 ssize_t bytesRead = mInput->read(rowBytes, rowFillAmt, rowSize); in writeToStream() 666 if (stream.write(rowBytes, 0, mBytesPerSample * mSamplesPerPixel * mWidth) != OK || in writeToStream()
|
/frameworks/rs/toolkit/java/ |
D | Toolkit.kt | 1493 require(inputBitmap.width * vectorSize(inputBitmap) == inputBitmap.rowBytes) { in validateBitmap()
|