Merge pull request #796 from hecrj/fix/redraw-empty-window
Skip redrawing if window has no surface
This commit is contained in:
commit
bbb4e4678f
@ -299,11 +299,16 @@ async fn run_instance<A, E, C>(
|
|||||||
messages.push(message);
|
messages.push(message);
|
||||||
}
|
}
|
||||||
event::Event::RedrawRequested(_) => {
|
event::Event::RedrawRequested(_) => {
|
||||||
|
let physical_size = state.physical_size();
|
||||||
|
|
||||||
|
if physical_size.width == 0 || physical_size.height == 0 {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
debug.render_started();
|
debug.render_started();
|
||||||
let current_viewport_version = state.viewport_version();
|
let current_viewport_version = state.viewport_version();
|
||||||
|
|
||||||
if viewport_version != current_viewport_version {
|
if viewport_version != current_viewport_version {
|
||||||
let physical_size = state.physical_size();
|
|
||||||
let logical_size = state.logical_size();
|
let logical_size = state.logical_size();
|
||||||
|
|
||||||
debug.layout_started();
|
debug.layout_started();
|
||||||
|
Loading…
Reference in New Issue
Block a user