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

Side by Side Diff: cc/trees/single_thread_proxy.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/single_thread_proxy.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 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/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/profiler/scoped_tracker.h" 9 #include "base/profiler/scoped_tracker.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 DCHECK(layer_tree_host_->GetSettings().single_thread_proxy_scheduler); 425 DCHECK(layer_tree_host_->GetSettings().single_thread_proxy_scheduler);
426 // TODO(enne): this overrides any preexisting begin frame source. Those 426 // TODO(enne): this overrides any preexisting begin frame source. Those
427 // other sources will eventually be removed and this will be the only path. 427 // other sources will eventually be removed and this will be the only path.
428 if (!layer_tree_host_->GetSettings() 428 if (!layer_tree_host_->GetSettings()
429 .use_compositor_frame_sink_begin_frame_source) 429 .use_compositor_frame_sink_begin_frame_source)
430 return; 430 return;
431 if (scheduler_on_impl_thread_) 431 if (scheduler_on_impl_thread_)
432 scheduler_on_impl_thread_->SetBeginFrameSource(source); 432 scheduler_on_impl_thread_->SetBeginFrameSource(source);
433 } 433 }
434 434
435 void SingleThreadProxy::SetEstimatedParentDrawTime(base::TimeDelta draw_time) {
436 if (scheduler_on_impl_thread_)
437 scheduler_on_impl_thread_->SetEstimatedParentDrawTime(draw_time);
438 }
439
440 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { 435 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() {
441 TRACE_EVENT0("cc,benchmark", 436 TRACE_EVENT0("cc,benchmark",
442 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); 437 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread");
443 if (scheduler_on_impl_thread_) 438 if (scheduler_on_impl_thread_)
444 scheduler_on_impl_thread_->DidSwapBuffersComplete(); 439 scheduler_on_impl_thread_->DidSwapBuffersComplete();
445 layer_tree_host_->DidCompleteSwapBuffers(); 440 layer_tree_host_->DidCompleteSwapBuffers();
446 } 441 }
447 442
448 void SingleThreadProxy::OnDrawForCompositorFrameSink( 443 void SingleThreadProxy::OnDrawForCompositorFrameSink(
449 bool resourceless_software_draw) { 444 bool resourceless_software_draw) {
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 void SingleThreadProxy::DidFinishImplFrame() { 754 void SingleThreadProxy::DidFinishImplFrame() {
760 layer_tree_host_impl_->DidFinishImplFrame(); 755 layer_tree_host_impl_->DidFinishImplFrame();
761 #if DCHECK_IS_ON() 756 #if DCHECK_IS_ON()
762 DCHECK(inside_impl_frame_) 757 DCHECK(inside_impl_frame_)
763 << "DidFinishImplFrame called while not inside an impl frame!"; 758 << "DidFinishImplFrame called while not inside an impl frame!";
764 inside_impl_frame_ = false; 759 inside_impl_frame_ = false;
765 #endif 760 #endif
766 } 761 }
767 762
768 } // namespace cc 763 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698