closedcaption/cea608overlay: Fix compilation with cairo API changes

This commit is contained in:
Sebastian Dröge 2021-05-04 14:31:58 +03:00
parent e1ea71fec7
commit 3d24f1da22

View file

@ -199,12 +199,12 @@ impl Cea608Overlay {
) )
.ok()?; .ok()?;
let cr = cairo::Context::new(&surface); let cr = cairo::Context::new(&surface).ok()?;
// Clear background // Clear background
cr.set_operator(cairo::Operator::Source); cr.set_operator(cairo::Operator::Source);
cr.set_source_rgba(0.0, 0.0, 0.0, 0.0); cr.set_source_rgba(0.0, 0.0, 0.0, 0.0);
cr.paint(); cr.paint().ok()?;
// Render text outline // Render text outline
cr.save().ok()?; cr.save().ok()?;
@ -213,7 +213,7 @@ impl Cea608Overlay {
cr.set_source_rgba(0.0, 0.0, 0.0, 1.0); cr.set_source_rgba(0.0, 0.0, 0.0, 1.0);
pangocairo::functions::layout_path(&cr, &layout); pangocairo::functions::layout_path(&cr, &layout);
cr.stroke(); cr.stroke().ok()?;
cr.restore().ok()?; cr.restore().ok()?;
// Render text // Render text