update pixels before spinlock