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

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

Issue 2778223005: Plumb activation time to main (Closed)
Patch Set: update test; remove test-only method in proxy_main Created 3 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
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 <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 void ProxyImpl::OnCanDrawStateChanged(bool can_draw) { 313 void ProxyImpl::OnCanDrawStateChanged(bool can_draw) {
314 TRACE_EVENT1("cc", "ProxyImpl::OnCanDrawStateChanged", "can_draw", can_draw); 314 TRACE_EVENT1("cc", "ProxyImpl::OnCanDrawStateChanged", "can_draw", can_draw);
315 DCHECK(IsImplThread()); 315 DCHECK(IsImplThread());
316 scheduler_->SetCanDraw(can_draw); 316 scheduler_->SetCanDraw(can_draw);
317 } 317 }
318 318
319 void ProxyImpl::NotifyReadyToActivate() { 319 void ProxyImpl::NotifyReadyToActivate() {
320 TRACE_EVENT0("cc", "ProxyImpl::NotifyReadyToActivate"); 320 TRACE_EVENT0("cc", "ProxyImpl::NotifyReadyToActivate");
321 DCHECK(IsImplThread()); 321 DCHECK(IsImplThread());
322 scheduler_->NotifyReadyToActivate(); 322 scheduler_->NotifyReadyToActivate(
323 layer_tree_host_impl_->pending_tree()
324 ? layer_tree_host_impl_->pending_tree()->source_frame_number()
325 : 0);
323 } 326 }
324 327
325 void ProxyImpl::NotifyReadyToDraw() { 328 void ProxyImpl::NotifyReadyToDraw() {
326 TRACE_EVENT0("cc", "ProxyImpl::NotifyReadyToDraw"); 329 TRACE_EVENT0("cc", "ProxyImpl::NotifyReadyToDraw");
327 DCHECK(IsImplThread()); 330 DCHECK(IsImplThread());
328 scheduler_->NotifyReadyToDraw(); 331 scheduler_->NotifyReadyToDraw();
329 } 332 }
330 333
331 void ProxyImpl::SetNeedsRedrawOnImplThread() { 334 void ProxyImpl::SetNeedsRedrawOnImplThread() {
332 TRACE_EVENT0("cc", "ProxyImpl::SetNeedsRedrawOnImplThread"); 335 TRACE_EVENT0("cc", "ProxyImpl::SetNeedsRedrawOnImplThread");
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 679 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
677 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 680 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
678 return main_thread_blocked_commit_vars_unsafe_; 681 return main_thread_blocked_commit_vars_unsafe_;
679 } 682 }
680 683
681 base::SingleThreadTaskRunner* ProxyImpl::MainThreadTaskRunner() { 684 base::SingleThreadTaskRunner* ProxyImpl::MainThreadTaskRunner() {
682 return task_runner_provider_->MainThreadTaskRunner(); 685 return task_runner_provider_->MainThreadTaskRunner();
683 } 686 }
684 687
685 } // namespace cc 688 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698