Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 522 // the Compositor. | 522 // the Compositor. |
| 523 NOTREACHED(); | 523 NOTREACHED(); |
| 524 } | 524 } |
| 525 | 525 |
| 526 void Compositor::DidCommit() { | 526 void Compositor::DidCommit() { |
| 527 DCHECK(!IsLocked()); | 527 DCHECK(!IsLocked()); |
| 528 for (auto& observer : observer_list_) | 528 for (auto& observer : observer_list_) |
| 529 observer.OnCompositingDidCommit(this); | 529 observer.OnCompositingDidCommit(this); |
| 530 } | 530 } |
| 531 | 531 |
| 532 void Compositor::DidReceiveCompositorFrameAck() { | 532 void Compositor::DidReceiveCompositorFrameAck() {} |
| 533 ++committed_frame_number_; | |
| 534 for (auto& observer : observer_list_) | |
| 535 observer.OnCompositingEnded(this); | |
| 536 } | |
| 537 | 533 |
| 538 void Compositor::DidSubmitCompositorFrame() { | 534 void Compositor::DidSubmitCompositorFrame() { |
| 539 base::TimeTicks start_time = base::TimeTicks::Now(); | 535 base::TimeTicks start_time = base::TimeTicks::Now(); |
| 536 ++committed_frame_number_; | |
|
danakj
2017/03/28 16:04:54
This would change the result of Layer::GetFrameNum
Fady Samuel
2017/03/28 17:35:05
As I said offline, we can undo this change and lan
Alex Z.
2017/03/28 18:08:27
This change has been reverted in the latest patch.
| |
| 540 for (auto& observer : observer_list_) | 537 for (auto& observer : observer_list_) |
| 541 observer.OnCompositingStarted(this, start_time); | 538 observer.OnCompositingStarted(this, start_time); |
| 542 } | 539 } |
| 543 | 540 |
| 544 void Compositor::SetOutputIsSecure(bool output_is_secure) { | 541 void Compositor::SetOutputIsSecure(bool output_is_secure) { |
| 545 if (context_factory_private_) | 542 if (context_factory_private_) |
| 546 context_factory_private_->SetOutputIsSecure(this, output_is_secure); | 543 context_factory_private_->SetOutputIsSecure(this, output_is_secure); |
| 547 } | 544 } |
| 548 | 545 |
| 549 const cc::LayerTreeDebugState& Compositor::GetLayerTreeDebugState() const { | 546 const cc::LayerTreeDebugState& Compositor::GetLayerTreeDebugState() const { |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 576 for (auto& observer : observer_list_) | 573 for (auto& observer : observer_list_) |
| 577 observer.OnCompositingLockStateChanged(this); | 574 observer.OnCompositingLockStateChanged(this); |
| 578 } | 575 } |
| 579 | 576 |
| 580 void Compositor::CancelCompositorLock() { | 577 void Compositor::CancelCompositorLock() { |
| 581 if (compositor_lock_) | 578 if (compositor_lock_) |
| 582 compositor_lock_->CancelLock(); | 579 compositor_lock_->CancelLock(); |
| 583 } | 580 } |
| 584 | 581 |
| 585 } // namespace ui | 582 } // namespace ui |
| OLD | NEW |