Do not Prepare raster cache if view_embedder is present (flutter/engine#11300)

This is a perf win because we do not use the cache in Paint anyways.
RasterCache <-> PlatformViews interaction will be improved by:
https://github.com/flutter/flutter/issues/38903
This commit is contained in:
Kaushik Iska
2019-08-20 14:38:45 -07:00
committed by GitHub
parent fb100ac764
commit 281ac5bf5a

View File

@@ -46,7 +46,7 @@ void OpacityLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
set_paint_bounds(paint_bounds().makeOffset(offset_.fX, offset_.fY));
// See |EnsureSingleChild|.
FML_DCHECK(layers().size() == 1);
if (context->raster_cache &&
if (context->view_embedder == nullptr && context->raster_cache &&
SkRect::Intersects(context->cull_rect, paint_bounds())) {
Layer* child = layers()[0].get();
SkMatrix ctm = child_matrix;