Bug 1424532 - Initialize blob image buffer to transparent black instead of opaque white. r=nical

This lets us avoid having to clear the surface before using it. It also
let's us take advantage of rusts fast path for allocating 0 vs.
having to memset it after the allocation.

MozReview-Commit-ID: J05cZAs2dD4

--HG--
extra : rebase_source : e4d1d26fc58650f2b39dfbf80feed3ae46810974
This commit is contained in:
Jeff Muizelaar 2017-12-09 15:26:01 -05:00
parent c4027ebd8f
commit b248919e81

View File

@ -165,7 +165,7 @@ impl BlobImageRenderer for Moz2dImageRenderer {
let buf_size = (descriptor.width
* descriptor.height
* descriptor.format.bytes_per_pixel()) as usize;
let mut output = vec![255u8; buf_size];
let mut output = vec![0u8; buf_size];
let result = unsafe {
if wr_moz2d_render_cb(