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/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 | 1165 |
1166 static void LayerTreeHostImplDidBeginTracingCallback(LayerImpl* layer) { | 1166 static void LayerTreeHostImplDidBeginTracingCallback(LayerImpl* layer) { |
1167 layer->DidBeginTracing(); | 1167 layer->DidBeginTracing(); |
1168 } | 1168 } |
1169 | 1169 |
1170 void LayerTreeHostImpl::DrawLayers(FrameData* frame, | 1170 void LayerTreeHostImpl::DrawLayers(FrameData* frame, |
1171 base::TimeTicks frame_begin_time) { | 1171 base::TimeTicks frame_begin_time) { |
1172 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers"); | 1172 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers"); |
1173 DCHECK(CanDraw()); | 1173 DCHECK(CanDraw()); |
1174 | 1174 |
1175 if (frame->has_no_damage) | 1175 if (frame->has_no_damage) { |
| 1176 TRACE_EVENT0("cc", "EarlyOut_NoDamage"); |
1176 return; | 1177 return; |
| 1178 } |
1177 | 1179 |
1178 DCHECK(!frame->render_passes.empty()); | 1180 DCHECK(!frame->render_passes.empty()); |
1179 | 1181 |
1180 fps_counter_->SaveTimeStamp(frame_begin_time); | 1182 fps_counter_->SaveTimeStamp(frame_begin_time); |
1181 | 1183 |
1182 rendering_stats_instrumentation_->SetScreenFrameCount( | 1184 rendering_stats_instrumentation_->SetScreenFrameCount( |
1183 fps_counter_->current_frame_number()); | 1185 fps_counter_->current_frame_number()); |
1184 rendering_stats_instrumentation_->SetDroppedFrameCount( | 1186 rendering_stats_instrumentation_->SetDroppedFrameCount( |
1185 fps_counter_->dropped_frame_count()); | 1187 fps_counter_->dropped_frame_count()); |
1186 | 1188 |
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2410 if (LayerTreeDebugState::Equal(debug_state_, new_debug_state)) | 2412 if (LayerTreeDebugState::Equal(debug_state_, new_debug_state)) |
2411 return; | 2413 return; |
2412 if (debug_state_.continuous_painting != new_debug_state.continuous_painting) | 2414 if (debug_state_.continuous_painting != new_debug_state.continuous_painting) |
2413 paint_time_counter_->ClearHistory(); | 2415 paint_time_counter_->ClearHistory(); |
2414 | 2416 |
2415 debug_state_ = new_debug_state; | 2417 debug_state_ = new_debug_state; |
2416 SetFullRootLayerDamage(); | 2418 SetFullRootLayerDamage(); |
2417 } | 2419 } |
2418 | 2420 |
2419 } // namespace cc | 2421 } // namespace cc |
OLD | NEW |