Pass BlendMode::Clear to the fill method of DrawTarget in clear_rect

This makes some tests regarding clearing rects pass. Otherwise the rect
wouldn't get cleared properly and it'd keep its original color but get
an alpha of 0
This commit is contained in:
Bastien Orivel 2019-08-08 18:49:02 +02:00
parent 777ef4f3e8
commit 97674082d3

View file

@ -202,6 +202,8 @@ impl GenericDrawTarget for raqote::DrawTarget {
rect.size.width, rect.size.width,
rect.size.height, rect.size.height,
); );
let mut options = raqote::DrawOptions::new();
options.blend_mode = raqote::BlendMode::Clear;
raqote::DrawTarget::fill( raqote::DrawTarget::fill(
self, self,
&pb.finish(), &pb.finish(),
@ -211,7 +213,7 @@ impl GenericDrawTarget for raqote::DrawTarget {
b: 0, b: 0,
a: 0, a: 0,
}), }),
&raqote::DrawOptions::new(), &options,
); );
} }
fn copy_surface( fn copy_surface(