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

Unified Diff: cc/layers/layer.cc

Issue 5831706594508800: cc: Cleanup Layer::SetNeedsDisplayInRect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | 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 7fe86ac738f14900a6e9c1b34d7c0edfe118c076..70df6002d4e440a93b6c25c50ea85cf0c9fad282 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -620,13 +620,13 @@ void Layer::SetHideLayerAndSubtree(bool hide) {
}
void Layer::SetNeedsDisplayRect(const gfx::RectF& dirty_rect) {
+ if (dirty_rect.IsEmpty())
slavi 2013/07/11 21:58:09 Don't do this. When I wrote that function, the int
danakj 2013/07/11 21:59:12 Why not just call SetNeedsCommit on the layer's ho
tomhudson 2013/07/24 09:02:43 If people can't determine the intended semantics b
+ return;
+
update_rect_.Union(dirty_rect);
needs_display_ = true;
- // Simply mark the contents as dirty. For non-root layers, the call to
- // SetNeedsCommit will schedule a fresh compositing pass.
- // For the root layer, SetNeedsCommit has no effect.
- if (DrawsContent() && !update_rect_.IsEmpty())
+ if (DrawsContent())
SetNeedsCommit();
}
« no previous file with comments | « no previous file | cc/layers/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698