Check needs_painting in RasterCache::Prepare (flutter/engine#6708)

Otherwise, this may trigger `FML_DCHECK(needs_painting())`. We haven't
caused crashes for our users because it probably requires a locally
debug engine build to trigger the assert.
This commit is contained in:
liyuqian 2018-10-31 10:51:13 -07:00 committed by GitHub
parent 169f688c92
commit 33abef4875

View File

@ -164,7 +164,9 @@ void RasterCache::Prepare(PrerollContext* context,
context->texture_registry,
context->raster_cache,
context->checkerboard_offscreen_layers};
layer->Paint(paintContext);
if (layer->needs_painting()) {
layer->Paint(paintContext);
}
});
}
}