add swapInterval support