Refactor a bit, rename dirtyRect to updateRect. Change updateRect.req int to updateRect.incr bool.