diff options
author | vmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-03 21:27:48 +0000 |
---|---|---|
committer | vmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-03 21:27:48 +0000 |
commit | 227918632d13012f2a2caa7c2569b663e00eb4fa (patch) | |
tree | f3ef4040ba6e10823f3b18ee58de5754fd13d32b /cc | |
parent | a77825bcf0cc733420bc670f22589ad3ffc79a96 (diff) | |
download | chromium_src-227918632d13012f2a2caa7c2569b663e00eb4fa.zip chromium_src-227918632d13012f2a2caa7c2569b663e00eb4fa.tar.gz chromium_src-227918632d13012f2a2caa7c2569b663e00eb4fa.tar.bz2 |
cc: Simply invalidation regions after each union.
This patch makes the region simplification happen after each union,
to make sure that if there are a lot of invalidations, the performance
doesn't degrade too much.
BUG=303757
R=enne@chromium.org
Review URL: https://codereview.chromium.org/25828004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226853 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/base/invalidation_region.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/cc/base/invalidation_region.cc b/cc/base/invalidation_region.cc index 2c39d25..6a8f97f 100644 --- a/cc/base/invalidation_region.cc +++ b/cc/base/invalidation_region.cc @@ -19,14 +19,6 @@ InvalidationRegion::InvalidationRegion() {} InvalidationRegion::~InvalidationRegion() {} void InvalidationRegion::Swap(Region* region) { - UMA_HISTOGRAM_CUSTOM_COUNTS( - "Renderer4.InvalidationRegionApproximateRectCount", - region_.GetRegionComplexity(), - 1, - 5000, - 50); - - SimplifyIfNeeded(); region_.Swap(region); } @@ -35,9 +27,8 @@ void InvalidationRegion::Clear() { } void InvalidationRegion::Union(gfx::Rect rect) { - // TODO(vmpstr): We should simplify the region after Union() after we get a - // good idea of what kind of regions are typical (from the UMA histogram). region_.Union(rect); + SimplifyIfNeeded(); } void InvalidationRegion::SimplifyIfNeeded() { |