diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-31 20:20:14 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-31 20:20:14 +0000 |
commit | 6ad215690ddb46fe2410a349efae1990781ec4d6 (patch) | |
tree | 301ffaade253876dab485bb4b26a4be06f2ad7e6 /cc/layers/layer.cc | |
parent | 97ddd8da152f92bc779fd61d07cc8198e99b09d8 (diff) | |
download | chromium_src-6ad215690ddb46fe2410a349efae1990781ec4d6.zip chromium_src-6ad215690ddb46fe2410a349efae1990781ec4d6.tar.gz chromium_src-6ad215690ddb46fe2410a349efae1990781ec4d6.tar.bz2 |
cc: Cleanup Layer::SetNeedsDisplayInRect
This comment is no longer true. Also, simplified the early out
condition and added a test.
R=danakj@chromium.org
BUG=none
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=214103
Review URL: https://chromiumcodereview.appspot.com/5831706594508800
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/layer.cc')
-rw-r--r-- | cc/layers/layer.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index 9d1cde5..9e181db 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc @@ -671,16 +671,15 @@ void Layer::SetHideLayerAndSubtree(bool hide) { } void Layer::SetNeedsDisplayRect(const gfx::RectF& dirty_rect) { - if (!update_rect_.Contains(dirty_rect)) { - SetNeedsPushProperties(); - } + if (dirty_rect.IsEmpty()) + return; + SetNeedsPushProperties(); update_rect_.Union(dirty_rect); needs_display_ = true; - if (DrawsContent() && !update_rect_.IsEmpty()) { + if (DrawsContent()) SetNeedsUpdate(); - } } bool Layer::DescendantIsFixedToContainerLayer() const { |