Home
last modified time | relevance | path

Searched refs:rowBytes (Results 1 – 13 of 13) sorted by relevance

/frameworks/base/libs/hwui/hwui/
DBitmap.cpp45 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()
126 sk_sp<Bitmap> Bitmap::allocateHeapBitmap(size_t size, const SkImageInfo& info, size_t rowBytes) { in allocateHeapBitmap() argument
[all …]
DBitmap.h74 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 …]
DImageDecoder.cpp92 size_t rowBytes = info.minRowBytes(); in setTargetSize() local
93 if (rowBytes == 0) { in setTargetSize()
99 if (!Bitmap::computeAllocationSize(rowBytes, height, &pixelMemorySize)) { in setTargetSize()
335 size_t rowBytes) { in handleRestorePrevious() argument
353 srcRow += rowBytes; in handleRestorePrevious()
354 dstRow += mRestoreFrame->rowBytes(); in handleRestorePrevious()
367 srcRow += mRestoreFrame->rowBytes(); in handleRestorePrevious()
368 dstRow += rowBytes; in handleRestorePrevious()
378 SkCodec::Result ImageDecoder::decode(void* pixels, size_t rowBytes) { in decode() argument
390 if (!handleRestorePrevious(outputInfo, pixels, rowBytes)) { in decode()
[all …]
DImageDecoder.h64 SkCodec::Result decode(void* pixels, size_t rowBytes);
124 bool handleRestorePrevious(const SkImageInfo&, void* pixels, size_t rowBytes);
/frameworks/base/libs/hwui/apex/
Dandroid_bitmap.cpp113 dstBitmap->rowBytes(), 0, 0)) { in ABitmap_copy()
120 static AndroidBitmapInfo getInfo(const SkImageInfo& imageInfo, uint32_t rowBytes, bool isHardware) { in getInfo() argument
124 info.stride = rowBytes; in getInfo()
132 return getInfo(bitmap->info(), bitmap->rowBytes(), bitmap->isHardware()); in ABitmap_getInfo()
142 uint32_t rowBytes = 0; in ABitmap_getInfoFromJava() local
144 SkImageInfo imageInfo = GraphicsJNI::getBitmapInfo(env, bitmapObj, &rowBytes, &isHardware); in ABitmap_getInfoFromJava()
145 return getInfo(imageInfo, rowBytes, isHardware); in ABitmap_getInfoFromJava()
Dandroid_canvas.cpp44 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/
DBitmap.cpp58 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()
773 static bool validateImageInfo(const SkImageInfo& info, int32_t rowBytes) { in validateImageInfo() argument
775 return SkBitmap().setInfo(info, rowBytes); in validateImageInfo()
804 const int32_t rowBytes = p.readInt32(); in Bitmap_createFromParcel() local
819 if (!validateImageInfo(imageInfo, rowBytes)) { in Bitmap_createFromParcel()
823 if (!Bitmap::computeAllocationSize(rowBytes, height, &allocationSize)) { in Bitmap_createFromParcel()
[all …]
DGraphics.cpp649 const size_t rowBytes = maxInfo.minRowBytes(); in allocPixelRef() local
650 const size_t bytesNeeded = maxInfo.computeByteSize(rowBytes); in allocPixelRef()
661 rowBytes); in allocPixelRef()
666 bitmap->setInfo(bitmap->info(), rowBytes); in allocPixelRef()
696 const size_t dstRowBytes = mRecycledBitmap->rowBytes(); in copyIfNecessary()
DBitmapFactory.cpp134 const size_t size = info.computeByteSize(bitmap->rowBytes()); in allocPixelRef()
146 mBitmap->reconfigure(info, bitmap->rowBytes()); in allocPixelRef()
383 decodingBitmap.rowBytes(), &codecOptions); in doDecode()
DImageDecoder.cpp335 SkCodec::Result result = decoder->decode(bm.getPixels(), bm.rowBytes()); in ImageDecoder_nDecodeBitmap()
/frameworks/base/libs/hwui/
DReadback.cpp199 !tmpBitmap.readPixels(bitmap->info(), bitmap->getPixels(), bitmap->rowBytes(), 0, 0)) { in copySurfaceInto()
373 bitmap->rowBytes(), 0, 0)) { in copyLayerInto()
/frameworks/base/tools/aapt2/compile/
DPng.cpp149 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/
Dandroid_hardware_camera2_DngCreator.cpp634 uint8_t* rowBytes = row.editArray(); in writeToStream() local
641 ssize_t bytesRead = mInput->read(rowBytes, rowFillAmt, rowSize); in writeToStream()
665 if (stream.write(rowBytes, 0, mBytesPerSample * mSamplesPerPixel * mWidth) != OK || in writeToStream()