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

Commit 2534dfd

Browse files
author
Emmanuel Garcia
committed
Add comment in rasterizer
1 parent 7209d6a commit 2534dfd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shell/common/rasterizer.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,10 @@ RasterStatus Rasterizer::DrawToSurface(flutter::LayerTree& layer_tree) {
392392
embedder_root_canvas = external_view_embedder->GetRootCanvas();
393393
}
394394

395+
// On Android, the external view embedder deletes surfaces in `BeginFrame`.
396+
//
397+
// Deleting a surface also clears the GL context. Therefore, acquire the
398+
// frame, after calling `BeginFrame` as this operation resets the GL context.
395399
auto frame = surface_->AcquireFrame(layer_tree.frame_size());
396400

397401
if (frame == nullptr) {

0 commit comments

Comments
 (0)