[go: nahoru, domu]

cc: Use a ListContainer for DisplayItemList to reduce allocations.

Currently every DisplayItem is malloced/freed individually. Follow the
pattern used for DrawQuads instead, using ListContainer to allocate
log(n) times instead of once for each item. This replaces each
DisplayFooItem::Create(...) with a default constructor and a
DisplayFooItem::SetNew(...) that must be called on newly constructed
items before they are used.

This patch changes the time to do UpdateLayers (after making
gfx::ImageSkiaReps immutable cuz they dominate times for now) for a
single tab loading spinner from .174ms to .167ms on a linux x620,
giving a 4% reduction in frame record time. I used a mean of 3000
samples in each run to reduce noise.

R=ajuma, enne
BUG=466426

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

Cr-Commit-Position: refs/heads/master@{#328797}
35 files changed