Home
last modified time | relevance | path

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

12345678910>>...21

/external/skqp/src/core/
DSkMallocPixelRef.cpp49 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 …]
DSkBitmap.cpp108 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/src/gpu/
DGrPixmap.h21 size_t rowBytes() const { return fRowBytes; } in rowBytes() function
63 GrPixmapBase(GrImageInfo info, T* addr, size_t rowBytes) in GrPixmapBase() argument
64 : fAddr(addr), fRowBytes(rowBytes), fInfo(std::move(info)) { in GrPixmapBase()
70 GrPixmapBase(GrImageInfo info, sk_sp<SkData> storage, size_t rowBytes) in GrPixmapBase() argument
71 : GrPixmapBase(std::move(info), const_cast<void*>(storage->data()), rowBytes) { in GrPixmapBase()
91 GrPixmap(GrImageInfo info, void* addr, size_t rowBytes) : GrPixmapBase(info, addr, rowBytes) {} in GrPixmap() argument
94 : GrPixmapBase(pixmap.info(), pixmap.writable_addr(), pixmap.rowBytes()) {} in GrPixmap()
110 GrPixmap(GrImageInfo info, sk_sp<SkData> storage, size_t rowBytes) in GrPixmap() argument
111 : GrPixmapBase(std::move(info), std::move(storage), rowBytes) {} in GrPixmap()
128 *this = GrCPixmap(pixmap.info(), std::move(storage), pixmap.rowBytes()); in GrCPixmap()
[all …]
/external/skqp/tests/
DMallocPixelRefTest.cpp34 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 …]
DReadWriteAlphaTest.cpp92 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/
DSkSurface_Raster.cpp40 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 …]
DSkImage_Raster.cpp37 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/tests/
DMallocPixelRefTest.cpp32 size_t rowBytes = info.minRowBytes() - 1; in DEF_TEST() local
33 size_t size = info.computeByteSize(rowBytes); in DEF_TEST()
36 SkMallocPixelRef::MakeWithData(info, rowBytes, data)); in DEF_TEST()
41 size_t rowBytes = info.minRowBytes() + info.bytesPerPixel(); in DEF_TEST() local
42 size_t size = info.computeByteSize(rowBytes) - 1; in DEF_TEST()
45 SkMallocPixelRef::MakeWithData(info, rowBytes, data)); in DEF_TEST()
49 size_t rowBytes = info.minRowBytes() + info.bytesPerPixel(); in DEF_TEST() local
50 size_t size = info.computeByteSize(rowBytes) + 9; in DEF_TEST()
53 auto pr = sk_make_sp<SkPixelRef>(info.width(), info.height(), memory.get(), rowBytes); in DEF_TEST()
59 SkMallocPixelRef::MakeAllocate(info, rowBytes)); in DEF_TEST()
[all …]
/external/skia/src/core/
DSkBitmap.cpp107 bool SkBitmap::setInfo(const SkImageInfo& info, size_t rowBytes) { in setInfo() argument
119 if (!SkTFitsIn<int32_t>(rowBytes)) { in setInfo()
128 rowBytes = 0; in setInfo()
129 } else if (0 == rowBytes) { in setInfo()
130 rowBytes = (size_t)mrb; in setInfo()
131 } else if (!info.validRowBytes(rowBytes)) { in setInfo()
136 fPixmap.reset(info.makeAlphaType(newAT), nullptr, SkToU32(rowBytes)); in setInfo()
149 fPixmap.reset(std::move(newInfo), fPixmap.addr(), fPixmap.rowBytes()); in setAlphaType()
158 size_t rb = this->rowBytes(); in pixelRefOrigin()
180 size_t rowBytes = this->rowBytes(); in setPixelRef() local
[all …]
DSkMallocPixelRef.cpp24 sk_sp<SkPixelRef> SkMallocPixelRef::MakeAllocate(const SkImageInfo& info, size_t rowBytes) { in MakeAllocate() argument
25 if (rowBytes == 0) { in MakeAllocate()
26 rowBytes = info.minRowBytes(); in MakeAllocate()
30 if (!is_valid(info) || !info.validRowBytes(rowBytes)) { in MakeAllocate()
33 size_t size = info.computeByteSize(rowBytes); in MakeAllocate()
51 return sk_sp<SkPixelRef>(new PixelRef(info.width(), info.height(), addr, rowBytes)); in MakeAllocate()
55 size_t rowBytes, in MakeWithData() argument
64 if ((rowBytes < info.minRowBytes()) || (data->size() < info.computeByteSize(rowBytes))) { in MakeWithData()
73 sk_sp<SkPixelRef> pr(new PixelRef(info.width(), info.height(), pixels, rowBytes, in MakeWithData()
DSkYUVAPixmaps.cpp80 const size_t rowBytes[kMaxPlanes]) in SkYUVAPixmapInfo()
90 if (!rowBytes) { in SkYUVAPixmapInfo()
94 rowBytes = tempRowBytes; in SkYUVAPixmapInfo()
98 fRowBytes[i] = rowBytes[i]; in SkYUVAPixmapInfo()
121 const size_t rowBytes[kMaxPlanes]) { in SkYUVAPixmapInfo()
128 *this = SkYUVAPixmapInfo(yuvaInfo, colorTypes, rowBytes); in SkYUVAPixmapInfo()
160 size_t planeSize = pixmaps[i].rowBytes()*pixmaps[i].height(); in initPixmapsFromSingleAllocation()
221 d.rowBytes(), in MakeCopy()
223 s.rowBytes(), in MakeCopy()
243 size_t rowBytes[kMaxPlanes] = {}; in FromExternalPixmaps() local
[all …]
DSkOpts_erms.cpp73 size_t rowBytes, int height) { in rect_memset16() argument
75 return g_rect_memset16_prev(dst,v,n, rowBytes,height); in rect_memset16()
77 for (int stride = rowBytes/sizeof(v); height --> 0; dst += stride) { in rect_memset16()
82 size_t rowBytes, int height) { in rect_memset32() argument
84 return g_rect_memset32_prev(dst,v,n, rowBytes,height); in rect_memset32()
86 for (int stride = rowBytes/sizeof(v); height --> 0; dst += stride) { in rect_memset32()
91 size_t rowBytes, int height) { in rect_memset64() argument
93 return g_rect_memset64_prev(dst,v,n, rowBytes,height); in rect_memset64()
95 for (int stride = rowBytes/sizeof(v); height --> 0; dst += stride) { in rect_memset64()
/external/skia/src/codec/
DSkSampledCodec.cpp75 size_t rowBytes, const AndroidOptions& options) { in onGetAndroidPixels() argument
79 return this->codec()->getPixels(info, pixels, rowBytes, &options); in onGetAndroidPixels()
83 return this->sampledDecode(info, pixels, rowBytes, options); in onGetAndroidPixels()
91 return this->sampledDecode(info, pixels, rowBytes, options); in onGetAndroidPixels()
112 scaledInfo, pixels, rowBytes, &subsetOptions); in onGetAndroidPixels()
122 this->codec()->fillIncompleteImage(scaledInfo, pixels, rowBytes, in onGetAndroidPixels()
150 this->codec()->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized, in onGetAndroidPixels()
155 int decodedLines = this->codec()->getScanlines(pixels, scaledSubsetHeight, rowBytes); in onGetAndroidPixels()
164 size_t rowBytes, const AndroidOptions& options) { in sampledDecode() argument
223 pixels, rowBytes, &incrementalOptions); in sampledDecode()
[all …]
/external/skqp/src/codec/
DSkSampledCodec.cpp75 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 …]
/external/skia/src/image/
DSkSurface_Raster.cpp39 bool SkSurfaceValidateRasterInfo(const SkImageInfo& info, size_t rowBytes) { in SkSurfaceValidateRasterInfo() argument
44 if (kIgnoreRowBytesValue == rowBytes) { in SkSurfaceValidateRasterInfo()
48 if (!info.validRowBytes(rowBytes)) { in SkSurfaceValidateRasterInfo()
52 uint64_t size = sk_64_mul(info.height(), rowBytes); in SkSurfaceValidateRasterInfo()
74 fBitmap.setInfo(info, pr->rowBytes()); in SkSurface_Raster()
139 SkASSERT(prev.rowBytes() == fBitmap.rowBytes()); in onCopyOnWrite()
169 sk_sp<SkSurface> SkSurface::MakeRasterDirect(const SkImageInfo& info, void* pixels, size_t rowBytes, in MakeRasterDirect() argument
171 return MakeRasterDirectReleaseProc(info, pixels, rowBytes, nullptr, nullptr, props); in MakeRasterDirect()
174 sk_sp<SkSurface> SkSurface::MakeRaster(const SkImageInfo& info, size_t rowBytes, in MakeRaster() argument
180 sk_sp<SkPixelRef> pr = SkMallocPixelRef::MakeAllocate(info, rowBytes); in MakeRaster()
[all …]
/external/skia/src/opts/
DSkUtils_opts.h44 static void rect_memsetT(T buffer[], T value, int count, size_t rowBytes, int height) { in rect_memsetT() argument
47 buffer = (T*)((char*)buffer + rowBytes); in rect_memsetT()
52 size_t rowBytes, int height) { in rect_memset16() argument
53 rect_memsetT(buffer, value, count, rowBytes, height); in rect_memset16()
56 size_t rowBytes, int height) { in rect_memset32() argument
57 rect_memsetT(buffer, value, count, rowBytes, height); in rect_memset32()
60 size_t rowBytes, int height) { in rect_memset64() argument
61 rect_memsetT(buffer, value, count, rowBytes, height); in rect_memset64()
/external/skia/docs/examples/
DPixmap_readPixels_2.cpp9 const int rowBytes = image->width() * 4; in draw() local
10 srcPixels.resize(image->height() * rowBytes); in draw()
11 SkPixmap pixmap(info, (const void*) &srcPixels.front(), rowBytes); in draw()
15 dstPixels.resize(image->height() * rowBytes); in draw()
16 pixmap.readPixels(info, &dstPixels.front(), rowBytes, offset, 0); in draw()
18 SkPixmap dstmap(info, &dstPixels.front(), rowBytes); in draw()
DImageInfo_validRowBytes.cpp8 for (size_t rowBytes = 60; rowBytes < 72; rowBytes += sizeof(SkPMColor)) { in draw() local
9 SkDebugf("validRowBytes(%llu): %s\n", rowBytes, info.validRowBytes(rowBytes) ? in draw()
DImageInfo_ByteSizeOverflowed.cpp10 for (size_t rowBytes = 100000000; rowBytes < 10000000000000LL; rowBytes *= 10) {
11 const size_t size = info.computeByteSize(rowBytes);
12 SkDebugf("rowBytes:%llu size:%llu overflowed:%s\n", rowBytes, size,
DPixmap_scalePixels.cpp9 int rowBytes = image->width() * 4; in draw() local
10 srcPixels.resize(image->height() * rowBytes); in draw()
11 SkPixmap pixmap(info, (const void*) &srcPixels.front(), rowBytes); in draw()
15 rowBytes = info.width() * 4; in draw()
17 dstPixels.resize(image->height() * rowBytes); in draw()
18 SkPixmap dstmap(info, &dstPixels.front(), rowBytes); in draw()
DPixmap_readPixels_4.cpp9 const int rowBytes = image->width() * 4; in draw() local
10 srcPixels.resize(image->height() * rowBytes); in draw()
11 SkPixmap pixmap(info, (const void*) &srcPixels.front(), rowBytes); in draw()
15 dstPixels.resize(image->height() * rowBytes); in draw()
16 SkPixmap dstmap(info, &dstPixels.front(), rowBytes); in draw()
DPixmap_readPixels_3.cpp9 const int rowBytes = image->width() * 4; in draw() local
10 srcPixels.resize(image->height() * rowBytes); in draw()
11 SkPixmap pixmap(info, (const void*) &srcPixels.front(), rowBytes); in draw()
15 dstPixels.resize(image->height() * rowBytes); in draw()
16 SkPixmap dstmap(info, &dstPixels.front(), rowBytes); in draw()
/external/skqp/include/core/
DSkMallocPixelRef.h30 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/skia/src/ports/
DSkImageEncoder_WIC.cpp55 !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/src/ports/
DSkImageEncoder_WIC.cpp55 !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()

12345678910>>...21