Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: cc/layers/layer.cc

Issue 5831706594508800: cc: Cleanup Layer::SetNeedsDisplayInRect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 9d1cde59148f08d60cf642019fc37f1d0fe84e60..9e181dbd742d15bc83e0d2df6c45c9883a2ff112 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 {
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698