/external/skia/src/core/ |
D | SkMallocPixelRef.cpp | 49 size_t rowBytes) { in MakeDirect() argument 53 return sk_sp<SkPixelRef>(new SkMallocPixelRef(info, addr, rowBytes, nullptr, nullptr)); in MakeDirect() 60 size_t rowBytes = requestedRowBytes; in MakeUsing() local 61 if (rowBytes == 0) { in MakeUsing() 62 rowBytes = info.minRowBytes(); in MakeUsing() 66 if (!is_valid(info) || !info.validRowBytes(rowBytes)) { in MakeUsing() 70 if (!info.isEmpty() && rowBytes) { in MakeUsing() 71 size = info.computeByteSize(rowBytes); in MakeUsing() 81 return sk_sp<SkPixelRef>(new SkMallocPixelRef(info, addr, rowBytes, in MakeUsing() 85 sk_sp<SkPixelRef> SkMallocPixelRef::MakeAllocate(const SkImageInfo& info, size_t rowBytes) { in MakeAllocate() argument [all …]
|
D | SkBitmap.cpp | 108 bool SkBitmap::setInfo(const SkImageInfo& info, size_t rowBytes) { in setInfo() argument 120 if (!SkTFitsIn<int32_t>(rowBytes)) { in setInfo() 129 rowBytes = 0; in setInfo() 130 } else if (0 == rowBytes) { in setInfo() 131 rowBytes = (size_t)mrb; in setInfo() 132 } else if (!info.validRowBytes(rowBytes)) { in setInfo() 137 fPixmap.reset(info.makeAlphaType(newAT), nullptr, SkToU32(rowBytes)); in setInfo() 150 fPixmap.reset(std::move(newInfo), fPixmap.addr(), fPixmap.rowBytes()); in setAlphaType() 159 size_t rb = this->rowBytes(); in pixelRefOrigin() 181 size_t rowBytes = this->rowBytes(); in setPixelRef() local [all …]
|
/external/skqp/src/core/ |
D | SkMallocPixelRef.cpp | 49 size_t rowBytes) { in MakeDirect() argument 53 return sk_sp<SkPixelRef>(new SkMallocPixelRef(info, addr, rowBytes, nullptr, nullptr)); in MakeDirect() 60 size_t rowBytes = requestedRowBytes; in MakeUsing() local 61 if (rowBytes == 0) { in MakeUsing() 62 rowBytes = info.minRowBytes(); in MakeUsing() 66 if (!is_valid(info) || !info.validRowBytes(rowBytes)) { in MakeUsing() 70 if (!info.isEmpty() && rowBytes) { in MakeUsing() 71 size = info.computeByteSize(rowBytes); in MakeUsing() 81 return sk_sp<SkPixelRef>(new SkMallocPixelRef(info, addr, rowBytes, in MakeUsing() 85 sk_sp<SkPixelRef> SkMallocPixelRef::MakeAllocate(const SkImageInfo& info, size_t rowBytes) { in MakeAllocate() argument [all …]
|
D | SkBitmap.cpp | 108 bool SkBitmap::setInfo(const SkImageInfo& info, size_t rowBytes) { in setInfo() argument 120 if ((int64_t)rowBytes != (int32_t)rowBytes) { in setInfo() 129 rowBytes = 0; in setInfo() 130 } else if (0 == rowBytes) { in setInfo() 131 rowBytes = (size_t)mrb; in setInfo() 132 } else if (!info.validRowBytes(rowBytes)) { in setInfo() 137 fPixmap.reset(info.makeAlphaType(newAT), nullptr, SkToU32(rowBytes)); in setInfo() 150 fPixmap.reset(std::move(newInfo), fPixmap.addr(), fPixmap.rowBytes()); in setAlphaType() 159 size_t rb = this->rowBytes(); in pixelRefOrigin() 181 size_t rowBytes = this->rowBytes(); in setPixelRef() local [all …]
|
/external/skia/tests/ |
D | MallocPixelRefTest.cpp | 34 size_t rowBytes = info.minRowBytes() - 1; in DEF_TEST() local 35 size_t size = info.computeByteSize(rowBytes); in DEF_TEST() 38 SkMallocPixelRef::MakeWithData(info, rowBytes, data)); in DEF_TEST() 43 size_t rowBytes = info.minRowBytes() + 2; in DEF_TEST() local 44 size_t size = info.computeByteSize(rowBytes) - 1; in DEF_TEST() 47 SkMallocPixelRef::MakeWithData(info, rowBytes, data)); in DEF_TEST() 51 size_t rowBytes = info.minRowBytes() + 7; in DEF_TEST() local 52 size_t size = info.computeByteSize(rowBytes) + 9; in DEF_TEST() 56 SkMallocPixelRef::MakeDirect(info, memory.get(), rowBytes)); in DEF_TEST() 62 SkMallocPixelRef::MakeAllocate(info, rowBytes)); in DEF_TEST() [all …]
|
D | ReadWriteAlphaTest.cpp | 92 for (auto rowBytes : kRowBytes) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 98 size_t nonZeroRowBytes = rowBytes ? rowBytes : X_SIZE; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 105 result = sContext->readPixels(ii, readback.get(), rowBytes, 0, 0); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 115 msg.printf("rb:%d A8", SkToU32(rowBytes)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 149 " at (%d,%d), rb:%d", rbValue, x, y, SkToU32(rowBytes)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 201 for (auto rowBytes : kRowBytes) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 202 size_t nonZeroRowBytes = rowBytes ? rowBytes : X_SIZE; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 209 bool result = sContext->readPixels(dstInfo, readback.get(), rowBytes, 0, 0); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 214 msg.printf("rt:%d, rb:%d 8888", rt, SkToU32(rowBytes)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
|
/external/skqp/tests/ |
D | MallocPixelRefTest.cpp | 34 size_t rowBytes = info.minRowBytes() - 1; in DEF_TEST() local 35 size_t size = info.computeByteSize(rowBytes); in DEF_TEST() 38 SkMallocPixelRef::MakeWithData(info, rowBytes, data)); in DEF_TEST() 43 size_t rowBytes = info.minRowBytes() + 2; in DEF_TEST() local 44 size_t size = info.computeByteSize(rowBytes) - 1; in DEF_TEST() 47 SkMallocPixelRef::MakeWithData(info, rowBytes, data)); in DEF_TEST() 51 size_t rowBytes = info.minRowBytes() + 7; in DEF_TEST() local 52 size_t size = info.computeByteSize(rowBytes) + 9; in DEF_TEST() 56 SkMallocPixelRef::MakeDirect(info, memory.get(), rowBytes)); in DEF_TEST() 62 SkMallocPixelRef::MakeAllocate(info, rowBytes)); in DEF_TEST() [all …]
|
D | ReadWriteAlphaTest.cpp | 92 for (auto rowBytes : kRowBytes) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 98 size_t nonZeroRowBytes = rowBytes ? rowBytes : X_SIZE; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 105 result = sContext->readPixels(ii, readback.get(), rowBytes, 0, 0); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 115 msg.printf("rb:%d A8", SkToU32(rowBytes)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 149 " at (%d,%d), rb:%d", rbValue, x, y, SkToU32(rowBytes)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 201 for (auto rowBytes : kRowBytes) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 202 size_t nonZeroRowBytes = rowBytes ? rowBytes : X_SIZE; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 209 bool result = sContext->readPixels(dstInfo, readback.get(), rowBytes, 0, 0); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 214 msg.printf("rt:%d, rb:%d 8888", rt, SkToU32(rowBytes)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
|
/external/skqp/src/image/ |
D | SkSurface_Raster.cpp | 40 bool SkSurfaceValidateRasterInfo(const SkImageInfo& info, size_t rowBytes) { in SkSurfaceValidateRasterInfo() argument 45 if (kIgnoreRowBytesValue == rowBytes) { in SkSurfaceValidateRasterInfo() 52 if (minRB > rowBytes) { in SkSurfaceValidateRasterInfo() 56 size_t alignedRowBytes = rowBytes >> shift << shift; in SkSurfaceValidateRasterInfo() 57 if (alignedRowBytes != rowBytes) { in SkSurfaceValidateRasterInfo() 61 uint64_t size = sk_64_mul(info.height(), rowBytes); in SkSurfaceValidateRasterInfo() 84 fBitmap.setInfo(info, pr->rowBytes()); in SkSurface_Raster() 85 fRowBytes = pr->rowBytes(); // we track this, so that subsequent re-allocs will match in SkSurface_Raster() 150 SkASSERT(prev.rowBytes() == fBitmap.rowBytes()); in onCopyOnWrite() 153 SkASSERT(fBitmap.rowBytes() == fRowBytes); // be sure we always use the same value in onCopyOnWrite() [all …]
|
D | SkImage_Raster.cpp | 37 static bool ValidArgs(const SkImageInfo& info, size_t rowBytes, size_t* minSize) { in ValidArgs() argument 56 if (!info.validRowBytes(rowBytes)) { in ValidArgs() 60 size_t size = info.computeByteSize(rowBytes); in ValidArgs() 140 SkImage_Raster::SkImage_Raster(const SkImageInfo& info, sk_sp<SkData> data, size_t rowBytes, in SkImage_Raster() argument 146 fBitmap.installPixels(info, addr, rowBytes, release_data, data.release()); in SkImage_Raster() 248 SkRectMemcpy(dst, bitmap.rowBytes(), src, fBitmap.rowBytes(), bitmap.rowBytes(), in onMakeSubset() 259 if (!SkImage_Raster::ValidArgs(pmap.info(), pmap.rowBytes(), &size) || !pmap.addr()) { in MakeRasterCopyPriv() 265 return sk_make_sp<SkImage_Raster>(pmap.info(), std::move(data), pmap.rowBytes(), id); in MakeRasterCopyPriv() 273 size_t rowBytes) { in MakeRasterData() argument 275 if (!SkImage_Raster::ValidArgs(info, rowBytes, &size) || !data) { in MakeRasterData() [all …]
|
/external/skia/src/image/ |
D | SkSurface_Raster.cpp | 40 bool SkSurfaceValidateRasterInfo(const SkImageInfo& info, size_t rowBytes) { in SkSurfaceValidateRasterInfo() argument 45 if (kIgnoreRowBytesValue == rowBytes) { in SkSurfaceValidateRasterInfo() 52 if (minRB > rowBytes) { in SkSurfaceValidateRasterInfo() 56 size_t alignedRowBytes = rowBytes >> shift << shift; in SkSurfaceValidateRasterInfo() 57 if (alignedRowBytes != rowBytes) { in SkSurfaceValidateRasterInfo() 61 uint64_t size = sk_64_mul(info.height(), rowBytes); in SkSurfaceValidateRasterInfo() 84 fBitmap.setInfo(info, pr->rowBytes()); in SkSurface_Raster() 85 fRowBytes = pr->rowBytes(); // we track this, so that subsequent re-allocs will match in SkSurface_Raster() 150 SkASSERT(prev.rowBytes() == fBitmap.rowBytes()); in onCopyOnWrite() 153 SkASSERT(fBitmap.rowBytes() == fRowBytes); // be sure we always use the same value in onCopyOnWrite() [all …]
|
D | SkImage_Raster.cpp | 37 static bool ValidArgs(const SkImageInfo& info, size_t rowBytes, size_t* minSize) { in ValidArgs() argument 56 if (!info.validRowBytes(rowBytes)) { in ValidArgs() 60 size_t size = info.computeByteSize(rowBytes); in ValidArgs() 142 SkImage_Raster::SkImage_Raster(const SkImageInfo& info, sk_sp<SkData> data, size_t rowBytes, in SkImage_Raster() argument 148 fBitmap.installPixels(info, addr, rowBytes, release_data, data.release()); in SkImage_Raster() 251 SkRectMemcpy(dst, bitmap.rowBytes(), src, fBitmap.rowBytes(), bitmap.rowBytes(), in onMakeSubset() 262 if (!SkImage_Raster::ValidArgs(pmap.info(), pmap.rowBytes(), &size) || !pmap.addr()) { in MakeRasterCopyPriv() 268 return sk_make_sp<SkImage_Raster>(pmap.info(), std::move(data), pmap.rowBytes(), id); in MakeRasterCopyPriv() 276 size_t rowBytes) { in MakeRasterData() argument 278 if (!SkImage_Raster::ValidArgs(info, rowBytes, &size) || !data) { in MakeRasterData() [all …]
|
/external/skqp/src/codec/ |
D | SkSampledCodec.cpp | 75 size_t rowBytes, const AndroidOptions& options) { in onGetAndroidPixels() argument 83 return this->codec()->getPixels(info, pixels, rowBytes, &codecOptions); in onGetAndroidPixels() 87 return this->sampledDecode(info, pixels, rowBytes, options); in onGetAndroidPixels() 95 return this->sampledDecode(info, pixels, rowBytes, options); in onGetAndroidPixels() 114 scaledInfo, pixels, rowBytes, &codecOptions); in onGetAndroidPixels() 124 this->codec()->fillIncompleteImage(scaledInfo, pixels, rowBytes, in onGetAndroidPixels() 152 this->codec()->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized, in onGetAndroidPixels() 157 int decodedLines = this->codec()->getScanlines(pixels, scaledSubsetHeight, rowBytes); in onGetAndroidPixels() 166 size_t rowBytes, const AndroidOptions& options) { in sampledDecode() argument 230 pixels, rowBytes, &incrementalOptions); in sampledDecode() [all …]
|
D | SkCodec.cpp | 198 bool zero_rect(const SkImageInfo& dstInfo, void* pixels, size_t rowBytes, in zero_rect() argument 225 const size_t offset = prevRect.x() * bpp + prevRect.y() * rowBytes; in zero_rect() 227 SkSampler::Fill(info, eraseDst, rowBytes, SkCodec::kNo_ZeroInitialized); in zero_rect() 231 SkCodec::Result SkCodec::handleFrameIndex(const SkImageInfo& info, void* pixels, size_t rowBytes, in handleFrameIndex() argument 277 if (!zero_rect(info, pixels, rowBytes, this->dimensions(), prevRect)) { in handleFrameIndex() 289 const Result result = this->getPixels(info, pixels, rowBytes, &prevFrameOptions); in handleFrameIndex() 297 if (!zero_rect(info, pixels, rowBytes, this->dimensions(), prevRect)) { in handleFrameIndex() 308 SkCodec::Result SkCodec::getPixels(const SkImageInfo& dstInfo, void* pixels, size_t rowBytes, in getPixels() argument 321 if (rowBytes < info.minRowBytes()) { in getPixels() 344 const Result frameIndexResult = this->handleFrameIndex(info, pixels, rowBytes, in getPixels() [all …]
|
/external/skia/src/codec/ |
D | SkSampledCodec.cpp | 75 size_t rowBytes, const AndroidOptions& options) { in onGetAndroidPixels() argument 83 return this->codec()->getPixels(info, pixels, rowBytes, &codecOptions); in onGetAndroidPixels() 87 return this->sampledDecode(info, pixels, rowBytes, options); in onGetAndroidPixels() 95 return this->sampledDecode(info, pixels, rowBytes, options); in onGetAndroidPixels() 114 scaledInfo, pixels, rowBytes, &codecOptions); in onGetAndroidPixels() 124 this->codec()->fillIncompleteImage(scaledInfo, pixels, rowBytes, in onGetAndroidPixels() 152 this->codec()->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized, in onGetAndroidPixels() 157 int decodedLines = this->codec()->getScanlines(pixels, scaledSubsetHeight, rowBytes); in onGetAndroidPixels() 166 size_t rowBytes, const AndroidOptions& options) { in sampledDecode() argument 230 pixels, rowBytes, &incrementalOptions); in sampledDecode() [all …]
|
D | SkCodec.cpp | 198 bool zero_rect(const SkImageInfo& dstInfo, void* pixels, size_t rowBytes, in zero_rect() argument 225 const size_t offset = prevRect.x() * bpp + prevRect.y() * rowBytes; in zero_rect() 227 SkSampler::Fill(info, eraseDst, rowBytes, SkCodec::kNo_ZeroInitialized); in zero_rect() 231 SkCodec::Result SkCodec::handleFrameIndex(const SkImageInfo& info, void* pixels, size_t rowBytes, in handleFrameIndex() argument 277 if (!zero_rect(info, pixels, rowBytes, this->dimensions(), prevRect)) { in handleFrameIndex() 289 const Result result = this->getPixels(info, pixels, rowBytes, &prevFrameOptions); in handleFrameIndex() 297 if (!zero_rect(info, pixels, rowBytes, this->dimensions(), prevRect)) { in handleFrameIndex() 308 SkCodec::Result SkCodec::getPixels(const SkImageInfo& dstInfo, void* pixels, size_t rowBytes, in getPixels() argument 321 if (rowBytes < info.minRowBytes()) { in getPixels() 344 const Result frameIndexResult = this->handleFrameIndex(info, pixels, rowBytes, in getPixels() [all …]
|
/external/skia/include/core/ |
D | SkMallocPixelRef.h | 30 static sk_sp<SkPixelRef> MakeDirect(const SkImageInfo&, void* addr, size_t rowBytes); 42 static sk_sp<SkPixelRef> MakeAllocate(const SkImageInfo&, size_t rowBytes); 47 static sk_sp<SkPixelRef> MakeZeroed(const SkImageInfo&, size_t rowBytes); 62 static sk_sp<SkPixelRef> MakeWithProc(const SkImageInfo& info, size_t rowBytes, void* addr, 73 static sk_sp<SkPixelRef> MakeWithData(const SkImageInfo&, size_t rowBytes, sk_sp<SkData> data); 82 size_t rowBytes);
|
/external/skqp/include/core/ |
D | SkMallocPixelRef.h | 30 static sk_sp<SkPixelRef> MakeDirect(const SkImageInfo&, void* addr, size_t rowBytes); 42 static sk_sp<SkPixelRef> MakeAllocate(const SkImageInfo&, size_t rowBytes); 47 static sk_sp<SkPixelRef> MakeZeroed(const SkImageInfo&, size_t rowBytes); 62 static sk_sp<SkPixelRef> MakeWithProc(const SkImageInfo& info, size_t rowBytes, void* addr, 73 static sk_sp<SkPixelRef> MakeWithData(const SkImageInfo&, size_t rowBytes, sk_sp<SkData> data); 82 size_t rowBytes);
|
/external/skqp/src/ports/ |
D | SkImageEncoder_WIC.cpp | 55 !bitmapOrig.readPixels(bitmap.info(), bitmap.getPixels(), bitmap.rowBytes(), 0, 0)) in SkEncodeImageWithWIC() 65 uint8_t* bytes = pixels + y * bitmap.rowBytes() + x * bitmap.bytesPerPixel(); in SkEncodeImageWithWIC() 75 size_t rowBytes = bitmap.rowBytes(); in SkEncodeImageWithWIC() local 80 rowBytes = SkAlign4(bitmap.width() * 3); in SkEncodeImageWithWIC() 81 pixelStorage.reset(rowBytes * bitmap.height()); in SkEncodeImageWithWIC() 83 uint8_t* dstRow = SkTAddOffset<uint8_t>(pixelStorage.get(), y * rowBytes); in SkEncodeImageWithWIC() 182 (UINT) rowBytes, in SkEncodeImageWithWIC() 183 (UINT) rowBytes * height, in SkEncodeImageWithWIC()
|
/external/skia/src/ports/ |
D | SkImageEncoder_WIC.cpp | 55 !bitmapOrig.readPixels(bitmap.info(), bitmap.getPixels(), bitmap.rowBytes(), 0, 0)) in SkEncodeImageWithWIC() 65 uint8_t* bytes = pixels + y * bitmap.rowBytes() + x * bitmap.bytesPerPixel(); in SkEncodeImageWithWIC() 75 size_t rowBytes = bitmap.rowBytes(); in SkEncodeImageWithWIC() local 80 rowBytes = SkAlign4(bitmap.width() * 3); in SkEncodeImageWithWIC() 81 pixelStorage.reset(rowBytes * bitmap.height()); in SkEncodeImageWithWIC() 83 uint8_t* dstRow = SkTAddOffset<uint8_t>(pixelStorage.get(), y * rowBytes); in SkEncodeImageWithWIC() 182 (UINT) rowBytes, in SkEncodeImageWithWIC() 183 (UINT) rowBytes * height, in SkEncodeImageWithWIC()
|
/external/skqp/tools/gpu/ |
D | ProxyUtils.h | 19 const void* data, size_t rowBytes); 25 size_t rowBytes) { in MakeTextureProxyFromData() argument 27 data, rowBytes); in MakeTextureProxyFromData() 34 size_t rowBytes) { in MakeTextureProxyFromData() argument 36 origin, data, rowBytes); in MakeTextureProxyFromData()
|
/external/skia/tools/gpu/ |
D | ProxyUtils.h | 19 const void* data, size_t rowBytes); 26 size_t rowBytes) { in MakeTextureProxyFromData() argument 28 data, rowBytes); in MakeTextureProxyFromData() 36 size_t rowBytes) { in MakeTextureProxyFromData() argument 38 origin, data, rowBytes); in MakeTextureProxyFromData()
|
/external/skqp/src/gpu/ |
D | GrSurface.cpp | 99 size_t* rowBytes) { in adjust_params() argument 100 if (!*rowBytes) { in adjust_params() 101 *rowBytes = *width * bpp; in adjust_params() 111 (subRect.fTop - *top) * *rowBytes + (subRect.fLeft - *left) * bpp); in adjust_params() 125 size_t* rowBytes) { in AdjustReadPixelParams() argument 127 rowBytes); in AdjustReadPixelParams() 135 size_t* rowBytes) { in AdjustWritePixelParams() argument 137 data, rowBytes); in AdjustWritePixelParams()
|
/external/skia/src/gpu/ |
D | GrSurface.cpp | 99 size_t* rowBytes) { in adjust_params() argument 100 if (!*rowBytes) { in adjust_params() 101 *rowBytes = *width * bpp; in adjust_params() 111 (subRect.fTop - *top) * *rowBytes + (subRect.fLeft - *left) * bpp); in adjust_params() 125 size_t* rowBytes) { in AdjustReadPixelParams() argument 127 rowBytes); in AdjustReadPixelParams() 135 size_t* rowBytes) { in AdjustWritePixelParams() argument 137 data, rowBytes); in AdjustWritePixelParams()
|
/external/skqp/include/codec/ |
D | SkCodec.h | 336 Result getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, const Options*); 341 Result getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes) { in getPixels() argument 342 return this->getPixels(info, pixels, rowBytes, nullptr); in getPixels() 346 return this->getPixels(pm.info(), pm.writable_addr(), pm.rowBytes(), opts); 417 Result startIncrementalDecode(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, 420 Result startIncrementalDecode(const SkImageInfo& dstInfo, void* dst, size_t rowBytes) { in startIncrementalDecode() argument 421 return this->startIncrementalDecode(dstInfo, dst, rowBytes, nullptr); in startIncrementalDecode() 498 int getScanlines(void* dst, int countLines, size_t rowBytes); 724 void* pixels, size_t rowBytes, const Options&, 871 Result handleFrameIndex(const SkImageInfo&, void* pixels, size_t rowBytes, const Options&); [all …]
|