diff options
Diffstat (limited to 'content/renderer/gpu')
-rw-r--r-- | content/renderer/gpu/render_widget_compositor.cc | 7 | ||||
-rw-r--r-- | content/renderer/gpu/render_widget_compositor.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index bc4d652..ec12089 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc @@ -279,7 +279,8 @@ scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create( } #endif - compositor->Initialize(settings); + if (!compositor->Initialize(settings)) + return scoped_ptr<RenderWidgetCompositor>(); return compositor.Pass(); } @@ -386,7 +387,7 @@ bool RenderWidgetCompositor::ScheduleMicroBenchmark( return layer_tree_host_->ScheduleMicroBenchmark(name, value.Pass(), callback); } -void RenderWidgetCompositor::Initialize(cc::LayerTreeSettings settings) { +bool RenderWidgetCompositor::Initialize(cc::LayerTreeSettings settings) { scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = RenderThreadImpl::current()->compositor_message_loop_proxy(); if (compositor_message_loop_proxy.get()) { @@ -396,7 +397,7 @@ void RenderWidgetCompositor::Initialize(cc::LayerTreeSettings settings) { layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded( this, this, NULL, settings); } - DCHECK(layer_tree_host_); + return layer_tree_host_; } void RenderWidgetCompositor::setSurfaceReady() { diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h index c0f91c7..7fc8f15 100644 --- a/content/renderer/gpu/render_widget_compositor.h +++ b/content/renderer/gpu/render_widget_compositor.h @@ -137,7 +137,7 @@ class RenderWidgetCompositor : public blink::WebLayerTreeView, private: RenderWidgetCompositor(RenderWidget* widget, bool threaded); - void Initialize(cc::LayerTreeSettings settings); + bool Initialize(cc::LayerTreeSettings settings); bool threaded_; bool suppress_schedule_composite_; |