diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-25 21:02:11 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-25 21:02:11 +0000 |
commit | 048ff1542aef5ee8abe89077d05162e7215fe05c (patch) | |
tree | 08ed7c4bf5436424ce081ca3259fb06d61be58cc /cc/base | |
parent | 885e54f1b299324a22f36014038d217805c15d3f (diff) | |
download | chromium_src-048ff1542aef5ee8abe89077d05162e7215fe05c.zip chromium_src-048ff1542aef5ee8abe89077d05162e7215fe05c.tar.gz chromium_src-048ff1542aef5ee8abe89077d05162e7215fe05c.tar.bz2 |
cc: Early out in PictureLayer::Update more often
Previously, early outs there were prevented to give the PicturePile a
chance to update its visibility or handle invalidations. However, this
can be handled a lot sooner than walking over all tiles. If the layer
size hasn't changed, there are no invalidations, and the visiblity is
the same as the last frame, then early out.
With 220 bunnies (from bug link) on an N4:
PictureLayer::Update average goes from 0.065ms to 0.023ms
LayerTreeHost::UpdateLayers average goes from 1.233ms to 0.877ms
BUG=322207
Review URL: https://codereview.chromium.org/81953004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/base')
-rw-r--r-- | cc/base/invalidation_region.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/base/invalidation_region.h b/cc/base/invalidation_region.h index fd061e8c..33be803 100644 --- a/cc/base/invalidation_region.h +++ b/cc/base/invalidation_region.h @@ -22,6 +22,7 @@ class CC_EXPORT InvalidationRegion { void Swap(Region* region); void Clear(); void Union(gfx::Rect rect); + bool IsEmpty() const { return region_.IsEmpty(); } private: void SimplifyIfNeeded(); |