Skip to content

Commit

Permalink
Move OnDisplayPlatformView JNI call (flutter#19258)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Garcia committed Jun 24, 2020
1 parent b8b134a commit 9075224
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,6 @@ bool AndroidExternalViewEmbedder::SubmitFrame(

for (size_t i = 0; i < composition_order_.size(); i++) {
int64_t view_id = composition_order_[i];
SkRect view_rect = GetViewRect(view_id);

// Display the platform view. If it's already displayed, then it's
// just positioned and sized.
jni_facade_->FlutterViewOnDisplayPlatformView(view_id, //
view_rect.x(), //
view_rect.y(), //
view_rect.width(), //
view_rect.height() //
);

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

for (int64_t view_id : composition_order_) {
SkRect view_rect = GetViewRect(view_id);
// Display the platform view. If it's already displayed, then it's
// just positioned and sized.
jni_facade_->FlutterViewOnDisplayPlatformView(view_id, //
view_rect.x(), //
view_rect.y(), //
view_rect.width(), //
view_rect.height() //
);
for (const SkRect& overlay_rect : overlay_layers.at(view_id)) {
CreateSurfaceIfNeeded(context, //
view_id, //
Expand Down

0 comments on commit 9075224

Please sign in to comment.