| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1619 active_tree_->hud_layer(), | 1619 active_tree_->hud_layer(), |
| 1620 *frame->render_surface_layer_list, | 1620 *frame->render_surface_layer_list, |
| 1621 debug_state_); | 1621 debug_state_); |
| 1622 } | 1622 } |
| 1623 | 1623 |
| 1624 bool is_new_trace; | 1624 bool is_new_trace; |
| 1625 TRACE_EVENT_IS_NEW_TRACE(&is_new_trace); | 1625 TRACE_EVENT_IS_NEW_TRACE(&is_new_trace); |
| 1626 if (is_new_trace) { | 1626 if (is_new_trace) { |
| 1627 if (pending_tree_) { | 1627 if (pending_tree_) { |
| 1628 LayerTreeHostCommon::CallFunctionForEveryLayer( | 1628 LayerTreeHostCommon::CallFunctionForEveryLayer( |
| 1629 pending_tree(), [](LayerImpl* layer) { layer->DidBeginTracing(); }); | 1629 pending_tree(), [](LayerImpl* layer) { layer->DidBeginTracing(); }, |
| 1630 CallFunctionLayerType::ALL_LAYERS); |
| 1630 } | 1631 } |
| 1631 LayerTreeHostCommon::CallFunctionForEveryLayer( | 1632 LayerTreeHostCommon::CallFunctionForEveryLayer( |
| 1632 active_tree(), [](LayerImpl* layer) { layer->DidBeginTracing(); }); | 1633 active_tree(), [](LayerImpl* layer) { layer->DidBeginTracing(); }, |
| 1634 CallFunctionLayerType::ALL_LAYERS); |
| 1633 } | 1635 } |
| 1634 | 1636 |
| 1635 { | 1637 { |
| 1636 TRACE_EVENT0("cc", "DrawLayers.FrameViewerTracing"); | 1638 TRACE_EVENT0("cc", "DrawLayers.FrameViewerTracing"); |
| 1637 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( | 1639 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( |
| 1638 frame_viewer_instrumentation::kCategoryLayerTree, | 1640 frame_viewer_instrumentation::kCategoryLayerTree, |
| 1639 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame)); | 1641 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame)); |
| 1640 } | 1642 } |
| 1641 | 1643 |
| 1642 const DrawMode draw_mode = GetDrawMode(); | 1644 const DrawMode draw_mode = GetDrawMode(); |
| (...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3937 return task_runner_provider_->HasImplThread(); | 3939 return task_runner_provider_->HasImplThread(); |
| 3938 } | 3940 } |
| 3939 | 3941 |
| 3940 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3942 bool LayerTreeHostImpl::CommitToActiveTree() const { |
| 3941 // In single threaded mode we skip the pending tree and commit directly to the | 3943 // In single threaded mode we skip the pending tree and commit directly to the |
| 3942 // active tree. | 3944 // active tree. |
| 3943 return !task_runner_provider_->HasImplThread(); | 3945 return !task_runner_provider_->HasImplThread(); |
| 3944 } | 3946 } |
| 3945 | 3947 |
| 3946 } // namespace cc | 3948 } // namespace cc |
| OLD | NEW |