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 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 | 1172 |
1173 static void LayerTreeHostImplDidBeginTracingCallback(LayerImpl* layer) { | 1173 static void LayerTreeHostImplDidBeginTracingCallback(LayerImpl* layer) { |
1174 layer->DidBeginTracing(); | 1174 layer->DidBeginTracing(); |
1175 } | 1175 } |
1176 | 1176 |
1177 void LayerTreeHostImpl::DrawLayers(FrameData* frame, | 1177 void LayerTreeHostImpl::DrawLayers(FrameData* frame, |
1178 base::TimeTicks frame_begin_time) { | 1178 base::TimeTicks frame_begin_time) { |
1179 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers"); | 1179 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers"); |
1180 DCHECK(CanDraw()); | 1180 DCHECK(CanDraw()); |
1181 | 1181 |
1182 if (frame->has_no_damage) | 1182 if (frame->has_no_damage) { |
| 1183 TRACE_EVENT0("cc", "EarlyOut_NoDamage"); |
1183 return; | 1184 return; |
| 1185 } |
1184 | 1186 |
1185 DCHECK(!frame->render_passes.empty()); | 1187 DCHECK(!frame->render_passes.empty()); |
1186 | 1188 |
1187 fps_counter_->SaveTimeStamp(frame_begin_time); | 1189 fps_counter_->SaveTimeStamp(frame_begin_time); |
1188 | 1190 |
1189 rendering_stats_instrumentation_->SetScreenFrameCount( | 1191 rendering_stats_instrumentation_->SetScreenFrameCount( |
1190 fps_counter_->current_frame_number()); | 1192 fps_counter_->current_frame_number()); |
1191 rendering_stats_instrumentation_->SetDroppedFrameCount( | 1193 rendering_stats_instrumentation_->SetDroppedFrameCount( |
1192 fps_counter_->dropped_frame_count()); | 1194 fps_counter_->dropped_frame_count()); |
1193 | 1195 |
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2396 if (LayerTreeDebugState::Equal(debug_state_, new_debug_state)) | 2398 if (LayerTreeDebugState::Equal(debug_state_, new_debug_state)) |
2397 return; | 2399 return; |
2398 if (debug_state_.continuous_painting != new_debug_state.continuous_painting) | 2400 if (debug_state_.continuous_painting != new_debug_state.continuous_painting) |
2399 paint_time_counter_->ClearHistory(); | 2401 paint_time_counter_->ClearHistory(); |
2400 | 2402 |
2401 debug_state_ = new_debug_state; | 2403 debug_state_ = new_debug_state; |
2402 SetFullRootLayerDamage(); | 2404 SetFullRootLayerDamage(); |
2403 } | 2405 } |
2404 | 2406 |
2405 } // namespace cc | 2407 } // namespace cc |
OLD | NEW |