mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 02:32:44 +03:00
implement tsla code review points in render monotonic time change
This commit is contained in:
parent
a6dd92c571
commit
ea08caccb9
@ -17,7 +17,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
/**
|
||||
* \file
|
||||
* Content for text/html (implementation).
|
||||
*/
|
||||
|
||||
@ -1376,7 +1377,7 @@ static void html_reformat(struct content *c, int width, int height)
|
||||
struct box *layout;
|
||||
uint64_t ms_before;
|
||||
uint64_t ms_after;
|
||||
uint64_t ms_next;
|
||||
uint64_t ms_interval;
|
||||
|
||||
nsu_getmonotonic_ms(&ms_before);
|
||||
|
||||
@ -1406,11 +1407,11 @@ static void html_reformat(struct content *c, int width, int height)
|
||||
/* calculate next reflow time at three times what it took to reflow */
|
||||
nsu_getmonotonic_ms(&ms_after);
|
||||
|
||||
ms_next = (ms_before - ms_after) * 3;
|
||||
if (ms_next < (nsoption_uint(min_reflow_period) * 10)) {
|
||||
ms_next = nsoption_uint(min_reflow_period) * 10;
|
||||
ms_interval = (ms_before - ms_after) * 3;
|
||||
if (ms_interval < (nsoption_uint(min_reflow_period) * 10)) {
|
||||
ms_interval = nsoption_uint(min_reflow_period) * 10;
|
||||
}
|
||||
c->reformat_time = ms_after + ms_next;
|
||||
c->reformat_time = ms_after + ms_interval;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user