Skip to content

Commit

Permalink
Check needs_painting in RasterCache::Prepare (flutter#6708)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
liyuqian authored Oct 31, 2018
1 parent 552fae6 commit a27d2f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flow/raster_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
}
}
Expand Down

0 comments on commit a27d2f2

Please sign in to comment.