Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ bool AndroidExternalViewEmbedder::SubmitFrame(
// Submit the background canvas frame before switching the GL context to
// the overlay surfaces.
//
// Skip a frame if the embedding is switching surfaces.
// Skip a frame if the embedding is switching surfaces, and indicate in
// `PostPrerollAction` that this frame must be resubmitted.
auto should_submit_current_frame =
previous_frame_view_count_ > 0 || current_frame_view_count == 0;
if (should_submit_current_frame) {
Expand Down Expand Up @@ -233,6 +234,10 @@ PostPrerollResult AndroidExternalViewEmbedder::PostPrerollAction(
CancelFrame();
return PostPrerollResult::kResubmitFrame;
}
// Surface switch requires to resubmit the frame.
if (previous_frame_view_count_ == 0) {
return PostPrerollResult::kResubmitFrame;
}
}
return PostPrerollResult::kSuccess;
}
Expand Down