Manual merge of raster code from art103/master (Stellaris port).