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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 619843002: cc: Make separate interface for BeginFrame ipc from OutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 94a6f2851c129f191776b57a31236a3970847bba..dd8d5f7f6ff3dcb9f0c58a07a92c580d6add6dd2 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -23,15 +23,20 @@ namespace cc {
scoped_ptr<Proxy> SingleThreadProxy::Create(
LayerTreeHost* layer_tree_host,
LayerTreeHostSingleThreadClient* client,
- scoped_refptr<base::SingleThreadTaskRunner> main_task_runner) {
- return make_scoped_ptr(
- new SingleThreadProxy(layer_tree_host, client, main_task_runner));
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+ return make_scoped_ptr(new SingleThreadProxy(
+ layer_tree_host,
+ client,
+ main_task_runner,
+ external_begin_frame_source.Pass()));
}
SingleThreadProxy::SingleThreadProxy(
LayerTreeHost* layer_tree_host,
LayerTreeHostSingleThreadClient* client,
- scoped_refptr<base::SingleThreadTaskRunner> main_task_runner)
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_ptr<BeginFrameSource> external_begin_frame_source)
: Proxy(main_task_runner, NULL),
layer_tree_host_(layer_tree_host),
client_(client),
@@ -43,6 +48,7 @@ SingleThreadProxy::SingleThreadProxy(
commit_requested_(false),
inside_synchronous_composite_(false),
output_surface_creation_requested_(false),
+ external_begin_frame_source_(external_begin_frame_source.Pass()),
weak_factory_(this) {
TRACE_EVENT0("cc", "SingleThreadProxy::SingleThreadProxy");
DCHECK(Proxy::IsMainThread());
@@ -84,11 +90,13 @@ void SingleThreadProxy::SetLayerTreeHostClientReady() {
if (layer_tree_host_->settings().single_thread_proxy_scheduler &&
!scheduler_on_impl_thread_) {
SchedulerSettings scheduler_settings(layer_tree_host_->settings());
- scheduler_on_impl_thread_ = Scheduler::Create(this,
- scheduler_settings,
- layer_tree_host_->id(),
- MainThreadTaskRunner(),
- base::PowerMonitor::Get());
+ scheduler_on_impl_thread_ =
+ Scheduler::Create(this,
+ scheduler_settings,
+ layer_tree_host_->id(),
+ MainThreadTaskRunner(),
+ base::PowerMonitor::Get(),
+ external_begin_frame_source_.Pass());
scheduler_on_impl_thread_->SetCanStart();
scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible());
}
@@ -629,10 +637,6 @@ bool SingleThreadProxy::MainFrameWillHappenForTesting() {
return false;
}
-BeginFrameSource* SingleThreadProxy::ExternalBeginFrameSource() {
- return layer_tree_host_impl_.get();
-}
-
void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) {
layer_tree_host_impl_->WillBeginImplFrame(args);
}
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698