Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 9075224

Browse files
author
Emmanuel Garcia
authored
Move OnDisplayPlatformView JNI call (#19258)
1 parent b8b134a commit 9075224

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

shell/platform/android/external_view_embedder/external_view_embedder.cc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,6 @@ bool AndroidExternalViewEmbedder::SubmitFrame(
9191

9292
for (size_t i = 0; i < composition_order_.size(); i++) {
9393
int64_t view_id = composition_order_[i];
94-
SkRect view_rect = GetViewRect(view_id);
95-
96-
// Display the platform view. If it's already displayed, then it's
97-
// just positioned and sized.
98-
jni_facade_->FlutterViewOnDisplayPlatformView(view_id, //
99-
view_rect.x(), //
100-
view_rect.y(), //
101-
view_rect.width(), //
102-
view_rect.height() //
103-
);
10494

10595
sk_sp<SkPicture> picture =
10696
picture_recorders_.at(view_id)->finishRecordingAsPicture();
@@ -156,6 +146,15 @@ bool AndroidExternalViewEmbedder::SubmitFrame(
156146
frame->Submit();
157147

158148
for (int64_t view_id : composition_order_) {
149+
SkRect view_rect = GetViewRect(view_id);
150+
// Display the platform view. If it's already displayed, then it's
151+
// just positioned and sized.
152+
jni_facade_->FlutterViewOnDisplayPlatformView(view_id, //
153+
view_rect.x(), //
154+
view_rect.y(), //
155+
view_rect.width(), //
156+
view_rect.height() //
157+
);
159158
for (const SkRect& overlay_rect : overlay_layers.at(view_id)) {
160159
CreateSurfaceIfNeeded(context, //
161160
view_id, //

0 commit comments

Comments
 (0)