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

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

Issue 2352823002: cc: Remove estimated parent draw time from renderer (Closed)
Patch Set: Rebase Created 4 years, 3 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 void ProxyImpl::SetBeginFrameSource(BeginFrameSource* source) { 269 void ProxyImpl::SetBeginFrameSource(BeginFrameSource* source) {
270 // During shutdown, destroying the CompositorFrameSink may unset the 270 // During shutdown, destroying the CompositorFrameSink may unset the
271 // BeginFrameSource. 271 // BeginFrameSource.
272 if (scheduler_) { 272 if (scheduler_) {
273 // TODO(enne): this overrides any preexisting begin frame source. Those 273 // TODO(enne): this overrides any preexisting begin frame source. Those
274 // other sources will eventually be removed and this will be the only path. 274 // other sources will eventually be removed and this will be the only path.
275 scheduler_->SetBeginFrameSource(source); 275 scheduler_->SetBeginFrameSource(source);
276 } 276 }
277 } 277 }
278 278
279 void ProxyImpl::SetEstimatedParentDrawTime(base::TimeDelta draw_time) {
280 DCHECK(IsImplThread());
281 scheduler_->SetEstimatedParentDrawTime(draw_time);
282 }
283
284 void ProxyImpl::DidSwapBuffersCompleteOnImplThread() { 279 void ProxyImpl::DidSwapBuffersCompleteOnImplThread() {
285 TRACE_EVENT0("cc,benchmark", "ProxyImpl::DidSwapBuffersCompleteOnImplThread"); 280 TRACE_EVENT0("cc,benchmark", "ProxyImpl::DidSwapBuffersCompleteOnImplThread");
286 DCHECK(IsImplThread()); 281 DCHECK(IsImplThread());
287 scheduler_->DidSwapBuffersComplete(); 282 scheduler_->DidSwapBuffersComplete();
288 channel_impl_->DidCompleteSwapBuffers(); 283 channel_impl_->DidCompleteSwapBuffers();
289 } 284 }
290 285
291 void ProxyImpl::OnCanDrawStateChanged(bool can_draw) { 286 void ProxyImpl::OnCanDrawStateChanged(bool can_draw) {
292 TRACE_EVENT1("cc", "ProxyImpl::OnCanDrawStateChanged", "can_draw", can_draw); 287 TRACE_EVENT1("cc", "ProxyImpl::OnCanDrawStateChanged", "can_draw", can_draw);
293 DCHECK(IsImplThread()); 288 DCHECK(IsImplThread());
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 bool ProxyImpl::IsMainThreadBlocked() const { 612 bool ProxyImpl::IsMainThreadBlocked() const {
618 return task_runner_provider_->IsMainThreadBlocked(); 613 return task_runner_provider_->IsMainThreadBlocked();
619 } 614 }
620 615
621 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { 616 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() {
622 DCHECK(IsMainThreadBlocked() && commit_completion_event_); 617 DCHECK(IsMainThreadBlocked() && commit_completion_event_);
623 return main_thread_blocked_commit_vars_unsafe_; 618 return main_thread_blocked_commit_vars_unsafe_;
624 } 619 }
625 620
626 } // namespace cc 621 } // 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