Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2429953002: Implement compositor thread VSync aligned event queue (Closed)
Patch Set: dtapuska's review: Non-template CompositorThreadEventQueue; Added blink_features.h; UMA only when e… Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698