Remove duplicated code in SDLHardwareRenderDevice