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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1659 } | 1659 } |
1660 | 1660 |
1661 | 1661 |
1662 CompositorFrame compositor_frame; | 1662 CompositorFrame compositor_frame; |
1663 compositor_frame.metadata = std::move(metadata); | 1663 compositor_frame.metadata = std::move(metadata); |
1664 resource_provider_->PrepareSendToParent(resources, | 1664 resource_provider_->PrepareSendToParent(resources, |
1665 &compositor_frame.resource_list); | 1665 &compositor_frame.resource_list); |
1666 compositor_frame.render_pass_list = std::move(frame->render_passes); | 1666 compositor_frame.render_pass_list = std::move(frame->render_passes); |
1667 compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame)); | 1667 compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame)); |
1668 | 1668 |
| 1669 // Clears the list of swap promises after calling DidSwap on each of them to |
| 1670 // signal that the swap is over. |
| 1671 active_tree()->ClearSwapPromises(); |
| 1672 |
1669 // The next frame should start by assuming nothing has changed, and changes | 1673 // The next frame should start by assuming nothing has changed, and changes |
1670 // are noted as they occur. | 1674 // are noted as they occur. |
1671 // TODO(boliu): If we did a temporary software renderer frame, propogate the | 1675 // TODO(boliu): If we did a temporary software renderer frame, propogate the |
1672 // damage forward to the next frame. | 1676 // damage forward to the next frame. |
1673 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { | 1677 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { |
1674 auto* surface = (*frame->render_surface_layer_list)[i]->render_surface(); | 1678 auto* surface = (*frame->render_surface_layer_list)[i]->render_surface(); |
1675 surface->damage_tracker()->DidDrawDamagedArea(); | 1679 surface->damage_tracker()->DidDrawDamagedArea(); |
1676 } | 1680 } |
1677 active_tree_->ResetAllChangeTracking(); | 1681 active_tree_->ResetAllChangeTracking(); |
1678 | 1682 |
(...skipping 2405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4084 worker_context_visibility_ = | 4088 worker_context_visibility_ = |
4085 worker_context->CacheController()->ClientBecameVisible(); | 4089 worker_context->CacheController()->ClientBecameVisible(); |
4086 } else { | 4090 } else { |
4087 worker_context->CacheController()->ClientBecameNotVisible( | 4091 worker_context->CacheController()->ClientBecameNotVisible( |
4088 std::move(worker_context_visibility_)); | 4092 std::move(worker_context_visibility_)); |
4089 } | 4093 } |
4090 } | 4094 } |
4091 } | 4095 } |
4092 | 4096 |
4093 } // namespace cc | 4097 } // namespace cc |
OLD | NEW |