Bug 1057438 - Only re-create LinearGradient when necessary (r=bnicholson)