Create an example app that demonstrates interactive coordination of an fn tree and a raw RenderObject tree.

Sector changes:
- implement the intrinsic sizing box API on RenderBoxToRenderSectorAdapter
- remove some debug print statements
- fix getIntrinsicDimensions() on RenderSolidColor to return true values
- factor out the default demo

RenderObject changes:
- BoxConstraints.isInfinite() now returns true only if both dimensions are infinite

fn changes:
- implement UINodeToRenderBoxAdapter
- rename RenderObjectToUINodeAdapter to RenderBoxToUINodeAdapter

Tests:
- add a test for sector layout
- make TestRenderView support being run without the unit test framework

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1175423007.
This commit is contained in:
Hixie
2015-06-16 09:28:59 -07:00
parent 8887090320
commit d89214f5ed
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
CONSOLE: TestRenderView enabled
CONSOLE:
PAINT FOR FRAME #1 ----------------------------------------------
1 | TestDisplayList() constructor: 800.0 x 600.0
1 | paintChild RenderBoxToRenderSectorAdapter at Point(0.0, 0.0)
1 | | TestDisplayList() constructor: 800.0 x 600.0
1 | | paintChild RenderSectorRing at Point(400.0, 300.0)
1 | | | TestDisplayList() constructor: 800.0 x 600.0
1 | | | paintChild RenderSolidColor at Point(0.0, 0.0)
1 | | | | TestDisplayList() constructor: 800.0 x 600.0
1 | | | | drawPath(Instance of 'Path', Paint(Color(0xff00ffff)))
1 | | | paintChild RenderSolidColor at Point(0.0, 0.0)
1 | | | | TestDisplayList() constructor: 800.0 x 600.0
1 | | | | drawPath(Instance of 'Path', Paint(Color(0xff0000ff)))
1 | | | paintChild RenderSectorSlice at Point(0.0, 0.0)
1 | | | | TestDisplayList() constructor: 800.0 x 600.0
1 | | | | paintChild RenderSolidColor at Point(0.0, 0.0)
1 | | | | | TestDisplayList() constructor: 800.0 x 600.0
1 | | | | | drawPath(Instance of 'Path', Paint(Color(0xffffff00)))
1 | | | | paintChild RenderSolidColor at Point(0.0, 0.0)
1 | | | | | TestDisplayList() constructor: 800.0 x 600.0
1 | | | | | drawPath(Instance of 'Path', Paint(Color(0xffff9000)))
1 | | | | paintChild RenderSolidColor at Point(0.0, 0.0)
1 | | | | | TestDisplayList() constructor: 800.0 x 600.0
1 | | | | | drawPath(Instance of 'Path', Paint(Color(0xff00ff00)))
------------------------------------------------------------------------
PAINTED 1 FRAMES

View File

@@ -0,0 +1,12 @@
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import '../../examples/rendering/sector_layout.dart';
import '../resources/display_list.dart';
void main() {
new TestRenderView(buildSectorExample()).endTest();
}