| Index: ui/compositor/compositor.cc
|
| diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
|
| index 42e51cb891e32b0251b1e7436b49f36d7b30413a..2df601580c2c32429194addbd25c319fb2c18e97 100644
|
| --- a/ui/compositor/compositor.cc
|
| +++ b/ui/compositor/compositor.cc
|
| @@ -63,12 +63,11 @@ void CompositorLock::CancelLock() {
|
| compositor_ = NULL;
|
| }
|
|
|
| -Compositor::Compositor(gfx::AcceleratedWidget widget,
|
| - ui::ContextFactory* context_factory,
|
| +Compositor::Compositor(ui::ContextFactory* context_factory,
|
| scoped_refptr<base::SingleThreadTaskRunner> task_runner)
|
| : context_factory_(context_factory),
|
| root_layer_(NULL),
|
| - widget_(widget),
|
| + widget_(gfx::kNullAcceleratedWidget),
|
| surface_id_allocator_(context_factory->CreateSurfaceIdAllocator()),
|
| task_runner_(task_runner),
|
| vsync_manager_(new CompositorVSyncManager()),
|
| @@ -174,6 +173,12 @@ Compositor::Compositor(gfx::AcceleratedWidget widget,
|
| base::TimeTicks::Now() - before_create);
|
| host_->SetRootLayer(root_web_layer_);
|
| host_->set_surface_id_namespace(surface_id_allocator_->id_namespace());
|
| +}
|
| +
|
| +void Compositor::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) {
|
| + // This function should only get called once.
|
| + DCHECK_EQ(gfx::kNullAcceleratedWidget, widget_);
|
| + widget_ = widget;
|
| host_->SetLayerTreeHostClientReady();
|
| }
|
|
|
|
|