Index: content/renderer/gpu/render_widget_compositor.cc |
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc |
index bbc52882caf8d6a5e42909d1ce2c947ab5feae68..df6240c50bf2845bffb18ca0decc7c56e839af80 100644 |
--- a/content/renderer/gpu/render_widget_compositor.cc |
+++ b/content/renderer/gpu/render_widget_compositor.cc |
@@ -32,6 +32,7 @@ |
#include "content/common/content_switches_internal.h" |
#include "content/common/gpu/client/context_provider_command_buffer.h" |
#include "content/public/common/content_switches.h" |
+#include "content/renderer/gpu/compositor_external_begin_frame_source.h" |
#include "content/renderer/input/input_handler_manager.h" |
#include "content/renderer/render_thread_impl.h" |
#include "gpu/command_buffer/client/gles2_interface.h" |
@@ -535,20 +536,27 @@ void RenderWidgetCompositor::Initialize(cc::LayerTreeSettings settings) { |
main_thread_compositor_task_runner = |
render_thread->main_thread_compositor_task_runner(); |
} |
+ scoped_ptr<CompositorExternalBeginFrameSource> external_begin_frame_source; |
+ if (settings.begin_frame_scheduling_enabled) { |
+ external_begin_frame_source.reset(new CompositorExternalBeginFrameSource( |
+ widget_->routing_id())); |
+ } |
if (compositor_message_loop_proxy.get()) { |
layer_tree_host_ = |
cc::LayerTreeHost::CreateThreaded(this, |
shared_bitmap_manager, |
settings, |
main_thread_compositor_task_runner, |
- compositor_message_loop_proxy); |
+ compositor_message_loop_proxy, |
+ external_begin_frame_source.Pass()); |
} else { |
layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded( |
this, |
this, |
shared_bitmap_manager, |
settings, |
- main_thread_compositor_task_runner); |
+ main_thread_compositor_task_runner, |
+ external_begin_frame_source.Pass()); |
} |
DCHECK(layer_tree_host_); |
} |