Skip to content

Commit 70f6d18

Browse files
author
Emmanuel Garcia
authored
Revert "Implement unobstructed Platform Views on iOS (flutter#17049)" (flutter#17233)
This reverts commit 2627634.
1 parent bba1a3c commit 70f6d18

19 files changed

+124
-839
lines changed

flow/embedded_views.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@
66

77
namespace flutter {
88

9-
bool ExternalViewEmbedder::SubmitFrame(GrContext* context,
10-
SkCanvas* background_canvas) {
9+
bool ExternalViewEmbedder::SubmitFrame(GrContext* context) {
1110
return false;
1211
};
1312

14-
void ExternalViewEmbedder::FinishFrame(){};
15-
1613
void MutatorsStack::PushClipRect(const SkRect& rect) {
1714
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rect);
1815
vector_.push_back(element);

flow/embedded_views.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,7 @@ class ExternalViewEmbedder {
248248
// Must be called on the UI thread.
249249
virtual SkCanvas* CompositeEmbeddedView(int view_id) = 0;
250250

251-
virtual bool SubmitFrame(GrContext* context, SkCanvas* background_canvas);
252-
253-
// This is called after submitting the embedder frame and the surface frame.
254-
virtual void FinishFrame();
251+
virtual bool SubmitFrame(GrContext* context);
255252

256253
FML_DISALLOW_COPY_AND_ASSIGN(ExternalViewEmbedder);
257254

flow/layers/picture_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void PictureLayer::Paint(PaintContext& context) const {
5959
return;
6060
}
6161
}
62-
picture()->playback(context.leaf_nodes_canvas);
62+
context.leaf_nodes_canvas->drawPicture(picture());
6363
}
6464

6565
} // namespace flutter

flow/layers/picture_layer_unittests.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ TEST_F(PictureLayerTest, SimplePicture) {
9494
1, MockCanvas::SetMatrixData{RasterCache::GetIntegralTransCTM(
9595
layer_offset_matrix)}},
9696
#endif
97+
MockCanvas::DrawCall{
98+
1, MockCanvas::DrawPictureData{mock_picture->serialize(), SkPaint(),
99+
SkMatrix()}},
97100
MockCanvas::DrawCall{1, MockCanvas::RestoreData{0}}});
98101
EXPECT_EQ(mock_canvas().draw_calls(), expected_draw_calls);
99102
}

shell/common/rasterizer.cc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -342,17 +342,9 @@ RasterStatus Rasterizer::DrawToSurface(flutter::LayerTree& layer_tree) {
342342
if (raster_status == RasterStatus::kFailed) {
343343
return raster_status;
344344
}
345+
frame->Submit();
345346
if (external_view_embedder != nullptr) {
346-
external_view_embedder->SubmitFrame(surface_->GetContext(),
347-
root_surface_canvas);
348-
// The external view embedder may mutate the root surface canvas while
349-
// submitting the frame.
350-
// Therefore, submit the final frame after asking the external view
351-
// embedder to submit the frame.
352-
frame->Submit();
353-
external_view_embedder->FinishFrame();
354-
} else {
355-
frame->Submit();
347+
external_view_embedder->SubmitFrame(surface_->GetContext());
356348
}
357349

358350
FireNextFrameCallbackIfPresent();

0 commit comments

Comments
 (0)