-
Notifications
You must be signed in to change notification settings - Fork 6k
Conversation
dl_recorder_ = sk_make_sp<DisplayListCanvasRecorder>(kGiantRect); | ||
FML_DCHECK(!frame_size.isEmpty()); | ||
dl_recorder_ = | ||
sk_make_sp<DisplayListCanvasRecorder>(SkRect::Make(frame_size)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This right here is what makes the magic for impeller. This code path is used for impeller, and this will cause the SkCanvas implementation underlying the recorder here to quickReject
drawing ops that fall outside of it, which will gate off a whole lot of allocations of impeller-specific geometry (e.g. not creating impeller::Path
objects for SkPath
s that fall entirely outside these bounds).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm going to wait until I can rebase this on #35978 just to try to be extra sure I'm not using these sizes after they get moved :) |
Actually, that patch will catch issues with this on post submit anyway. |
Passes through the frame size parameter from
Surface::AcquireFrame
toSurfaceFrame
. This primarily helps impeller, which no longer needs to usekGiantRect
and will be able to more aggressively cull away graphical operations/geometry that fall outside of the frame's bounds.This is part of a fix for flutter/flutter#110442. We should still do the work @bdero is proposing in #35966, but this will cover cases where clips in the DL/layer tree don't save us.
I still think we could be doing this kind of culling higher up in the stack in the framework (see flutter/flutter#111065).