Chromium Code Reviews| Index: runtime/observatory/lib/src/elements/helpers/rendering_queue.dart |
| diff --git a/runtime/observatory/lib/src/elements/helpers/rendering_queue.dart b/runtime/observatory/lib/src/elements/helpers/rendering_queue.dart |
| index 707de2331ad3883bd0fca81ef112073aaacacb20..b54623ee20e9f993bf9c19511de1d5055db6dc45 100644 |
| --- a/runtime/observatory/lib/src/elements/helpers/rendering_queue.dart |
| +++ b/runtime/observatory/lib/src/elements/helpers/rendering_queue.dart |
| @@ -56,10 +56,17 @@ class RenderingQueue { |
| /// Add a task to the queue. |
| /// If the current rendering phase is running it will be executed during this |
| /// rendering cycle, otherwise it will be queued for the next one. |
| - void enqueue(RenderingTask r) { |
| + void enqueue(RenderingTask r, {bool realtime: false}) { |
|
siva
2017/08/14 20:27:18
instead of calling enqueue here with a parameter r
cbernaschina
2017/08/14 21:08:49
See new Patch.
The execution on a browser which s
|
| assert(r != null); |
| // If no task are in the queue there is no rendering phase scheduled. |
| - if (isEmpty) _render(); |
| + if (isEmpty) { |
| + if (realtime) { |
| + scheduleMicrotask(r.render); |
| + return; |
| + } else { |
| + _render(); |
| + } |
| + } |
| _queue.addLast(r); |
| } |