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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 TRACE_EVENT_INSTANT1("cc.debug", "Frame", TRACE_EVENT_SCOPE_THREAD, | 990 TRACE_EVENT_INSTANT1("cc.debug", "Frame", TRACE_EVENT_SCOPE_THREAD, |
991 "frame", ValueToString(FrameStateAsValue())); | 991 "frame", ValueToString(FrameStateAsValue())); |
992 } | 992 } |
993 | 993 |
994 // Because the contents of the HUD depend on everything else in the frame, the | 994 // Because the contents of the HUD depend on everything else in the frame, the |
995 // contents of its texture are updated as the last thing before the frame is | 995 // contents of its texture are updated as the last thing before the frame is |
996 // drawn. | 996 // drawn. |
997 if (active_tree_->hud_layer()) | 997 if (active_tree_->hud_layer()) |
998 active_tree_->hud_layer()->UpdateHudTexture(resource_provider_.get()); | 998 active_tree_->hud_layer()->UpdateHudTexture(resource_provider_.get()); |
999 | 999 |
1000 renderer_->DrawFrame(frame->render_passes); | 1000 renderer_->DrawFrame(&frame->render_passes); |
1001 // The render passes should be consumed by the renderer. | 1001 // The render passes should be consumed by the renderer. |
1002 DCHECK(frame->render_passes.empty()); | 1002 DCHECK(frame->render_passes.empty()); |
1003 frame->render_passes_by_id.clear(); | 1003 frame->render_passes_by_id.clear(); |
1004 | 1004 |
1005 // The next frame should start by assuming nothing has changed, and changes | 1005 // The next frame should start by assuming nothing has changed, and changes |
1006 // are noted as they occur. | 1006 // are noted as they occur. |
1007 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { | 1007 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { |
1008 (*frame->render_surface_layer_list)[i]->render_surface()->damage_tracker()-> | 1008 (*frame->render_surface_layer_list)[i]->render_surface()->damage_tracker()-> |
1009 DidDrawDamagedArea(); | 1009 DidDrawDamagedArea(); |
1010 } | 1010 } |
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2028 } | 2028 } |
2029 | 2029 |
2030 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { | 2030 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { |
2031 if (debug_state_.continuous_painting != debug_state.continuous_painting) | 2031 if (debug_state_.continuous_painting != debug_state.continuous_painting) |
2032 paint_time_counter_->ClearHistory(); | 2032 paint_time_counter_->ClearHistory(); |
2033 | 2033 |
2034 debug_state_ = debug_state; | 2034 debug_state_ = debug_state; |
2035 } | 2035 } |
2036 | 2036 |
2037 } // namespace cc | 2037 } // namespace cc |
OLD | NEW |