Don't send empty HostBytes strings.
This allows more Resize instructions to be elided. It also keeps the server from sending empty updates when the screen has been written but not changed.
This commit is contained in:
@@ -87,8 +87,11 @@ string Complete::diff_from( const Complete &existing ) const
|
|||||||
new_res->MutableExtension( resize )->set_width( terminal.get_fb().ds.get_width() );
|
new_res->MutableExtension( resize )->set_width( terminal.get_fb().ds.get_width() );
|
||||||
new_res->MutableExtension( resize )->set_height( terminal.get_fb().ds.get_height() );
|
new_res->MutableExtension( resize )->set_height( terminal.get_fb().ds.get_height() );
|
||||||
}
|
}
|
||||||
Instruction *new_inst = output.add_instruction();
|
string update = display.new_frame( true, existing.get_fb(), terminal.get_fb() );
|
||||||
new_inst->MutableExtension( hostbytes )->set_hoststring( display.new_frame( true, existing.get_fb(), terminal.get_fb() ) );
|
if ( !update.empty() ) {
|
||||||
|
Instruction *new_inst = output.add_instruction();
|
||||||
|
new_inst->MutableExtension( hostbytes )->set_hoststring( update );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return output.SerializeAsString();
|
return output.SerializeAsString();
|
||||||
|
|||||||
Reference in New Issue
Block a user