File tree 3 files changed +6
-10
lines changed 3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -1022,6 +1022,7 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
1022
1022
1023
1023
WindowEvent :: RedrawRequested => {
1024
1024
route. window . winit_window . pre_present_notify ( ) ;
1025
+ let start = std:: time:: Instant :: now ( ) ;
1025
1026
match route. path {
1026
1027
RoutePath :: Assistant => {
1027
1028
route. window . screen . render_assistant ( & route. assistant ) ;
@@ -1030,8 +1031,7 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
1030
1031
route. window . screen . render_welcome ( ) ;
1031
1032
}
1032
1033
RoutePath :: Terminal => {
1033
- let duration = route. window . screen . render ( ) ;
1034
- route. window . compute_timestamp ( duration) ;
1034
+ route. window . screen . render ( ) ;
1035
1035
}
1036
1036
RoutePath :: ConfirmQuit => {
1037
1037
route
@@ -1040,8 +1040,10 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
1040
1040
. render_dialog ( "Do you want to leave Rio?" ) ;
1041
1041
}
1042
1042
}
1043
+ let duration = start. elapsed ( ) ;
1043
1044
// println!("Time elapsed in render() is: {:?}", duration);
1044
1045
// }
1046
+ route. window . compute_timestamp ( duration) ;
1045
1047
1046
1048
event_loop. set_control_flow ( ControlFlow :: Wait ) ;
1047
1049
}
Original file line number Diff line number Diff line change @@ -1904,8 +1904,7 @@ impl Screen<'_> {
1904
1904
self . sugarloaf . render ( ) ;
1905
1905
}
1906
1906
1907
- #[ inline]
1908
- pub fn render ( & mut self ) -> std:: time:: Duration {
1907
+ pub fn render ( & mut self ) {
1909
1908
// let start_total = std::time::Instant::now();
1910
1909
// println!("_____________________________\nrender time elapsed");
1911
1910
let is_search_active = self . search_active ( ) ;
@@ -1941,7 +1940,6 @@ impl Screen<'_> {
1941
1940
data
1942
1941
} ;
1943
1942
self . renderer . set_ime ( self . ime . preedit ( ) ) ;
1944
- let duration = std:: time:: Instant :: now ( ) ;
1945
1943
self . renderer . prepare_term (
1946
1944
& rows,
1947
1945
cursor,
@@ -1953,7 +1951,6 @@ impl Screen<'_> {
1953
1951
& self . search_state . focused_match ,
1954
1952
) ;
1955
1953
self . sugarloaf . render ( ) ;
1956
- let duration = duration. elapsed ( ) ;
1957
1954
// In this case the configuration of blinking cursor is enabled
1958
1955
// and the terminal also have instructions of blinking enabled
1959
1956
// TODO: enable blinking for selection after adding debounce (https://github.com/raphamorim/rio/issues/437)
@@ -1962,7 +1959,6 @@ impl Screen<'_> {
1962
1959
. blink_cursor ( self . renderer . config_blinking_interval ) ;
1963
1960
}
1964
1961
1965
- duration
1966
1962
// let duration = start_total.elapsed();
1967
1963
// println!("Total whole render function is: {:?}\n", duration);
1968
1964
}
Original file line number Diff line number Diff line change @@ -17,10 +17,8 @@ pub fn default_cursor_interval() -> u64 {
17
17
18
18
#[ inline]
19
19
pub fn default_max_fps ( ) -> u64 {
20
- if cfg ! ( target_os = "macos" ) {
20
+ if cfg ! ( target_os = "macos" ) || cfg ! ( target_os = "windows" ) {
21
21
240
22
- } else if cfg ! ( target_os = "windows" ) {
23
- 120
24
22
} else {
25
23
90
26
24
}
You can’t perform that action at this time.
0 commit comments