| 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 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1662 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame)); | 1662 "cc::LayerTreeHostImpl", id_, AsValueWithFrame(frame)); |
| 1663 } | 1663 } |
| 1664 | 1664 |
| 1665 const DrawMode draw_mode = GetDrawMode(); | 1665 const DrawMode draw_mode = GetDrawMode(); |
| 1666 | 1666 |
| 1667 // Because the contents of the HUD depend on everything else in the frame, the | 1667 // Because the contents of the HUD depend on everything else in the frame, the |
| 1668 // contents of its texture are updated as the last thing before the frame is | 1668 // contents of its texture are updated as the last thing before the frame is |
| 1669 // drawn. | 1669 // drawn. |
| 1670 if (active_tree_->hud_layer()) { | 1670 if (active_tree_->hud_layer()) { |
| 1671 TRACE_EVENT0("cc", "DrawLayers.UpdateHudTexture"); | 1671 TRACE_EVENT0("cc", "DrawLayers.UpdateHudTexture"); |
| 1672 active_tree_->hud_layer()->UpdateHudTexture(draw_mode, | 1672 active_tree_->hud_layer()->UpdateHudTexture( |
| 1673 resource_provider_.get()); | 1673 draw_mode, resource_provider_.get(), |
| 1674 compositor_frame_sink_->context_provider()); |
| 1674 } | 1675 } |
| 1675 | 1676 |
| 1676 CompositorFrameMetadata metadata = MakeCompositorFrameMetadata(); | 1677 CompositorFrameMetadata metadata = MakeCompositorFrameMetadata(); |
| 1677 metadata.may_contain_video = frame->may_contain_video; | 1678 metadata.may_contain_video = frame->may_contain_video; |
| 1678 active_tree()->FinishSwapPromises(&metadata); | 1679 active_tree()->FinishSwapPromises(&metadata); |
| 1679 for (auto& latency : metadata.latency_info) { | 1680 for (auto& latency : metadata.latency_info) { |
| 1680 TRACE_EVENT_WITH_FLOW1("input,benchmark", "LatencyInfo.Flow", | 1681 TRACE_EVENT_WITH_FLOW1("input,benchmark", "LatencyInfo.Flow", |
| 1681 TRACE_ID_DONT_MANGLE(latency.trace_id()), | 1682 TRACE_ID_DONT_MANGLE(latency.trace_id()), |
| 1682 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, | 1683 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, |
| 1683 "step", "SwapBuffers"); | 1684 "step", "SwapBuffers"); |
| (...skipping 2591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4275 worker_context_visibility_ = | 4276 worker_context_visibility_ = |
| 4276 worker_context->CacheController()->ClientBecameVisible(); | 4277 worker_context->CacheController()->ClientBecameVisible(); |
| 4277 } else { | 4278 } else { |
| 4278 worker_context->CacheController()->ClientBecameNotVisible( | 4279 worker_context->CacheController()->ClientBecameNotVisible( |
| 4279 std::move(worker_context_visibility_)); | 4280 std::move(worker_context_visibility_)); |
| 4280 } | 4281 } |
| 4281 } | 4282 } |
| 4282 } | 4283 } |
| 4283 | 4284 |
| 4284 } // namespace cc | 4285 } // namespace cc |
| OLD | NEW |