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

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: Apply code review comments Created 8 years, 1 month 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 731001f26567937ee6bd0c305c295a7259c5e7a7..ab0a953e8df7d81fb03a54270b7308c2e87b53d2 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_impl.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
@@ -9,6 +9,7 @@
#include "cc/input_handler.h"
#include "cc/layer.h"
#include "cc/layer_tree_host.h"
+#include "cc/thread.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
@@ -23,15 +24,6 @@ using namespace cc;
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))
- return 0;
- layerTreeViewImpl->setRootLayer(root);
- return layerTreeViewImpl.release();
-}
-
WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client)
: m_client(client)
{
@@ -41,7 +33,7 @@ WebLayerTreeViewImpl::~WebLayerTreeViewImpl()
{
}
-bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSettings)
+bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSettings, scoped_ptr<Thread> implThread)
{
LayerTreeSettings settings;
settings.acceleratePainting = webSettings.acceleratePainting;
@@ -51,7 +43,7 @@ bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSetti
settings.refreshRate = webSettings.refreshRate;
settings.defaultTileSize = webSettings.defaultTileSize;
settings.maxUntiledLayerSize = webSettings.maxUntiledLayerSize;
- m_layerTreeHost = LayerTreeHost::create(this, settings);
+ m_layerTreeHost = LayerTreeHost::create(this, settings, implThread.Pass());
if (!m_layerTreeHost.get())
return false;
@@ -151,10 +143,7 @@ bool WebLayerTreeViewImpl::commitRequested() const
void WebLayerTreeViewImpl::composite()
{
- if (Proxy::hasImplThread())
- m_layerTreeHost->setNeedsCommit();
- else
- m_layerTreeHost->composite();
+ m_layerTreeHost->composite();
}
void WebLayerTreeViewImpl::updateAnimations(double frameBeginTimeSeconds)
« no previous file with comments | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | webkit/compositor_bindings/web_layer_tree_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698