More efficient handling of gradient backgrounds.