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

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

Issue 1840223002: cc: Remove BeginFrameSource::Create methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test BFS and mus too 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.cc ('k') | components/mus/surfaces/top_level_display_client.cc » ('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 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/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/animation/animation_events.h" 10 #include "cc/animation/animation_events.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 scoped_ptr<CompositorTimingHistory> compositor_timing_history( 68 scoped_ptr<CompositorTimingHistory> compositor_timing_history(
69 new CompositorTimingHistory( 69 new CompositorTimingHistory(
70 scheduler_settings.using_synchronous_renderer_compositor, 70 scheduler_settings.using_synchronous_renderer_compositor,
71 CompositorTimingHistory::BROWSER_UMA, 71 CompositorTimingHistory::BROWSER_UMA,
72 layer_tree_host_->rendering_stats_instrumentation())); 72 layer_tree_host_->rendering_stats_instrumentation()));
73 73
74 BeginFrameSource* frame_source = external_begin_frame_source_.get(); 74 BeginFrameSource* frame_source = external_begin_frame_source_.get();
75 if (!scheduler_settings.throttle_frame_production) { 75 if (!scheduler_settings.throttle_frame_production) {
76 // Unthrottled source takes precedence over external sources. 76 // Unthrottled source takes precedence over external sources.
77 unthrottled_begin_frame_source_ = BackToBackBeginFrameSource::Create( 77 unthrottled_begin_frame_source_.reset(new BackToBackBeginFrameSource(
78 task_runner_provider_->MainThreadTaskRunner()); 78 task_runner_provider_->MainThreadTaskRunner()));
79 frame_source = unthrottled_begin_frame_source_.get(); 79 frame_source = unthrottled_begin_frame_source_.get();
80 } 80 }
81 if (!frame_source) { 81 if (!frame_source) {
82 synthetic_begin_frame_source_ = SyntheticBeginFrameSource::Create( 82 synthetic_begin_frame_source_.reset(new SyntheticBeginFrameSource(
83 task_runner_provider_->MainThreadTaskRunner(), 83 task_runner_provider_->MainThreadTaskRunner(),
84 BeginFrameArgs::DefaultInterval()); 84 BeginFrameArgs::DefaultInterval()));
85 frame_source = synthetic_begin_frame_source_.get(); 85 frame_source = synthetic_begin_frame_source_.get();
86 } 86 }
87 87
88 scheduler_on_impl_thread_ = 88 scheduler_on_impl_thread_ =
89 Scheduler::Create(this, scheduler_settings, layer_tree_host_->id(), 89 Scheduler::Create(this, scheduler_settings, layer_tree_host_->id(),
90 task_runner_provider_->MainThreadTaskRunner(), 90 task_runner_provider_->MainThreadTaskRunner(),
91 frame_source, std::move(compositor_timing_history)); 91 frame_source, std::move(compositor_timing_history));
92 } 92 }
93 93
94 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); 94 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this);
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 << "DidFinishImplFrame called while not inside an impl frame!"; 897 << "DidFinishImplFrame called while not inside an impl frame!";
898 inside_impl_frame_ = false; 898 inside_impl_frame_ = false;
899 #endif 899 #endif
900 } 900 }
901 901
902 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 902 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
903 layer_tree_host_->SendBeginFramesToChildren(args); 903 layer_tree_host_->SendBeginFramesToChildren(args);
904 } 904 }
905 905
906 } // namespace cc 906 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_impl.cc ('k') | components/mus/surfaces/top_level_display_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698