summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorsievers@google.com <sievers@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-19 18:56:07 +0000
committersievers@google.com <sievers@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-19 18:56:07 +0000
commite96e34372428b9e0f0d76382b02c62c123ee00a5 (patch)
tree3022527916900b19e41b0a8e4d21b2e1d75a3999 /content
parente7d6293bf36c2e3c23c5789530ccfb4b99332daa (diff)
downloadchromium_src-e96e34372428b9e0f0d76382b02c62c123ee00a5.zip
chromium_src-e96e34372428b9e0f0d76382b02c62c123ee00a5.tar.gz
chromium_src-e96e34372428b9e0f0d76382b02c62c123ee00a5.tar.bz2
cc: Defer first OutputSurface creation until client is ready
Remove the |first_output_surface| which was not used before the client signals ready. This allows the client to wait before creating a graphics context until the gpu thread and client channel are set up. BUG=270179,329739 R=danakj@chromium.org, jamesr@chromium.org, jochen@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238458 Review URL: https://codereview.chromium.org/85693007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241897 0039d316-1c4b-4281-b951-d872f2087c98
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, 8 insertions, 12 deletions
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index 90ae2fe..2588050 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -281,8 +281,7 @@ scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
}
#endif
- if (!compositor->Initialize(settings))
- return scoped_ptr<RenderWidgetCompositor>();
+ compositor->Initialize(settings);
return compositor.Pass();
}
@@ -390,7 +389,7 @@ bool RenderWidgetCompositor::ScheduleMicroBenchmark(
return layer_tree_host_->ScheduleMicroBenchmark(name, value.Pass(), callback);
}
-bool RenderWidgetCompositor::Initialize(cc::LayerTreeSettings settings) {
+void 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()) {
@@ -400,7 +399,7 @@ bool RenderWidgetCompositor::Initialize(cc::LayerTreeSettings settings) {
layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(
this, this, NULL, settings);
}
- return layer_tree_host_;
+ DCHECK(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 941fe31..5e4cadf 100644
--- a/content/renderer/gpu/render_widget_compositor.h
+++ b/content/renderer/gpu/render_widget_compositor.h
@@ -144,7 +144,7 @@ class RenderWidgetCompositor : public blink::WebLayerTreeView,
private:
RenderWidgetCompositor(RenderWidget* widget, bool threaded);
- bool Initialize(cc::LayerTreeSettings settings);
+ void 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 bc93658..ea6ea71 100644
--- a/content/test/test_webkit_platform_support.cc
+++ b/content/test/test_webkit_platform_support.cc
@@ -303,8 +303,7 @@ TestWebKitPlatformSupport::createLayerTreeViewForTesting() {
scoped_ptr<WebLayerTreeViewImplForTesting> view(
new WebLayerTreeViewImplForTesting());
- if (!view->Initialize())
- return NULL;
+ view->Initialize();
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 1470e03..d29e68b 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() {}
-bool WebLayerTreeViewImplForTesting::Initialize() {
+void WebLayerTreeViewImplForTesting::Initialize() {
cc::LayerTreeSettings settings;
// For web contents, layer transforms should scale up the contents of layers
@@ -47,9 +47,7 @@ bool WebLayerTreeViewImplForTesting::Initialize() {
settings.accelerated_animation_enabled = true;
layer_tree_host_ =
cc::LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings);
- if (!layer_tree_host_)
- return false;
- return true;
+ DCHECK(layer_tree_host_);
}
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 6fec0e3..4f496bb 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();
- bool Initialize();
+ void Initialize();
// blink::WebLayerTreeView implementation.
virtual void setSurfaceReady();