mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
e66ab111a6
commit
61fb84d6a0
5 changed files with 34 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue