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

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: Use TickClock; Remove compositor_event_queue_enabled_; Nits 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 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1821 void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) { 1821 void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) {
1822 current_begin_frame_tracker_.Start(args); 1822 current_begin_frame_tracker_.Start(args);
1823 1823
1824 if (is_likely_to_require_a_draw_) { 1824 if (is_likely_to_require_a_draw_) {
1825 // Optimistically schedule a draw. This will let us expect the tile manager 1825 // Optimistically schedule a draw. This will let us expect the tile manager
1826 // to complete its work so that we can draw new tiles within the impl frame 1826 // to complete its work so that we can draw new tiles within the impl frame
1827 // we are beginning now. 1827 // we are beginning now.
1828 SetNeedsRedraw(); 1828 SetNeedsRedraw();
1829 } 1829 }
1830 1830
1831 if (input_handler_client_)
1832 input_handler_client_->DeliverInputForBeginFrame();
1833
1831 Animate(); 1834 Animate();
1832 1835
1833 for (auto* it : video_frame_controllers_) 1836 for (auto* it : video_frame_controllers_)
1834 it->OnBeginFrame(args); 1837 it->OnBeginFrame(args);
1835 } 1838 }
1836 1839
1837 void LayerTreeHostImpl::DidFinishImplFrame() { 1840 void LayerTreeHostImpl::DidFinishImplFrame() {
1838 current_begin_frame_tracker_.Finish(); 1841 current_begin_frame_tracker_.Finish();
1839 } 1842 }
1840 1843
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after
4084 if (is_visible) { 4087 if (is_visible) {
4085 worker_context_visibility_ = 4088 worker_context_visibility_ =
4086 worker_context->CacheController()->ClientBecameVisible(); 4089 worker_context->CacheController()->ClientBecameVisible();
4087 } else { 4090 } else {
4088 worker_context->CacheController()->ClientBecameNotVisible( 4091 worker_context->CacheController()->ClientBecameNotVisible(
4089 std::move(worker_context_visibility_)); 4092 std::move(worker_context_visibility_));
4090 } 4093 }
4091 } 4094 }
4092 4095
4093 } // namespace cc 4096 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698