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.
This commit is contained in:
Adam Barth 2015-08-11 14:38:49 -07:00
parent db3586f19f
commit 2e6c78cdb7
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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) {