| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/compositor/compositor.h" | 5 #include "ui/compositor/compositor.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 void Compositor::Layout() { | 498 void Compositor::Layout() { |
| 499 // We're sending damage that will be addressed during this composite | 499 // We're sending damage that will be addressed during this composite |
| 500 // cycle, so we don't need to schedule another composite to address it. | 500 // cycle, so we don't need to schedule another composite to address it. |
| 501 disable_schedule_composite_ = true; | 501 disable_schedule_composite_ = true; |
| 502 if (root_layer_) | 502 if (root_layer_) |
| 503 root_layer_->SendDamagedRects(); | 503 root_layer_->SendDamagedRects(); |
| 504 disable_schedule_composite_ = false; | 504 disable_schedule_composite_ = false; |
| 505 } | 505 } |
| 506 | 506 |
| 507 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface(bool fallback) { | 507 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface(bool fallback) { |
| 508 return ContextFactory::GetInstance()->CreateOutputSurface(this); | 508 return ContextFactory::GetInstance()->CreateOutputSurface(this, fallback); |
| 509 } | 509 } |
| 510 | 510 |
| 511 void Compositor::DidCommit() { | 511 void Compositor::DidCommit() { |
| 512 DCHECK(!IsLocked()); | 512 DCHECK(!IsLocked()); |
| 513 FOR_EACH_OBSERVER(CompositorObserver, | 513 FOR_EACH_OBSERVER(CompositorObserver, |
| 514 observer_list_, | 514 observer_list_, |
| 515 OnCompositingDidCommit(this)); | 515 OnCompositingDidCommit(this)); |
| 516 } | 516 } |
| 517 | 517 |
| 518 void Compositor::DidCommitAndDrawFrame() { | 518 void Compositor::DidCommitAndDrawFrame() { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 // CompositorObservers to be notified before starting another | 616 // CompositorObservers to be notified before starting another |
| 617 // draw cycle. | 617 // draw cycle. |
| 618 ScheduleDraw(); | 618 ScheduleDraw(); |
| 619 } | 619 } |
| 620 FOR_EACH_OBSERVER(CompositorObserver, | 620 FOR_EACH_OBSERVER(CompositorObserver, |
| 621 observer_list_, | 621 observer_list_, |
| 622 OnCompositingEnded(this)); | 622 OnCompositingEnded(this)); |
| 623 } | 623 } |
| 624 | 624 |
| 625 } // namespace ui | 625 } // namespace ui |
| OLD | NEW |