| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/trees/single_thread_proxy.h" | 5 #include "cc/trees/single_thread_proxy.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
| 10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 | 485 |
| 486 if (layer_tree_host_->output_surface_lost()) { | 486 if (layer_tree_host_->output_surface_lost()) { |
| 487 RequestNewOutputSurface(); | 487 RequestNewOutputSurface(); |
| 488 // RequestNewOutputSurface could have synchronously created an output | 488 // RequestNewOutputSurface could have synchronously created an output |
| 489 // surface, so check again before returning. | 489 // surface, so check again before returning. |
| 490 if (layer_tree_host_->output_surface_lost()) | 490 if (layer_tree_host_->output_surface_lost()) |
| 491 return; | 491 return; |
| 492 } | 492 } |
| 493 | 493 |
| 494 { | 494 { |
| 495 BeginFrameArgs begin_frame_args( | 495 BeginFrameArgs begin_frame_args(BeginFrameArgs::Create( |
| 496 BeginFrameArgs::Create(frame_begin_time, | 496 frame_begin_time, base::TimeTicks(), BeginFrameArgs::DefaultInterval(), |
| 497 base::TimeTicks(), | 497 BeginFrameArgs::SYNCHRONOUS)); |
| 498 BeginFrameArgs::DefaultInterval())); | |
| 499 DoBeginMainFrame(begin_frame_args); | 498 DoBeginMainFrame(begin_frame_args); |
| 500 DoCommit(); | 499 DoCommit(); |
| 501 | 500 |
| 502 DCHECK_EQ(0u, layer_tree_host_->num_queued_swap_promises()) | 501 DCHECK_EQ(0u, layer_tree_host_->num_queued_swap_promises()) |
| 503 << "Commit should always succeed and transfer promises."; | 502 << "Commit should always succeed and transfer promises."; |
| 504 } | 503 } |
| 505 | 504 |
| 506 { | 505 { |
| 507 DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this)); | 506 DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this)); |
| 508 if (layer_tree_host_impl_->settings().impl_side_painting) { | 507 if (layer_tree_host_impl_->settings().impl_side_painting) { |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 | 785 |
| 787 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { | 786 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { |
| 788 return timing_history_.CommitToActivateDurationEstimate(); | 787 return timing_history_.CommitToActivateDurationEstimate(); |
| 789 } | 788 } |
| 790 | 789 |
| 791 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 790 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
| 792 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 791 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
| 793 } | 792 } |
| 794 | 793 |
| 795 } // namespace cc | 794 } // namespace cc |
| OLD | NEW |