Chromium Code Reviews| Index: ui/compositor/compositor.cc |
| diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc |
| index 43dd4605a11ab614f76706aca6f4276d1e2d5ac0..c50f9efdddb5321b6095e8c8a8bf4b64482433b9 100644 |
| --- a/ui/compositor/compositor.cc |
| +++ b/ui/compositor/compositor.cc |
| @@ -326,9 +326,16 @@ void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) { |
| void Compositor::BeginMainFrameNotExpectedSoon() { |
| } |
| +static void SendDamagedRectsRecursive(ui::Layer* layer) { |
| + layer->SendDamagedRects(); |
| + for (auto* child : layer->children()) |
|
sky
2015/04/23 15:53:25
Why are you moving the recursion here?
danakj
2015/04/23 16:02:56
To make the Layer function a simpler method. The C
|
| + SendDamagedRectsRecursive(child); |
| +} |
| + |
| void Compositor::Layout() { |
| - if (root_layer_) |
| - root_layer_->SendDamagedRects(); |
| + if (!root_layer()) |
| + return; |
| + SendDamagedRectsRecursive(root_layer()); |
| } |
| void Compositor::RequestNewOutputSurface() { |