Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/flutter_cef_macos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
the new size (up to about 4 s), most often mid-way through an animated device
switch. CEF paints by capturing the view: the renderer's first frame at the
new size was captured at the old size, and the capturer's own retries were
turned away until the stall fallback kicked in. `cef_host` now asks for a
fresh capture every 100 ms while a resize waits for its paint.
turned away until the stall fallback kicked in (CEF issue #3826, fixed in
CEF 8037+). `cef_host` now asks for a fresh capture every 100 ms while a
resize waits for its paint.
`device_frame` no longer needs the stall fallback (it did in 1 to 12 of 30
switches). The prebuilt must be republished.
* Fix: a view could stop painting for good after a resize that changed the
Expand Down
16 changes: 9 additions & 7 deletions packages/flutter_cef_macos/native/cef_host/browser_ops.mm
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,15 @@ void DoSetVisible(const std::shared_ptr<Slot>& slot, bool visible) {
// size of the renderer's last activated frame. When the renderer's frame at the
// new size activates, it is captured at the OLD size, and only then does CEF set
// the new capture size. The capture that change asks for is rate-limited (one
// was just taken), and the capturer's own retries go through a stricter check
// (nothing pending, no recent animation) that can turn them all away. A page
// with nothing else changing gives it no damage either, so no paint at the new
// size came until the stall kick. Invalidate asks for a capture the way a
// compositor update does, which isn't subject to that check. The one at the
// start of a resize comes too early, so ask again every kResizeRefreshMs until
// the paint arrives.
// was just taken), and the capturer's own retries only capture when no capture
// is pending. Chromium leaves a dropped capture counted as pending, so after one
// drop those retries never capture again (CEF issue #3826). A page with nothing
// else changing gives it no damage either, so no paint at the new size came
// until the stall kick. Invalidate asks for a capture the way a compositor
// update does, which isn't subject to that check. The one at the start of a
// resize comes too early, so ask again every kResizeRefreshMs until the paint
// arrives. CEF fixed the bookkeeping in viz_capture_3826.patch (branch 8037 and
// later); on such a CEF this refresh is no longer needed.
namespace {
constexpr int kResizeRefreshMs = 100;
constexpr int kResizePaintWaitMs = 1000;
Expand Down
Loading