mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
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:
parent
c4027ebd8f
commit
b248919e81
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user