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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(BeginFrameArgs::Create( | 495 BeginFrameArgs begin_frame_args(BeginFrameArgs::Create( |
496 frame_begin_time, base::TimeTicks(), BeginFrameArgs::DefaultInterval(), | 496 BEGINFRAME_FROM_HERE, frame_begin_time, base::TimeTicks(), |
497 BeginFrameArgs::SYNCHRONOUS)); | 497 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::SYNCHRONOUS)); |
498 DoBeginMainFrame(begin_frame_args); | 498 DoBeginMainFrame(begin_frame_args); |
499 DoCommit(); | 499 DoCommit(); |
500 | 500 |
501 DCHECK_EQ(0u, layer_tree_host_->num_queued_swap_promises()) | 501 DCHECK_EQ(0u, layer_tree_host_->num_queued_swap_promises()) |
502 << "Commit should always succeed and transfer promises."; | 502 << "Commit should always succeed and transfer promises."; |
503 } | 503 } |
504 | 504 |
505 { | 505 { |
506 DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this)); | 506 DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this)); |
507 if (layer_tree_host_impl_->settings().impl_side_painting) { | 507 if (layer_tree_host_impl_->settings().impl_side_painting) { |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 | 795 |
796 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 796 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
797 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 797 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
798 } | 798 } |
799 | 799 |
800 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 800 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
801 layer_tree_host_->SendBeginFramesToChildren(args); | 801 layer_tree_host_->SendBeginFramesToChildren(args); |
802 } | 802 } |
803 | 803 |
804 } // namespace cc | 804 } // namespace cc |
OLD | NEW |