Skip to content
Permalink
Browse files

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
  • Loading branch information...
Eijebong committed Aug 8, 2019
1 parent 777ef4f commit 97674082d3c20607478174840188c813911b6419
Showing with 3 additions and 1 deletion.
  1. +3 −1 components/canvas/raqote_backend.rs
@@ -202,6 +202,8 @@ impl GenericDrawTarget for raqote::DrawTarget {
rect.size.width,
rect.size.height,
);
let mut options = raqote::DrawOptions::new();
options.blend_mode = raqote::BlendMode::Clear;
raqote::DrawTarget::fill(
self,
&pb.finish(),
@@ -211,7 +213,7 @@ impl GenericDrawTarget for raqote::DrawTarget {
b: 0,
a: 0,
}),
&raqote::DrawOptions::new(),
&options,
);
}
fn copy_surface(

0 comments on commit 9767408

Please sign in to comment.
You can’t perform that action at this time.