Commit 9c419a4f authored by vmpstr's avatar vmpstr Committed by Commit bot

cc: Don't analyze masks for solid color.

We don't handle masks that are solid color. Also, I suspect that most
masks aren't solid color, so we shouldn't waste time analyzing them.

R=enne, danakj

Review URL: https://codereview.chromium.org/543853002

Cr-Commit-Position: refs/heads/master@{#293606}
parent ba6f32e3
......@@ -582,12 +582,16 @@ scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling,
if (!pile_->CanRaster(tiling->contents_scale(), content_rect))
return scoped_refptr<Tile>();
int flags = 0;
// TODO(vmpstr): Revisit this. For now, enabling analysis means that we get as
// much savings on memory as we can. However, for some cases like ganesh or
// small layers, the amount of time we spend analyzing might not justify
// memory savings that we can get.
// memory savings that we can get. Note that we don't handle solid color
// masks, so we shouldn't bother analyzing those.
// Bugs: crbug.com/397198, crbug.com/396908
int flags = Tile::USE_PICTURE_ANALYSIS;
if (!is_mask_)
flags = Tile::USE_PICTURE_ANALYSIS;
return layer_tree_impl()->tile_manager()->CreateTile(
pile_.get(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment