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..786fe7d52d596c591667077c8909c2171d1d1817 100644 |
--- a/webkit/compositor_bindings/web_compositor_support_impl.cc |
+++ b/webkit/compositor_bindings/web_compositor_support_impl.cc |
@@ -7,8 +7,8 @@ |
#include "base/memory/scoped_ptr.h" |
#include "cc/settings.h" |
+#include "webkit/compositor_bindings/ccthread_impl.h" |
#include "webkit/compositor_bindings/web_animation_impl.h" |
-#include "webkit/compositor_bindings/web_compositor_impl.h" |
#include "webkit/compositor_bindings/web_content_layer_impl.h" |
#include "webkit/compositor_bindings/web_delegated_renderer_layer_impl.h" |
#include "webkit/compositor_bindings/web_external_texture_layer_impl.h" |
@@ -22,6 +22,7 @@ |
#include "webkit/compositor_bindings/web_transform_animation_curve_impl.h" |
#include "webkit/compositor_bindings/web_video_layer_impl.h" |
+using WebKit::CCThreadImpl; |
using WebKit::WebAnimation; |
using WebKit::WebAnimationCurve; |
using WebKit::WebContentLayer; |
@@ -45,26 +46,26 @@ using WebKit::WebTransformAnimationCurve; |
using WebKit::WebVideoFrameProvider; |
using WebKit::WebVideoLayer; |
-using WebKit::WebCompositorImpl; |
- |
namespace webkit { |
-WebCompositorSupportImpl::WebCompositorSupportImpl() { |
+WebCompositorSupportImpl::WebCompositorSupportImpl() |
+ : impl_thread_(NULL) { |
} |
WebCompositorSupportImpl::~WebCompositorSupportImpl() { |
} |
-void WebCompositorSupportImpl::initialize(WebKit::WebThread* thread) { |
- WebCompositorImpl::initialize(thread); |
+void WebCompositorSupportImpl::initialize(WebKit::WebThread* impl_thread) { |
+ if (impl_thread) |
+ impl_thread_ = CCThreadImpl::createForDifferentThread(impl_thread) |
+ .release(); |
} |
bool WebCompositorSupportImpl::isThreadingEnabled() { |
- return WebCompositorImpl::isThreadingEnabled(); |
+ return !!impl_thread_; |
} |
void WebCompositorSupportImpl::shutdown() { |
- WebCompositorImpl::shutdown(); |
} |
void WebCompositorSupportImpl::setPerTilePaintingEnabled(bool enabled) { |
@@ -88,7 +89,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, impl_thread_)) |
return NULL; |
layerTreeViewImpl->setRootLayer(root); |
return layerTreeViewImpl.release(); |