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(); |
} |