Commit 5bbf0d89 authored by Adam Barth's avatar Adam Barth

Merge pull request #570 from abarth/paint_once

Don't paint twice
parents 1ca858b9 88eba915
......@@ -1678,8 +1678,6 @@ class ViewConstraints {
}
class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox> {
bool get createNewDisplayList => true;
RenderView({
RenderBox child,
this.timeForRotation: const Duration(microseconds: 83333)
......
......@@ -164,7 +164,6 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
return true;
});
_nodesNeedingLayout.add(this);
_nodesNeedingPaint.add(this);
scheduler.ensureVisualUpdate();
}
static void flushLayout() {
......@@ -331,6 +330,9 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
_needsPaint = true;
_nodesNeedingPaint.add(this);
scheduler.ensureVisualUpdate();
} else if (parent == null) {
_needsPaint = true;
scheduler.ensureVisualUpdate();
} else {
assert(parent != null); // parent always exists on this path because the root node is a RenderView, which sets createNewDisplayList.
if (parent is RenderObject) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment