Don't send empty canvases to WebRender

If any dimension of a canvas is 0, don't try to render it as it causes
problems inside webrender.
This commit is contained in:
Daniel Alley 2020-03-29 17:19:39 -04:00
parent e66ab111a6
commit 61fb84d6a0
5 changed files with 34 additions and 0 deletions

View file

@ -1875,6 +1875,12 @@ impl Fragment {
}
},
SpecificFragmentInfo::Canvas(ref canvas_fragment_info) => {
if canvas_fragment_info.dom_width == Au(0) ||
canvas_fragment_info.dom_height == Au(0)
{
return;
}
let image_key = match canvas_fragment_info.source {
CanvasFragmentSource::WebGL(image_key) => image_key,
CanvasFragmentSource::Image(ref ipc_renderer) => match *ipc_renderer {