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

This matches the behavior from before the shell refactoring.

Fixes https://github.com/flutter/flutter/issues/16754
This commit is contained in:
Jason Simmons
2018-04-19 13:32:00 -07:00
committed by Chinmay Garde
parent 4aa708019e
commit e2c22f864f

View File

@@ -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.