mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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:
parent
db3586f19f
commit
2e6c78cdb7
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user