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

Unified Diff: webkit/compositor_bindings/web_compositor_support_impl.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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_compositor_support_impl.cc
diff --git a/webkit/compositor_bindings/web_compositor_support_impl.cc b/webkit/compositor_bindings/web_compositor_support_impl.cc
index 32a18408180f2ff163223c1aac85fcc6eec1549f..2b5c88a1d4a1ab7346ed835741e8d0cbc0154271 100644
--- a/webkit/compositor_bindings/web_compositor_support_impl.cc
+++ b/webkit/compositor_bindings/web_compositor_support_impl.cc
@@ -55,8 +55,12 @@ WebCompositorSupportImpl::WebCompositorSupportImpl() {
WebCompositorSupportImpl::~WebCompositorSupportImpl() {
}
-void WebCompositorSupportImpl::initialize(WebKit::WebThread* thread) {
- WebCompositorImpl::initialize(thread);
+void WebCompositorSupportImpl::initialize(WebKit::WebThread* implThread) {
+ ASSERT(!state_.mainThread);
+ state_.mainThread = CCThreadImpl::createForCurrentThread().release();
+ if (implThread)
+ state_.implThread = CCThreadImpl::createForDifferentThread(implThread)
+ .release();
}
bool WebCompositorSupportImpl::isThreadingEnabled() {
@@ -88,7 +92,7 @@ WebLayerTreeView* WebCompositorSupportImpl::createLayerTreeView(
const WebLayerTreeView::Settings& settings) {
scoped_ptr<WebKit::WebLayerTreeViewImpl> layerTreeViewImpl(
new WebKit::WebLayerTreeViewImpl(client));
- if (!layerTreeViewImpl->initialize(settings))
+ if (!layerTreeViewImpl->initialize(settings, &state_))
return NULL;
layerTreeViewImpl->setRootLayer(root);
return layerTreeViewImpl.release();

Powered by Google App Engine
This is Rietveld 408576698