summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/renderer/gpu/render_widget_compositor.cc7
-rw-r--r--content/renderer/gpu/render_widget_compositor.h2
-rw-r--r--content/test/test_webkit_platform_support.cc3
-rw-r--r--content/test/web_layer_tree_view_impl_for_testing.cc6
-rw-r--r--content/test/web_layer_tree_view_impl_for_testing.h2
5 files changed, 12 insertions, 8 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_;
diff --git a/content/test/test_webkit_platform_support.cc b/content/test/test_webkit_platform_support.cc
index ea6ea71..bc93658 100644
--- a/content/test/test_webkit_platform_support.cc
+++ b/content/test/test_webkit_platform_support.cc
@@ -303,7 +303,8 @@ TestWebKitPlatformSupport::createLayerTreeViewForTesting() {
scoped_ptr<WebLayerTreeViewImplForTesting> view(
new WebLayerTreeViewImplForTesting());
- view->Initialize();
+ if (!view->Initialize())
+ return NULL;
return view.release();
}
diff --git a/content/test/web_layer_tree_view_impl_for_testing.cc b/content/test/web_layer_tree_view_impl_for_testing.cc
index d29e68b..1470e03 100644
--- a/content/test/web_layer_tree_view_impl_for_testing.cc
+++ b/content/test/web_layer_tree_view_impl_for_testing.cc
@@ -36,7 +36,7 @@ WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting() {}
WebLayerTreeViewImplForTesting::~WebLayerTreeViewImplForTesting() {}
-void WebLayerTreeViewImplForTesting::Initialize() {
+bool WebLayerTreeViewImplForTesting::Initialize() {
cc::LayerTreeSettings settings;
// For web contents, layer transforms should scale up the contents of layers
@@ -47,7 +47,9 @@ void WebLayerTreeViewImplForTesting::Initialize() {
settings.accelerated_animation_enabled = true;
layer_tree_host_ =
cc::LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings);
- DCHECK(layer_tree_host_);
+ if (!layer_tree_host_)
+ return false;
+ return true;
}
void WebLayerTreeViewImplForTesting::setSurfaceReady() {
diff --git a/content/test/web_layer_tree_view_impl_for_testing.h b/content/test/web_layer_tree_view_impl_for_testing.h
index 4f496bb..6fec0e3 100644
--- a/content/test/web_layer_tree_view_impl_for_testing.h
+++ b/content/test/web_layer_tree_view_impl_for_testing.h
@@ -26,7 +26,7 @@ class WebLayerTreeViewImplForTesting
WebLayerTreeViewImplForTesting();
virtual ~WebLayerTreeViewImplForTesting();
- void Initialize();
+ bool Initialize();
// blink::WebLayerTreeView implementation.
virtual void setSurfaceReady();