Skip to content

Commit

Permalink
Revert "Implement unobstructed Platform Views on iOS (flutter#17049)" (
Browse files Browse the repository at this point in the history
…flutter#17233)

This reverts commit 2627634.
  • Loading branch information
Emmanuel Garcia committed Mar 20, 2020
1 parent bba1a3c commit 70f6d18
Show file tree
Hide file tree
Showing 19 changed files with 124 additions and 839 deletions.
5 changes: 1 addition & 4 deletions flow/embedded_views.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@

namespace flutter {

bool ExternalViewEmbedder::SubmitFrame(GrContext* context,
SkCanvas* background_canvas) {
bool ExternalViewEmbedder::SubmitFrame(GrContext* context) {
return false;
};

void ExternalViewEmbedder::FinishFrame(){};

void MutatorsStack::PushClipRect(const SkRect& rect) {
std::shared_ptr<Mutator> element = std::make_shared<Mutator>(rect);
vector_.push_back(element);
Expand Down
5 changes: 1 addition & 4 deletions flow/embedded_views.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,7 @@ class ExternalViewEmbedder {
// Must be called on the UI thread.
virtual SkCanvas* CompositeEmbeddedView(int view_id) = 0;

virtual bool SubmitFrame(GrContext* context, SkCanvas* background_canvas);

// This is called after submitting the embedder frame and the surface frame.
virtual void FinishFrame();
virtual bool SubmitFrame(GrContext* context);

FML_DISALLOW_COPY_AND_ASSIGN(ExternalViewEmbedder);

Expand Down
2 changes: 1 addition & 1 deletion flow/layers/picture_layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void PictureLayer::Paint(PaintContext& context) const {
return;
}
}
picture()->playback(context.leaf_nodes_canvas);
context.leaf_nodes_canvas->drawPicture(picture());
}

} // namespace flutter
3 changes: 3 additions & 0 deletions flow/layers/picture_layer_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ TEST_F(PictureLayerTest, SimplePicture) {
1, MockCanvas::SetMatrixData{RasterCache::GetIntegralTransCTM(
layer_offset_matrix)}},
#endif
MockCanvas::DrawCall{
1, MockCanvas::DrawPictureData{mock_picture->serialize(), SkPaint(),
SkMatrix()}},
MockCanvas::DrawCall{1, MockCanvas::RestoreData{0}}});
EXPECT_EQ(mock_canvas().draw_calls(), expected_draw_calls);
}
Expand Down
12 changes: 2 additions & 10 deletions shell/common/rasterizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,17 +342,9 @@ RasterStatus Rasterizer::DrawToSurface(flutter::LayerTree& layer_tree) {
if (raster_status == RasterStatus::kFailed) {
return raster_status;
}
frame->Submit();
if (external_view_embedder != nullptr) {
external_view_embedder->SubmitFrame(surface_->GetContext(),
root_surface_canvas);
// The external view embedder may mutate the root surface canvas while
// submitting the frame.
// Therefore, submit the final frame after asking the external view
// embedder to submit the frame.
frame->Submit();
external_view_embedder->FinishFrame();
} else {
frame->Submit();
external_view_embedder->SubmitFrame(surface_->GetContext());
}

FireNextFrameCallbackIfPresent();
Expand Down
Loading

0 comments on commit 70f6d18

Please sign in to comment.