summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 01:32:59 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 01:32:59 +0000
commite195e58974ff3290a193f11e43bda970a17fc45f (patch)
tree0f3662c0360445a5cbc384d0ba06f1bea9a7285a /content/renderer
parent66cbed83e9bb1a5861efdce2f675e948f738b2a8 (diff)
downloadchromium_src-e195e58974ff3290a193f11e43bda970a17fc45f.zip
chromium_src-e195e58974ff3290a193f11e43bda970a17fc45f.tar.gz
chromium_src-e195e58974ff3290a193f11e43bda970a17fc45f.tar.bz2
Add implementation of WebWidgetClient::initializeLayerTreeView()
This adds an implementation of WebWidgetClient::initializeLayerTreeView() that takes no parameters. The WLTV::Settings parameter is already ignored and we have (and have to have) API surface to set the root layer so that parameter isn't all that helpful. This has to land and roll before https://bugs.webkit.org/show_bug.cgi?id=111632. After that lands and rolls back into chromium, the 3-param implementation of content::RenderWidget::initializeLayerTreeView() can be removed. R=enne@chromium.org Review URL: https://chromiumcodereview.appspot.com/12472015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/gpu/render_widget_compositor.cc3
-rw-r--r--content/renderer/gpu/render_widget_compositor.h4
-rw-r--r--content/renderer/render_widget.cc17
-rw-r--r--content/renderer/render_widget.h6
4 files changed, 17 insertions, 13 deletions
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index e054885..123956f 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -79,8 +79,7 @@ bool GetSwitchValueAsFloat(
// static
scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
- RenderWidget* widget,
- WebKit::WebLayerTreeView::Settings web_settings) {
+ RenderWidget* widget) {
scoped_ptr<RenderWidgetCompositor> compositor(
new RenderWidgetCompositor(widget));
diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h
index c047082..bb0750c 100644
--- a/content/renderer/gpu/render_widget_compositor.h
+++ b/content/renderer/gpu/render_widget_compositor.h
@@ -26,9 +26,7 @@ class RenderWidgetCompositor : public WebKit::WebLayerTreeView,
public:
// Attempt to construct and initialize a compositor instance for the widget
// with the given settings. Returns NULL if initialization fails.
- static scoped_ptr<RenderWidgetCompositor> Create(
- RenderWidget* widget,
- WebKit::WebLayerTreeView::Settings settings);
+ static scoped_ptr<RenderWidgetCompositor> Create(RenderWidget* widget);
virtual ~RenderWidgetCompositor();
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 1efc33c..7ab8dc1 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1362,20 +1362,25 @@ void RenderWidget::didDeactivateCompositor() {
webwidget_->enterForceCompositingMode(false);
}
-void RenderWidget::initializeLayerTreeView(
- WebKit::WebLayerTreeViewClient* client,
- const WebKit::WebLayer& root_layer,
- const WebKit::WebLayerTreeView::Settings& settings) {
- compositor_ = RenderWidgetCompositor::Create(this, settings);
+void RenderWidget::initializeLayerTreeView() {
+ compositor_ = RenderWidgetCompositor::Create(this);
if (!compositor_)
return;
- compositor_->setRootLayer(root_layer);
compositor_->setViewportSize(size_, physical_backing_size_);
if (init_complete_)
compositor_->setSurfaceReady();
}
+void RenderWidget::initializeLayerTreeView(
+ WebKit::WebLayerTreeViewClient* client,
+ const WebKit::WebLayer& root_layer,
+ const WebKit::WebLayerTreeView::Settings& settings) {
+ initializeLayerTreeView();
+ if (compositor_)
+ compositor_->setRootLayer(root_layer);
+}
+
WebKit::WebLayerTreeView* RenderWidget::layerTreeView() {
return compositor_.get();
}
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index d063800..1cf9832 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -44,10 +44,11 @@ class SyncMessage;
namespace WebKit {
class WebGestureEvent;
class WebInputEvent;
+class WebLayerTreeViewClient;
class WebMouseEvent;
-struct WebRenderingStatsImpl;
-struct WebPoint;
class WebTouchEvent;
+struct WebPoint;
+struct WebRenderingStatsImpl;
}
namespace cc { class OutputSurface; }
@@ -125,6 +126,7 @@ class CONTENT_EXPORT RenderWidget
virtual void didAutoResize(const WebKit::WebSize& new_size);
virtual void didActivateCompositor(int input_handler_identifier);
virtual void didDeactivateCompositor();
+ virtual void initializeLayerTreeView();
virtual void initializeLayerTreeView(
WebKit::WebLayerTreeViewClient* client,
const WebKit::WebLayer& root_layer,