fix for 2d that makes clearing graphics context on each fram optional with shouldClear flag