Move updatePixels to own thread