Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Implement unobstructed Platform Views on iOS" #17233

Merged
merged 1 commit into from
Mar 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
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