Commit 88eba915 authored by Adam Barth's avatar Adam Barth

Don't paint twice

In refactoring the way we generate the SkPicture, I accidentially made us
generate the SkPicture twice. This CL causes us to generate it only once.
parent 441fe4d4
...@@ -1678,8 +1678,6 @@ class ViewConstraints { ...@@ -1678,8 +1678,6 @@ class ViewConstraints {
} }
class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox> { class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox> {
bool get createNewDisplayList => true;
RenderView({ RenderView({
RenderBox child, RenderBox child,
this.timeForRotation: const Duration(microseconds: 83333) this.timeForRotation: const Duration(microseconds: 83333)
......
...@@ -164,7 +164,6 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget { ...@@ -164,7 +164,6 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
return true; return true;
}); });
_nodesNeedingLayout.add(this); _nodesNeedingLayout.add(this);
_nodesNeedingPaint.add(this);
scheduler.ensureVisualUpdate(); scheduler.ensureVisualUpdate();
} }
static void flushLayout() { static void flushLayout() {
...@@ -331,6 +330,9 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget { ...@@ -331,6 +330,9 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
_needsPaint = true; _needsPaint = true;
_nodesNeedingPaint.add(this); _nodesNeedingPaint.add(this);
scheduler.ensureVisualUpdate(); scheduler.ensureVisualUpdate();
} else if (parent == null) {
_needsPaint = true;
scheduler.ensureVisualUpdate();
} else { } else {
assert(parent != null); // parent always exists on this path because the root node is a RenderView, which sets createNewDisplayList. assert(parent != null); // parent always exists on this path because the root node is a RenderView, which sets createNewDisplayList.
if (parent is RenderObject) { 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