| 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 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1698 | 1698 |
| 1699 // Collect all resource ids in the render passes into a single array. | 1699 // Collect all resource ids in the render passes into a single array. |
| 1700 ResourceProvider::ResourceIdArray resources; | 1700 ResourceProvider::ResourceIdArray resources; |
| 1701 for (const auto& render_pass : frame->render_passes) { | 1701 for (const auto& render_pass : frame->render_passes) { |
| 1702 for (auto* quad : render_pass->quad_list) { | 1702 for (auto* quad : render_pass->quad_list) { |
| 1703 for (ResourceId resource_id : quad->resources) | 1703 for (ResourceId resource_id : quad->resources) |
| 1704 resources.push_back(resource_id); | 1704 resources.push_back(resource_id); |
| 1705 } | 1705 } |
| 1706 } | 1706 } |
| 1707 | 1707 |
| 1708 DCHECK_LE(BeginFrameArgs::kStartingFrameNumber, |
| 1709 frame->begin_frame_ack.sequence_number); |
| 1710 metadata.begin_frame_ack = frame->begin_frame_ack; |
| 1711 |
| 1708 CompositorFrame compositor_frame; | 1712 CompositorFrame compositor_frame; |
| 1709 compositor_frame.metadata = std::move(metadata); | 1713 compositor_frame.metadata = std::move(metadata); |
| 1710 resource_provider_->PrepareSendToParent(resources, | 1714 resource_provider_->PrepareSendToParent(resources, |
| 1711 &compositor_frame.resource_list); | 1715 &compositor_frame.resource_list); |
| 1712 compositor_frame.render_pass_list = std::move(frame->render_passes); | 1716 compositor_frame.render_pass_list = std::move(frame->render_passes); |
| 1713 compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame)); | 1717 compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame)); |
| 1714 | 1718 |
| 1715 // Clears the list of swap promises after calling DidSwap on each of them to | 1719 // Clears the list of swap promises after calling DidSwap on each of them to |
| 1716 // signal that the swap is over. | 1720 // signal that the swap is over. |
| 1717 active_tree()->ClearSwapPromises(); | 1721 active_tree()->ClearSwapPromises(); |
| (...skipping 2422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4140 worker_context_visibility_ = | 4144 worker_context_visibility_ = |
| 4141 worker_context->CacheController()->ClientBecameVisible(); | 4145 worker_context->CacheController()->ClientBecameVisible(); |
| 4142 } else { | 4146 } else { |
| 4143 worker_context->CacheController()->ClientBecameNotVisible( | 4147 worker_context->CacheController()->ClientBecameNotVisible( |
| 4144 std::move(worker_context_visibility_)); | 4148 std::move(worker_context_visibility_)); |
| 4145 } | 4149 } |
| 4146 } | 4150 } |
| 4147 } | 4151 } |
| 4148 | 4152 |
| 4149 } // namespace cc | 4153 } // namespace cc |
| OLD | NEW |