| 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 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 | 1700 |
| 1701 // Collect all resource ids in the render passes into a single array. | 1701 // Collect all resource ids in the render passes into a single array. |
| 1702 ResourceProvider::ResourceIdArray resources; | 1702 ResourceProvider::ResourceIdArray resources; |
| 1703 for (const auto& render_pass : frame->render_passes) { | 1703 for (const auto& render_pass : frame->render_passes) { |
| 1704 for (auto* quad : render_pass->quad_list) { | 1704 for (auto* quad : render_pass->quad_list) { |
| 1705 for (ResourceId resource_id : quad->resources) | 1705 for (ResourceId resource_id : quad->resources) |
| 1706 resources.push_back(resource_id); | 1706 resources.push_back(resource_id); |
| 1707 } | 1707 } |
| 1708 } | 1708 } |
| 1709 | 1709 |
| 1710 DCHECK_LE(BeginFrameArgs::kStartingFrameNumber, |
| 1711 frame->begin_frame_ack.sequence_number); |
| 1712 metadata.begin_frame_ack = frame->begin_frame_ack; |
| 1713 |
| 1710 CompositorFrame compositor_frame; | 1714 CompositorFrame compositor_frame; |
| 1711 compositor_frame.metadata = std::move(metadata); | 1715 compositor_frame.metadata = std::move(metadata); |
| 1712 resource_provider_->PrepareSendToParent(resources, | 1716 resource_provider_->PrepareSendToParent(resources, |
| 1713 &compositor_frame.resource_list); | 1717 &compositor_frame.resource_list); |
| 1714 compositor_frame.render_pass_list = std::move(frame->render_passes); | 1718 compositor_frame.render_pass_list = std::move(frame->render_passes); |
| 1715 compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame)); | 1719 compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame)); |
| 1716 | 1720 |
| 1717 // Clears the list of swap promises after calling DidSwap on each of them to | 1721 // Clears the list of swap promises after calling DidSwap on each of them to |
| 1718 // signal that the swap is over. | 1722 // signal that the swap is over. |
| 1719 active_tree()->ClearSwapPromises(); | 1723 active_tree()->ClearSwapPromises(); |
| (...skipping 2440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4160 worker_context_visibility_ = | 4164 worker_context_visibility_ = |
| 4161 worker_context->CacheController()->ClientBecameVisible(); | 4165 worker_context->CacheController()->ClientBecameVisible(); |
| 4162 } else { | 4166 } else { |
| 4163 worker_context->CacheController()->ClientBecameNotVisible( | 4167 worker_context->CacheController()->ClientBecameNotVisible( |
| 4164 std::move(worker_context_visibility_)); | 4168 std::move(worker_context_visibility_)); |
| 4165 } | 4169 } |
| 4166 } | 4170 } |
| 4167 } | 4171 } |
| 4168 | 4172 |
| 4169 } // namespace cc | 4173 } // namespace cc |
| OLD | NEW |