From 0057de16c0416c48fcf08f9018c768ebda4e1372 Mon Sep 17 00:00:00 2001 From: Yuqian Li Date: Wed, 31 Oct 2018 10:25:20 -0700 Subject: [PATCH] Check needs_painting in RasterCache::Prepare 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. --- flow/raster_cache.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flow/raster_cache.cc b/flow/raster_cache.cc index 017b907e161f7..d20c65df5b1ff 100644 --- a/flow/raster_cache.cc +++ b/flow/raster_cache.cc @@ -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); + } }); } }