提交 637e921d 编写于 作者: J Jason Simmons 提交者: Chinmay Garde

Use the raster cache when rendering screenshots as bitmaps (#5050)

This matches the behavior from before the shell refactoring.

Fixes https://github.com/flutter/flutter/issues/16754
上级 a23fa923
......@@ -164,7 +164,7 @@ static sk_sp<SkData> ScreenshotLayerTreeAsImage(flow::LayerTree* tree,
auto canvas = snapshot_surface->getCanvas();
auto frame = compositor_context.AcquireFrame(surface_context, canvas, false);
canvas->clear(SK_ColorBLACK);
frame->Raster(*tree, true);
frame->Raster(*tree, false);
canvas->flush();
// Prepare an image from the surface, this image may potentially be on th GPU.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册