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

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

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Display member destruction order Created 4 years, 8 months 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
« no previous file with comments | « cc/trees/proxy_impl.h ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/proxy_impl.h" 5 #include "cc/trees/proxy_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 if (!synthetic_begin_frame_source_) 296 if (!synthetic_begin_frame_source_)
297 return; 297 return;
298 298
299 if (interval == base::TimeDelta()) { 299 if (interval == base::TimeDelta()) {
300 // TODO(brianderson): We should not be receiving 0 intervals. 300 // TODO(brianderson): We should not be receiving 0 intervals.
301 interval = BeginFrameArgs::DefaultInterval(); 301 interval = BeginFrameArgs::DefaultInterval();
302 } 302 }
303 synthetic_begin_frame_source_->OnUpdateVSyncParameters(timebase, interval); 303 synthetic_begin_frame_source_->OnUpdateVSyncParameters(timebase, interval);
304 } 304 }
305 305
306 void ProxyImpl::SetBeginFrameSource(BeginFrameSource* source) {
307 // TODO(enne): this overrides any preexisting begin frame source. Those
308 // other sources will eventually be removed and this will be the only path.
309 scheduler_->SetBeginFrameSource(source);
310 }
311
306 void ProxyImpl::SetEstimatedParentDrawTime(base::TimeDelta draw_time) { 312 void ProxyImpl::SetEstimatedParentDrawTime(base::TimeDelta draw_time) {
307 DCHECK(IsImplThread()); 313 DCHECK(IsImplThread());
308 scheduler_->SetEstimatedParentDrawTime(draw_time); 314 scheduler_->SetEstimatedParentDrawTime(draw_time);
309 } 315 }
310 316
311 void ProxyImpl::DidSwapBuffersOnImplThread() { 317 void ProxyImpl::DidSwapBuffersOnImplThread() {
312 DCHECK(IsImplThread()); 318 DCHECK(IsImplThread());
313 scheduler_->DidSwapBuffers(); 319 scheduler_->DidSwapBuffers();
314 } 320 }
315 321
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 bool ProxyImpl::IsMainThreadBlocked() const { 690 bool ProxyImpl::IsMainThreadBlocked() const {
685 return task_runner_provider_->IsMainThreadBlocked(); 691 return task_runner_provider_->IsMainThreadBlocked();
686 } 692 }
687 693
688 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 694 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
689 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 695 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
690 return main_thread_blocked_commit_vars_unsafe_; 696 return main_thread_blocked_commit_vars_unsafe_;
691 } 697 }
692 698
693 } // namespace cc 699 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_impl.h ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698