Lines Matching refs:rowBytes

107 bool SkBitmap::setInfo(const SkImageInfo& info, size_t rowBytes) {
114 // require that rowBytes fit in 31bits
119 if (!SkTFitsIn<int32_t>(rowBytes)) {
128 rowBytes = 0;
129 } else if (0 == rowBytes) {
130 rowBytes = (size_t)mrb;
131 } else if (!info.validRowBytes(rowBytes)) {
136 fPixmap.reset(info.makeAlphaType(newAT), nullptr, SkToU32(rowBytes));
149 fPixmap.reset(std::move(newInfo), fPixmap.addr(), fPixmap.rowBytes());
158 size_t rb = this->rowBytes();
180 size_t rowBytes = this->rowBytes();
183 rowBytes = fPixelRef->rowBytes();
187 p = (char*)p + dy * rowBytes + dx * this->bytesPerPixel();
190 SkPixmapPriv::ResetPixmapKeepInfo(&fPixmap, p, rowBytes);
198 size_t rb = this->rowBytes();
234 info.colorType(), info.alphaType(), info.width(), info.height(), this->rowBytes());
242 void SkBitmap::allocPixels(const SkImageInfo& info, size_t rowBytes) {
243 SkASSERT_RELEASE(this->tryAllocPixels(info, rowBytes));
252 bool SkBitmap::tryAllocPixels(const SkImageInfo& requestedInfo, size_t rowBytes) {
253 if (!this->setInfo(requestedInfo, rowBytes)) {
263 rowBytes = this->rowBytes();
265 sk_sp<SkPixelRef> pr = SkMallocPixelRef::MakeAllocate(correctedInfo, rowBytes);
326 return this->installPixels(pixmap.info(), pixmap.writable_addr(), pixmap.rowBytes(),
365 sk_sp<SkPixelRef> pr = SkMallocPixelRef::MakeAllocate(info, dst->rowBytes());
393 base += (y * this->rowBytes()) + (x << this->shiftPerPixel());
445 dst.setInfo(this->info().makeDimensions(r.size()), this->rowBytes());
471 return this->readPixels(dst.info(), dst.writable_addr(), dst.rowBytes(), srcX, srcY);
479 SkWritePixelsRec rec(src.info(), src.addr(), src.rowBytes(), dstX, dstY);
486 if (!SkConvertPixels(dstInfo, dstPixels, this->rowBytes(),
509 pmap.info(), pmap.addr(), pmap.rowBytes());
589 SkASSERT(this->info().validRowBytes(this->rowBytes()));
599 SkASSERT(fPixelRef->rowBytes() == this->rowBytes());
605 SkASSERT(fPixelRef->rowBytes() >= this->info().minRowBytes());