| 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 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1824 void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) { | 1824 void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) { |
| 1825 current_begin_frame_tracker_.Start(args); | 1825 current_begin_frame_tracker_.Start(args); |
| 1826 | 1826 |
| 1827 if (is_likely_to_require_a_draw_) { | 1827 if (is_likely_to_require_a_draw_) { |
| 1828 // Optimistically schedule a draw. This will let us expect the tile manager | 1828 // Optimistically schedule a draw. This will let us expect the tile manager |
| 1829 // to complete its work so that we can draw new tiles within the impl frame | 1829 // to complete its work so that we can draw new tiles within the impl frame |
| 1830 // we are beginning now. | 1830 // we are beginning now. |
| 1831 SetNeedsRedraw(); | 1831 SetNeedsRedraw(); |
| 1832 } | 1832 } |
| 1833 | 1833 |
| 1834 if (input_handler_client_) |
| 1835 input_handler_client_->DeliverInputForBeginFrame(); |
| 1836 |
| 1834 Animate(); | 1837 Animate(); |
| 1835 | 1838 |
| 1836 for (auto* it : video_frame_controllers_) | 1839 for (auto* it : video_frame_controllers_) |
| 1837 it->OnBeginFrame(args); | 1840 it->OnBeginFrame(args); |
| 1838 } | 1841 } |
| 1839 | 1842 |
| 1840 void LayerTreeHostImpl::DidFinishImplFrame() { | 1843 void LayerTreeHostImpl::DidFinishImplFrame() { |
| 1841 current_begin_frame_tracker_.Finish(); | 1844 current_begin_frame_tracker_.Finish(); |
| 1842 } | 1845 } |
| 1843 | 1846 |
| (...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4097 if (is_visible) { | 4100 if (is_visible) { |
| 4098 worker_context_visibility_ = | 4101 worker_context_visibility_ = |
| 4099 worker_context->CacheController()->ClientBecameVisible(); | 4102 worker_context->CacheController()->ClientBecameVisible(); |
| 4100 } else { | 4103 } else { |
| 4101 worker_context->CacheController()->ClientBecameNotVisible( | 4104 worker_context->CacheController()->ClientBecameNotVisible( |
| 4102 std::move(worker_context_visibility_)); | 4105 std::move(worker_context_visibility_)); |
| 4103 } | 4106 } |
| 4104 } | 4107 } |
| 4105 | 4108 |
| 4106 } // namespace cc | 4109 } // namespace cc |
| OLD | NEW |