Index: webkit/compositor_bindings/web_layer_tree_view_impl.cc |
diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl.cc b/webkit/compositor_bindings/web_layer_tree_view_impl.cc |
index e61a16661c3a34e5657198e13facf6d340061d51..c65a61a0f164a3c6b1d7bb903b6139267c8e197a 100644 |
--- a/webkit/compositor_bindings/web_layer_tree_view_impl.cc |
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl.cc |
@@ -27,7 +27,7 @@ namespace WebKit { |
WebLayerTreeView* WebLayerTreeView::create(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings) |
{ |
scoped_ptr<WebLayerTreeViewImpl> layerTreeViewImpl(new WebLayerTreeViewImpl(client)); |
- if (!layerTreeViewImpl->initialize(settings)) |
+ if (!layerTreeViewImpl->initialize(settings, NULL)) |
return 0; |
layerTreeViewImpl->setRootLayer(root); |
return layerTreeViewImpl.release(); |
@@ -35,6 +35,7 @@ WebLayerTreeView* WebLayerTreeView::create(WebLayerTreeViewClient* client, const |
WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client) |
: m_client(client) |
+ , m_hasImplThread(false) |
{ |
} |
@@ -42,7 +43,7 @@ WebLayerTreeViewImpl::~WebLayerTreeViewImpl() |
{ |
} |
-bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSettings) |
+bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSettings, Thread* implThread) |
{ |
LayerTreeSettings settings; |
settings.acceleratePainting = webSettings.acceleratePainting; |
@@ -53,7 +54,9 @@ bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSetti |
settings.refreshRate = webSettings.refreshRate; |
settings.defaultTileSize = convert(webSettings.defaultTileSize); |
settings.maxUntiledLayerSize = convert(webSettings.maxUntiledLayerSize); |
- m_layerTreeHost = LayerTreeHost::create(this, settings); |
+ m_layerTreeHost = LayerTreeHost::create(this, settings, implThread); |
+ if (implThread) |
+ m_hasImplThread = true; |
if (!m_layerTreeHost.get()) |
return false; |
return true; |
@@ -144,7 +147,7 @@ bool WebLayerTreeViewImpl::commitRequested() const |
void WebLayerTreeViewImpl::composite() |
{ |
- if (Proxy::hasImplThread()) |
+ if (m_hasImplThread) |
m_layerTreeHost->setNeedsCommit(); |
else |
m_layerTreeHost->composite(); |