Bug 878032 - Part 1: Factor out some simle none-RenderTarget dependent functions. r=jrmuizel
Bug 878032 - Part 2: Factor out partial bitmap uploading and scaling. r=jrmuizel