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