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

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

Issue 1432463002: cc: Track BeginMainFrame more precisely in CompositorTimingHistory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests. New tests to be added. Created 5 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
« cc/scheduler/scheduler.h ('K') | « cc/trees/threaded_channel.h ('k') | no next file » | 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/threaded_channel.h" 5 #include "cc/trees/threaded_channel.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 FROM_HERE, base::Bind(&ProxyImpl::FinishAllRenderingOnImpl, 73 FROM_HERE, base::Bind(&ProxyImpl::FinishAllRenderingOnImpl,
74 proxy_impl_->GetImplWeakPtr(), completion)); 74 proxy_impl_->GetImplWeakPtr(), completion));
75 } 75 }
76 76
77 void ThreadedChannel::SetNeedsCommitOnImpl() { 77 void ThreadedChannel::SetNeedsCommitOnImpl() {
78 ImplThreadTaskRunner()->PostTask(FROM_HERE, 78 ImplThreadTaskRunner()->PostTask(FROM_HERE,
79 base::Bind(&ProxyImpl::SetNeedsCommitOnImpl, 79 base::Bind(&ProxyImpl::SetNeedsCommitOnImpl,
80 proxy_impl_->GetImplWeakPtr())); 80 proxy_impl_->GetImplWeakPtr()));
81 } 81 }
82 82
83 void ThreadedChannel::BeginMainFrameAbortedOnImpl(CommitEarlyOutReason reason) { 83 void ThreadedChannel::BeginMainFrameAbortedOnImpl(
84 CommitEarlyOutReason reason,
85 base::TimeTicks main_thread_start_time) {
84 ImplThreadTaskRunner()->PostTask( 86 ImplThreadTaskRunner()->PostTask(
85 FROM_HERE, base::Bind(&ProxyImpl::BeginMainFrameAbortedOnImpl, 87 FROM_HERE, base::Bind(&ProxyImpl::BeginMainFrameAbortedOnImpl,
86 proxy_impl_->GetImplWeakPtr(), reason)); 88 proxy_impl_->GetImplWeakPtr(), reason,
89 main_thread_start_time));
87 } 90 }
88 91
89 void ThreadedChannel::SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) { 92 void ThreadedChannel::SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) {
90 ImplThreadTaskRunner()->PostTask( 93 ImplThreadTaskRunner()->PostTask(
91 FROM_HERE, base::Bind(&ProxyImpl::SetNeedsRedrawOnImpl, 94 FROM_HERE, base::Bind(&ProxyImpl::SetNeedsRedrawOnImpl,
92 proxy_impl_->GetImplWeakPtr(), damage_rect)); 95 proxy_impl_->GetImplWeakPtr(), damage_rect));
93 } 96 }
94 97
95 void ThreadedChannel::StartCommitOnImpl(CompletionEvent* completion) { 98 void ThreadedChannel::StartCommitOnImpl(
99 CompletionEvent* completion,
100 base::TimeTicks main_thread_start_time) {
96 ImplThreadTaskRunner()->PostTask( 101 ImplThreadTaskRunner()->PostTask(
97 FROM_HERE, base::Bind(&ProxyImpl::StartCommitOnImpl, 102 FROM_HERE,
98 proxy_impl_->GetImplWeakPtr(), completion)); 103 base::Bind(&ProxyImpl::StartCommitOnImpl, proxy_impl_->GetImplWeakPtr(),
104 completion, main_thread_start_time));
99 } 105 }
100 106
101 void ThreadedChannel::SetVisibleOnImpl(CompletionEvent* completion, 107 void ThreadedChannel::SetVisibleOnImpl(CompletionEvent* completion,
102 bool visible) { 108 bool visible) {
103 ImplThreadTaskRunner()->PostTask( 109 ImplThreadTaskRunner()->PostTask(
104 FROM_HERE, 110 FROM_HERE,
105 base::Bind(&ProxyImpl::SetVisibleOnImpl, proxy_impl_->GetImplWeakPtr(), 111 base::Bind(&ProxyImpl::SetVisibleOnImpl, proxy_impl_->GetImplWeakPtr(),
106 completion, visible)); 112 completion, visible));
107 } 113 }
108 114
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 217
212 base::SingleThreadTaskRunner* ThreadedChannel::MainThreadTaskRunner() const { 218 base::SingleThreadTaskRunner* ThreadedChannel::MainThreadTaskRunner() const {
213 return main_task_runner_.get(); 219 return main_task_runner_.get();
214 } 220 }
215 221
216 base::SingleThreadTaskRunner* ThreadedChannel::ImplThreadTaskRunner() const { 222 base::SingleThreadTaskRunner* ThreadedChannel::ImplThreadTaskRunner() const {
217 return impl_task_runner_.get(); 223 return impl_task_runner_.get();
218 } 224 }
219 225
220 } // namespace cc 226 } // namespace cc
OLDNEW
« cc/scheduler/scheduler.h ('K') | « cc/trees/threaded_channel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698