Bypass the raster cache when screenshotting (flutter/engine#5227)

Fixes https://github.com/flutter/flutter/issues/17448
This commit is contained in:
Todd Volkert
2018-05-10 12:32:17 -07:00
committed by GitHub
parent 399a30a974
commit 99d48aab30

View File

@@ -176,7 +176,7 @@ static sk_sp<SkData> ScreenshotLayerTreeAsImage(
auto canvas = snapshot_surface->getCanvas();
auto frame = compositor_context.AcquireFrame(surface_context, canvas, false);
canvas->clear(SK_ColorBLACK);
frame->Raster(*tree, false);
frame->Raster(*tree, true);
canvas->flush();
// Prepare an image from the surface, this image may potentially be on th GPU.