Optimize the BG renderer

Remove a temporary variable and decrease buffer size by one.