void blitRect(int x, int y, int width, int height) override { SkASSERT(width > 0 && height > 0); uint32_t* SK_RESTRICT dst = fDst.writable_addr32(x, y); size_t dstRB = fDst.rowBytes(); for (int bottom = y + height; y < bottom; ++y) { fLoader(fSource, x - fLeft, y - fTop, fBuffer, width); fFilter(*fPaint, fBuffer, width); fWriter(fXfer, dst, fBuffer, width, nullptr); dst = (uint32_t* SK_RESTRICT)((char*)dst + dstRB); } }
UInt32 IOFWPseudoAddressSpace::doWrite(UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon refcon) { if( !isTrustedNode( nodeID ) ) return kFWResponseAddressError; if(addr.addressHi != fBase.addressHi) return kFWResponseAddressError; if(addr.addressLo < fBase.addressLo) return kFWResponseAddressError; if(addr.addressLo + len > fBase.addressLo+fLen) return kFWResponseAddressError; if(!fWriter) return kFWResponseTypeError; return fWriter(fRefCon, nodeID, speed, addr, len, buf, refcon); }