Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: webkit/compositor_bindings/web_layer_tree_view_impl.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address code review comments and fix all cc_unittests Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
« cc/video_layer_impl.h ('K') | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698