OLD | NEW |
1 Sky's Run Loop | 1 Sky's Run Loop |
2 ============== | 2 ============== |
3 | 3 |
4 Sky's run loop consists of running the following, at 120Hz (each loop | 4 Sky's run loop consists of running the following, at 120Hz (each loop |
5 takes 8.333ms): | 5 takes 8.333ms): |
6 | 6 |
7 1. Send scroll and resize events if necessary, limiting each handler | 7 1. Send scroll and resize events if necessary, limiting each handler |
8 to 1ms, and limiting the total time spent on these handlers to 1ms. | 8 to 1ms, and limiting the total time spent on these handlers to 1ms. |
9 | 9 |
10 2. Fire animation frame callbacks for up to 1ms. Each callback can run | 10 2. Fire animation frame callbacks for up to 1ms. Each callback can run |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 5. Update as much of paint as possible; after 1ms, throw a (catchable) | 25 5. Update as much of paint as possible; after 1ms, throw a (catchable) |
26 EDeadlineExceeded exception, leaving any remaining nodes | 26 EDeadlineExceeded exception, leaving any remaining nodes |
27 unprepared. | 27 unprepared. |
28 | 28 |
29 6. Send frame to GPU. | 29 6. Send frame to GPU. |
30 | 30 |
31 7. Run pending tasks until the 8.333ms expires. Each task may only run | 31 7. Run pending tasks until the 8.333ms expires. Each task may only run |
32 for at most 1ms, after 1ms they get a (catchable) EDeadlineExceeded | 32 for at most 1ms, after 1ms they get a (catchable) EDeadlineExceeded |
33 exception. While there are no pending tasks, sleep. | 33 exception. While there are no pending tasks, sleep. |
34 Tasks are thingsl like: | 34 Tasks are things like: |
35 - timers | 35 - timers |
36 - updating the DOM in response to parsing | 36 - updating the DOM in response to parsing |
37 - input events | 37 - input events |
38 - mojo callbacks | 38 - mojo callbacks |
39 | 39 |
40 TODO(ianh): Update the timings above to have some relationship to | 40 TODO(ianh): Update the timings above to have some relationship to |
41 reality. | 41 reality. |
| 42 |
| 43 TODO(ianh): Define how scroll notifications get sent, or decide to |
| 44 drop them entirely from this model. |
OLD | NEW |