Part 2 of independent layout pipelines

Adds BuildOwner to manage the dirty list and build processing for
widgets/elements, and adds a widget unit test to make sure separation
is enforced.

Fixes #2723
This commit is contained in:
Kris Giesing
2016-03-28 13:02:03 -07:00
parent d2a616e8fd
commit 9dfd5d4021
8 changed files with 351 additions and 145 deletions

View File

@@ -38,9 +38,9 @@ class _SteppedWidgetFlutterBinding extends WidgetFlutterBinding {
// Pump the rendering pipeline up to the given phase.
@override
void beginFrame() {
buildDirtyElements();
buildOwner.buildDirtyElements();
_beginFrame();
Element.finalizeTree();
buildOwner.finalizeTree();
}
// Cloned from Renderer.beginFrame() but with early-exit semantics.
@@ -84,7 +84,7 @@ class WidgetTester extends Instrumentation {
final FakeAsync async;
final Clock clock;
/// Calls [runApp()] with the given widget, then triggers a frame sequent and
/// Calls [runApp()] with the given widget, then triggers a frame sequence and
/// flushes microtasks, by calling [pump()] with the same duration (if any).
/// The supplied EnginePhase is the final phase reached during the pump pass;
/// if not supplied, the whole pass is executed.