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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
507 void Compositor::Layout() { | 507 void Compositor::Layout() { |
508 // We're sending damage that will be addressed during this composite | 508 // We're sending damage that will be addressed during this composite |
509 // cycle, so we don't need to schedule another composite to address it. | 509 // cycle, so we don't need to schedule another composite to address it. |
510 disable_schedule_composite_ = true; | 510 disable_schedule_composite_ = true; |
511 if (root_layer_) | 511 if (root_layer_) |
512 root_layer_->SendDamagedRects(); | 512 root_layer_->SendDamagedRects(); |
513 disable_schedule_composite_ = false; | 513 disable_schedule_composite_ = false; |
514 } | 514 } |
515 | 515 |
516 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface(bool fallback) { | 516 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface(bool fallback) { |
517 // Chrome OS doesn't support falling back to software. | |
518 #if defined(OS_CHROMEOS) | |
danakj
2014/01/06 19:33:06
Can we keep the #ifdefs out of ui::Compositor and
ccameron
2014/01/06 19:47:02
Sure -- done!
| |
519 fallback = false; | |
520 #endif | |
517 return ContextFactory::GetInstance()->CreateOutputSurface(this, fallback); | 521 return ContextFactory::GetInstance()->CreateOutputSurface(this, fallback); |
518 } | 522 } |
519 | 523 |
520 void Compositor::DidCommit() { | 524 void Compositor::DidCommit() { |
521 DCHECK(!IsLocked()); | 525 DCHECK(!IsLocked()); |
522 FOR_EACH_OBSERVER(CompositorObserver, | 526 FOR_EACH_OBSERVER(CompositorObserver, |
523 observer_list_, | 527 observer_list_, |
524 OnCompositingDidCommit(this)); | 528 OnCompositingDidCommit(this)); |
525 } | 529 } |
526 | 530 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
625 // CompositorObservers to be notified before starting another | 629 // CompositorObservers to be notified before starting another |
626 // draw cycle. | 630 // draw cycle. |
627 ScheduleDraw(); | 631 ScheduleDraw(); |
628 } | 632 } |
629 FOR_EACH_OBSERVER(CompositorObserver, | 633 FOR_EACH_OBSERVER(CompositorObserver, |
630 observer_list_, | 634 observer_list_, |
631 OnCompositingEnded(this)); | 635 OnCompositingEnded(this)); |
632 } | 636 } |
633 | 637 |
634 } // namespace ui | 638 } // namespace ui |
OLD | NEW |