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/thread_proxy.h" | 5 #include "cc/trees/thread_proxy.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/debug/synthetic_delay.h" |
11 #include "base/debug/trace_event.h" | 12 #include "base/debug/trace_event.h" |
12 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
13 #include "cc/debug/benchmark_instrumentation.h" | 14 #include "cc/debug/benchmark_instrumentation.h" |
14 #include "cc/input/input_handler.h" | 15 #include "cc/input/input_handler.h" |
15 #include "cc/output/context_provider.h" | 16 #include "cc/output/context_provider.h" |
16 #include "cc/output/output_surface.h" | 17 #include "cc/output/output_surface.h" |
17 #include "cc/quads/draw_quad.h" | 18 #include "cc/quads/draw_quad.h" |
18 #include "cc/resources/prioritized_resource_manager.h" | 19 #include "cc/resources/prioritized_resource_manager.h" |
19 #include "cc/scheduler/delay_based_time_source.h" | 20 #include "cc/scheduler/delay_based_time_source.h" |
20 #include "cc/scheduler/frame_rate_controller.h" | 21 #include "cc/scheduler/frame_rate_controller.h" |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 Proxy::MainThreadTaskRunner()->PostTask( | 1020 Proxy::MainThreadTaskRunner()->PostTask( |
1020 FROM_HERE, | 1021 FROM_HERE, |
1021 base::Bind(&ThreadProxy::CreateAndInitializeOutputSurface, | 1022 base::Bind(&ThreadProxy::CreateAndInitializeOutputSurface, |
1022 main_thread_weak_ptr_)); | 1023 main_thread_weak_ptr_)); |
1023 } | 1024 } |
1024 | 1025 |
1025 DrawSwapReadbackResult ThreadProxy::DrawSwapReadbackInternal( | 1026 DrawSwapReadbackResult ThreadProxy::DrawSwapReadbackInternal( |
1026 bool forced_draw, | 1027 bool forced_draw, |
1027 bool swap_requested, | 1028 bool swap_requested, |
1028 bool readback_requested) { | 1029 bool readback_requested) { |
| 1030 SYNTHETIC_DELAY("cc.draw_and_swap"); |
1029 DrawSwapReadbackResult result; | 1031 DrawSwapReadbackResult result; |
1030 result.did_draw = false; | 1032 result.did_draw = false; |
1031 result.did_swap = false; | 1033 result.did_swap = false; |
1032 result.did_readback = false; | 1034 result.did_readback = false; |
1033 DCHECK(IsImplThread()); | 1035 DCHECK(IsImplThread()); |
1034 DCHECK(layer_tree_host_impl_.get()); | 1036 DCHECK(layer_tree_host_impl_.get()); |
1035 if (!layer_tree_host_impl_) | 1037 if (!layer_tree_host_impl_) |
1036 return result; | 1038 return result; |
1037 | 1039 |
1038 DCHECK(layer_tree_host_impl_->renderer()); | 1040 DCHECK(layer_tree_host_impl_->renderer()); |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1585 completion_event_for_commit_held_on_tree_activation_ = NULL; | 1587 completion_event_for_commit_held_on_tree_activation_ = NULL; |
1586 } | 1588 } |
1587 | 1589 |
1588 UpdateBackgroundAnimateTicking(); | 1590 UpdateBackgroundAnimateTicking(); |
1589 | 1591 |
1590 commit_to_activate_duration_history_.InsertSample( | 1592 commit_to_activate_duration_history_.InsertSample( |
1591 base::TimeTicks::HighResNow() - commit_complete_time_); | 1593 base::TimeTicks::HighResNow() - commit_complete_time_); |
1592 } | 1594 } |
1593 | 1595 |
1594 } // namespace cc | 1596 } // namespace cc |
OLD | NEW |