mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
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:
parent
777ef4f3e8
commit
97674082d3
1 changed files with 3 additions and 1 deletions
|
@ -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(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue