| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index 5e7bd77ecc9ee5fa31359d0d78e6980f529f7fc3..fc9f2daba445f1b78b01dc5a3c2624a620663b95 100644
|
| --- a/cc/layers/layer.cc
|
| +++ b/cc/layers/layer.cc
|
| @@ -663,13 +663,13 @@ void Layer::SetHideLayerAndSubtree(bool hide) {
|
| }
|
|
|
| void Layer::SetNeedsDisplayRect(const gfx::RectF& dirty_rect) {
|
| + if (dirty_rect.IsEmpty())
|
| + 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();
|
| }
|
|
|
|
|