fastPathBottomToTop does not do much... It just reverse the line order.
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/f5f0e7d98effd7217dded6ed9397b2cac1f787ad/platforms/Cross/plugins/BitBltPlugin/BitBltGeneric.c#L517
I foresee two cases where it could fail:
The later is possible because srcPitch
and dstPitch
are declared usqInt in operation_t
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/f5f0e7d98effd7217dded6ed9397b2cac1f787ad/platforms/Cross/plugins/BitBltPlugin/BitBltDispatch.h#L98
usqInt
is 64bits on ARM64, so far so good, unfortunately those variables are copied to 32 bits local temps in
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/f5f0e7d98effd7217dded6ed9397b2cac1f787ad/platforms/Cross/plugins/BitBltPlugin/BitBltInternal.h#L137
I think that it is the mistake, because pointer arithmetic in 64 bits will be performed with 64 bits size_t, and the uint32_t will just move the pointer a large amount forward (2^32-pitch) instead of backward (-pitch).
So I think that declaring the local srcPitch
and dstPitch
as usqInt
instead of uint32_t
might fix the bug.
I have no ARM64 at hand to play with, so up to you to verify the hypothesis.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.