reduse writes far away from each other

Probably not to important now but if the code is extended later x should always be processed before y, this will somtimes allow compilers to do smart optimisations because the pixeldata in x is almost allways in sequence while y is almost never in sequence.